g2d.translate(viewPortCenterX, viewPortCenterY);
// AffineTransform rotates positive clockwise, so we invert the value.
g2d.rotate(Math.toRadians(-rotation));
double pixelsPerUnitX = 1.0 / new Length(cameraUnitsPerPixelX,
cameraUnitsPerPixelUnits).convertToUnits(this.units).getValue();
double pixelsPerUnitY = 1.0 / new Length(cameraUnitsPerPixelY,
cameraUnitsPerPixelUnits).convertToUnits(this.units).getValue();
int width = (int) (size * pixelsPerUnitX);
int height = (int) (size * pixelsPerUnitY);
int x = (int) -(width / 2);