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.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| buffer (float) | The width of the buffer zone in which the limits may be exceeded. Use zero for a tight locking. |
| limits ((decimal a, decimal b)) | Limits for either end of the bounds. |
| initial ((decimal a, decimal b)) | 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.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| buffer (float) | The width of the buffer zone in which the limits may be exceeded. Use zero for a tight locking. |
| limits ((double a, double b)) | Limits for either end of the bounds. |
| initial ((double a, double b)) | 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.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| buffer (float) | The width of the buffer zone in which the limits may be exceeded. Use zero for a tight locking. |
| limits ((float a, float b)) | Limits for either end of the bounds. |
| initial ((float a, float b)) | 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.
Parameters:
| bounds (RectangleF) | Region bounds. |
| point (PointF) | Anchor point. |
| delta (float) | Scroll wheel delta. |
| initial ((double x0, double x1, double y0, double y1)) | Initial domains visible within region. |
Returns: New domains visible within region.
HorizontalLimitPan
#Perform a horizontal pan for a box limit range.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| motion (TrackF) | Mouse motion for pan. |
| initial ((decimal a, decimal b)) | Initial limits. A=left edge of bounds, B=right edge. |
Returns: New limits when motion is applied.
HorizontalLimitPan
#Perform a horizontal pan for a box limit range.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| motion (TrackF) | Mouse motion for pan. |
| initial ((double a, double b)) | Initial limits. A=left edge of bounds, B=right edge. |
Returns: New limits when motion is applied.
HorizontalLimitPan
#Perform a horizontal pan for a box limit range.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| motion (TrackF) | Mouse motion for pan. |
| initial ((float a, float b)) | Initial limits. A=left edge of bounds, B=right edge. |
Returns: New limits when motion is applied.
LimitZoom
#Perform a horizontal zoom for a box limit range.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| motion (TrackF) | Mouse motion for pan. |
| initial ((decimal a, decimal b)) | Initial limits. A=left edge of bounds, B=right edge. |
Returns: New limits when zoom is applied.
LimitZoom
#Perform a horizontal zoom for a box limit range.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| motion (TrackF) | Mouse motion for pan. |
| initial ((double a, double b)) | Initial limits. A=left edge of bounds, B=right edge. |
Returns: New limits when motion is applied.
LimitZoom
#Perform a horizontal zoom for a box limit range.
Parameters:
| bounds (RectangleF) | Bounds within which the motion happens. |
| motion (TrackF) | Mouse motion for pan. |
| initial ((float a, float b)) | Initial limits. A=left edge of bounds, B=right edge. |
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.