@Override public final IVector2 scaleAndTranslate(final IVector2 point) { // return point.sub(_viewport._lower).scale(_scale); final IVector2 scaled = point.sub(_viewport._lower).scale(_scale); return new GVector2D(scaled.x(), _renderExtent.y() - scaled.y()); }
@Override public final GAWTPoints toScaledAndTranslatedPoints(final IPointsContainer<IVector2> polygon) { final int nPoints = polygon.getPointsCount(); final int[] xPoints = new int[nPoints]; final int[] yPoints = new int[nPoints]; for (int i = 0; i < nPoints; i++) { final IVector2 point = scaleAndTranslate(polygon.getPoint(i)); xPoints[i] = Math.round((float) point.x()); yPoints[i] = Math.round((float) point.y()); } return new GAWTPoints(xPoints, yPoints); }