Class RotatedViewport
Geometry of a rotated Viewport (issue #578). A rotated display is drawn by rendering a north-up cover — an axis-aligned viewport at the same scale and centre, large enough that the rotated output rectangle fits inside it — and rotating that onto the output about its centre.
public static class RotatedViewport
- Inheritance
-
RotatedViewport
- Inherited Members
Methods
NorthUpCover(Viewport)
The north-up viewport covering viewport once rotated:
same centre and metres per pixel, with a pixel size that holds the
rotated output's bounding box. Returns viewport itself
when it is not rotated.
public static Viewport NorthUpCover(Viewport viewport)
Parameters
viewportViewport
Returns
Remarks
The cover's width and height differ from the output's by an even number of pixels, so its centre lands on the output's centre exactly, with no half-pixel shift.