ISnapProvider

References
public interface ISnapProvider
Base interface for snapping grids.

Properties

AffectsX

#
bool AffectsX { get; }
Gets whether this element will affect the x component of a coordinate.

AffectsY

#
bool AffectsY { get; }
Gets whether this element will affect the y component of a coordinate.

Methods

DistanceTo

#
float DistanceTo(PointF point)
Compute the distance from a point to this snapping element.
point (PointF)Point to test.
Distance between point and element.

Elements

#
IEnumerable<ISnapElement> Elements(RectangleF region)
Get all the snapping elements that are relevant within the given rectangle.
region (RectangleF)Boundary region.
All relevant elements within region.

IsInRange

#
bool IsInRange(PointF point)
Gets whether a point is within reach of this snapping element.
point (PointF)Point to test.
True if the distance from the point to the element is less than or equal to the snapping radius.

Project

#
bool Project(PointF point, out PointF projected, out double x, out double y)
Project a point to this snapping element.
point (PointF)Point to project.
projected (out PointF)Projected point on element.
x (out double)X value of projection.
y (out double)Y value of projection.
True if point was successfully projected.