SnapElement

References
public abstract class SnapElement : ISnapElement
Abstract implementation of ISnapElement.

Constructors

SnapElement

#
protected SnapElement(float range)
Base class constructor.
range (float)Range.

Properties

Range

#
public float Range { get; }
Gets the radius of influence of this snap element. This value is used for sorting, in that elements with bigger ranges are sorted earlier.
Range

Methods

CompareTo

#
public int CompareTo(ISnapElement other)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
other (ISnapElement)An object to compare with this instance.
A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes other in the sort order. Zero This instance occurs in the same position in the sort order as other. Greater than zero This instance follows other in the sort order.

Snap

#
public abstract bool Snap(double x, double y, out double snapX, out double snapY)
Snap a point to this element.
x (double)Point x coordinate to snap.
y (double)Point y coordinate to snap.
snapX (out double)Snapped x coordinate.
snapY (out double)snapped y coordinate.
True if (x, y) got mapped to a different (x', y').
Snap