Class Viewport
A geographic bounding rectangle representing the current display area.
public sealed record Viewport : IEquatable<Viewport>
- Inheritance
-
Viewport
- Implements
- Inherited Members
Remarks
Under a non-zero RotationDegrees the bounds and pixel size still describe the unrotated frame (the north-up rectangle the output shows before rotation about its centre), so a consumer that ignores rotation renders the same area north-up.
Properties
HeightPixels
Display height in pixels.
public required int HeightPixels { get; init; }
Property Value
LatitudeSpan
MaxLatitude − MinLatitude, in degrees.
public double LatitudeSpan { get; }
Property Value
LongitudeSpan
MaxLongitude − MinLongitude, in degrees. Not normalised across the antimeridian.
public double LongitudeSpan { get; }
Property Value
MaxLatitude
North edge of the display area, in decimal degrees (WGS-84).
public required double MaxLatitude { get; init; }
Property Value
MaxLongitude
East edge of the display area, in decimal degrees (WGS-84).
public required double MaxLongitude { get; init; }
Property Value
MinLatitude
South edge of the display area, in decimal degrees (WGS-84).
public required double MinLatitude { get; init; }
Property Value
MinLongitude
West edge of the display area, in decimal degrees (WGS-84).
public required double MinLongitude { get; init; }
Property Value
RotationDegrees
Clockwise rotation of the display about its centre, in degrees
(0 = north-up, 90 = north to the right).
public double RotationDegrees { get; init; }
Property Value
ScaleDenominator
Display scale denominator (e.g. 25_000 for 1:25000).
public required double ScaleDenominator { get; init; }
Property Value
WidthPixels
Display width in pixels.
public required int WidthPixels { get; init; }