Projection

References
public class Projection
Immutable projection for an IControl.

Constructors

Projection

#
Create a new projection.
public Projection(
PointF
origin,
Origin of content in control coordinates.
zoom
Zoom level of content.
)

Properties

ContentPixelsPerControlPixel

#
Gets the number of content pixels that fit inside a single control pixel.
public float ContentPixelsPerControlPixel { get; }

ControlPixelsPerContentPixel

#
Gets the number of control pixels that fit inside a single content pixel.
public float ControlPixelsPerContentPixel { get; }

Origin

#
Gets the origin point.
public PointF Origin { get; }

TransformMatrix

#
Gets the transform matrix associated with this projection.
public IMatrix TransformMatrix { get; }

Zoom

#
Gets the zoom factor.
public float Zoom { get; }

ZoomInverse

#
Gets the reciprocal (one over) of the zoom factor.
public float ZoomInverse { get; }

Methods

CushionProjection

#
Cushion a projection so that the contents of a control are not moved too far outside the viewable region.
public Projection CushionProjection(
control
Control to cushion.
)
Cushioned projection.

Interpolate

#
Interpolate between two projections.
public static Projection Interpolate()

PerformDollyZoom

#
Zoom this projection while affecting the origin. Only the vertical motion matters and zooming always snaps to 100%.
public Projection PerformDollyZoom(
PointF
start,
Start of zoom in control coordinates.
PointF
end,
End of zoom in control coordinates.
minimumZoom,
Lowest allowable zoom factor.
maximumZoom
Highest allowable zoom factor.
)
Zoomed projection.

PerformDollyZoom

#
Zoom this projection while affecting the origin. Only the vertical motion matters and zooming always snaps to 100%.
public Projection PerformDollyZoom(
PointF
start,
Start of zoom in control coordinates.
PointF
end
End of zoom in control coordinates.
)
Zoomed projection.

PerformPan

#
Pan this projection.
public Projection PerformPan(
PointF
start,
Panning start in control coordinates.
PointF
end
Panning end in control coordinates.
)
Panned projection.

PerformPan

#
Pan this projection.
public Projection PerformPan(
SizeF
motion
Panning motion vector in control coordinates.
)
Panned projection.

PerformZoom

#
Zoom this projection without affecting the origin. Only the vertical motion matters and zooming always snaps to 100%.
public Projection PerformZoom(
PointF
start,
Start of zoom in control coordinates.
PointF
end,
End of zoom in control coordinates.
minimumZoom,
Lowest allowable zoom factor.
maximumZoom
Highest allowable zoom factor.
)
Zoomed projection.

PerformZoom

#
Zoom this projection without affecting the origin. Only the vertical motion matters and zooming always snaps to 100%.
public Projection PerformZoom(
PointF
start,
Start of zoom in control coordinates.
PointF
end
End of zoom in control coordinates.
)
Zoomed projection.

SetCentre

#
Create a new projection with the origin set such that a specific point is in the centre of the frame.
public Projection SetCentre(
PointF
centre,
Point in content coordinates to centre.
RectangleF
frame
Frame in control coordinates to centre in.
)
Modified projection.

SetFrame

#
Create a new projection ensuring a content rectangle is fully visible within a framing rectangle.
public Projection SetFrame(
RectangleF
bounds,
Container frame in control coordinates.
RectangleF
focus,
Rectangle in content coordinates to focus on.
minZoom,
Minimum allowed zoom.
maxZoom
Maximum allowed zoom.
)
Modified projection.

SetOrigin

#
Create a new projection using a different origin.
public Projection SetOrigin(
PointF
origin
New origin.
)
Modified projection.

SetZoom

#
Create a new projection using a different zoom.
public Projection SetZoom(
zoom
New zoom.
)
Modified projection.

Operators

OperationResultDescription
Projection*ProjectionProjectionMultiply two projections.