Movement
Exposes a set of utility methods for implementation panning and zooming navigation within controls. I would have called this Navigation if there hadn't already been a type by that name in Eto...
Methods
BoundsLimiting
#Limits an interval to not exceed (too much) a given limit.
public static (decimal aʹ, decimal bʹ) BoundsLimiting()
RectangleF
bounds,
Bounds within which the motion happens.
buffer,
The width of the buffer zone in which the limits may be exceeded. Use zero for a tight locking.
limits,
Limits for either end of the bounds.
initial
Initial limits. A=left edge of bounds, B=right edge.
Returns: New limits when motion is applied.
BoundsLimiting
#Limits an interval to not exceed (too much) a given limit.
public static (double aʹ, double bʹ) BoundsLimiting()
RectangleF
bounds,
Bounds within which the motion happens.
buffer,
The width of the buffer zone in which the limits may be exceeded. Use zero for a tight locking.
limits,
Limits for either end of the bounds.
initial
Initial limits. A=left edge of bounds, B=right edge.
Returns: New limits when motion is applied.
BoundsLimiting
#Limits an interval to not exceed (too much) a given limit.
public static (float aʹ, float bʹ) BoundsLimiting()
RectangleF
bounds,
Bounds within which the motion happens.
buffer,
The width of the buffer zone in which the limits may be exceeded. Use zero for a tight locking.
limits,
Limits for either end of the bounds.
initial
Initial limits. A=left edge of bounds, B=right edge.
Returns: New limits when motion is applied.
DollyZoom
#Perform a scroll wheel dolly zoom within a region.
Returns: New domains visible within region.
HorizontalLimitPan
#Perform a horizontal pan for a box limit range.
Returns: New limits when motion is applied.
HorizontalLimitPan
#Perform a horizontal pan for a box limit range.
Returns: New limits when motion is applied.
HorizontalLimitPan
#Perform a horizontal pan for a box limit range.
Returns: New limits when motion is applied.
LimitZoom
#Perform a horizontal zoom for a box limit range.
Returns: New limits when motion is applied.
LimitZoom
#Perform a horizontal zoom for a box limit range.
Returns: New limits when motion is applied.
NormaliseScaling
#Adjust the x and y limits of a rectangle such that the scaling in both directions is consistent.
Parameters:
| frame (RectangleF) | Visible frame. |
| x0 (double) | X value along left edge of frame. |
| x1 (double) | X value along right edge of frame. |
| y0 (double) | Y value along bottom edge of frame. |
| y1 (double) | Y value along top edge of frame. |
| x0ʹ (out double) | Adjusted x value along left edge of frame. |
| x1ʹ (out double) | Adjusted x value along right edge of frame. |
| y0ʹ (out double) | Adjusted y value along bottom edge of frame. |
| y1ʹ (out double) | Adjusted y value along top edge of frame. |
Returns: True if the limits were adjusted.