public struct FrameF
A two-dimensional lens on a a pair of (x,y) numeric intervals.

Constructors

FrameF

#
Create a two-dimensional stretch from two one-dimensional stretches.
public FrameF(
x,
Horizontal stretch.
y
Vertical stretch.
)

FrameF

#
Create a two-dimensional stretch from a boundary rectangle and underlying limits.
public FrameF(
RectangleF
boundary,
Boundary (will be made increasing if it isn't).
x0,
Lowest x value within the frame.
x1,
Highest x-value within the frame.
y0,
Lowest y-value within the frame.
y1
Highest y-value within the frame.
)

Properties

Boundary

#
Gets the bounds for the frame.
public RectangleF Boundary { get; }

IsNormalised

#
Gets whether the zoom factor is identical for the X and Y directions.
public bool IsNormalised { get; }

X

#
Gets the horizontal stretch.
public DomainF X { get; }

Y

#
Gets the vertical stretch.
public DomainF Y { get; }

Methods

Interpolate

#
Perform a linear interpolation between two frames.
public FrameF Interpolate(
other,
Target frame.
factor
Interpolation factor.
)
Interpolated frame.

IsVisible

#
Gets whether a point in content coordinates is visible within the boundary rectangle.
public bool IsVisible(
point
)

Limit

#
Create a frame which does not exceed the maximum zoom levels in all directions.
public FrameF Limit(
(double x0, double x1, double y0, double y1)
soft,
Soft limits, up to this point no adjustment is taken.
(double x0, double x1, double y0, double y1)
hard
Hard limits, guaranteed enforced limits on the projection.
)
Adjusted frame.

Normalise

#
Normalise the horizontal and vertical zooming factors on this frame.
public FrameF Normalise()

Pan

#
Perform a panning operation on this frame.
public FrameF Pan(
PointF
from,
From point in boundary coordinates.
PointF
to
To point in boundary coordinates.
)
Modified frame.

ToBoundary

#
Map a point from content coordinates to boundary coordinates.
public PointF ToBoundary(
contentPoint
)

ToContent

#
Map a point from boundary coordinates to content coordinates.
public Point2d ToContent(
PointF
boundaryPoint
)

WithBoundary

#
Change the boundary on this frame.
public FrameF WithBoundary(
RectangleF
boundary
New boundary.
)
Modified frame.

WithLimits

#
Change the limits on this frame.
public FrameF WithLimits()
Modified frame.

Zoom

#
Perform a zoom operation on this frame.
public FrameF Zoom(
PointF
from,
Zoom start point in boundary coordinates.
PointF
to
Zoom end point in boundary coordinates.
)
Modified frame.