ISnapElement

References
public interface ISnapElement
Base interface for all snapping elements (points, lines, segments, circles, what have you.

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.

Radius

#
double Radius { get; }
Gets the snapping radius in logical pixels associated with this element. In case multiple snapping elements are competing for precedence, those with smaller radii are favoured.

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.

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.