SnapLine

SnapElement
public sealed class SnapLine : SnapElement
Represents a single snapping line in a graphics context.

Constructors

SnapLine

#
Create a new snap line.
public SnapLine(
value,
Value of snap line.
isVertical,
Direction of line.
range0,
Visual range start.
range1,
Visual range end.
domain0,
Line length lower limit.
domain1
Line length upper limit.
)

Properties

Centre

#
Gets the centre of the domain.
public float Centre { get; }

Domain0

#
Gets the lower domain of the line. If this property returns float.NegativeInfinity or float.MinValue, the line is considered to not be limited at this end.
public float Domain0 { get; }

Domain1

#
Gets the upper domain of the line. If this property returns float.PositiveInfinity or float.MaxValue, the line is considered to not be limited at this end.
public float Domain1 { get; }

IsHorizontal

#
Gets whether this snapping line is horizontal.
public bool IsHorizontal { get; }

IsLimitedDomain

#
Gets whether this line has a limited domain.
public bool IsLimitedDomain { get; }

IsVertical

#
Gets whether this snapping line is vertical.
public bool IsVertical { get; }

Range

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

Range0

#
Gets the beginning of the snapping domain in graphics coordinates.
public float Range0 { get; }

Range1

#
Gets the end of the snapping domain in graphics coordinates.
public float Range1 { get; }

Value

#
Gets the value for this snapping line.
public double Value { get; }

Methods

CompareTo

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.
public int CompareTo(
ISnapElement
other
An object to compare with this instance.
)
inherited fromSnapElement
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

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