SnappingAction

References
public class SnappingAction
A single resolved snapping action.

Constructors

SnappingAction

#
Create a new snapping action. This is somewhat tricky, consider using one of the static creation methods.
public SnappingAction(
dx,
dy,
text,
PointF
point,
anchor,
lines
)

Properties

LabelAnchor

#
Gets the text anchor for the label with respect to the point.
public TextAnchor LabelAnchor { get; }

LabelPoint

#
Gets the anchor point for the label text.
public PointF LabelPoint { get; }

LabelText

#
Gets the name of this action.
public string LabelText { get; }

Lines

#
Gets all the lines that make up the snapping feedback graphics.
public LineF[] Lines { get; }

Magnitude

#
The sum of the absolute values of ΔX and ΔY.
public float Magnitude { get; }

ΔX

#
Gets the motion in X required to make the snap happen.
public float ΔX { get; }

ΔY

#
Gets the motion in Y required to make the snap happen.
public float ΔY { get; }

Methods

CreateBottomAlignAction

#
Create a snapping action for bottom box alignment.
public static SnappingAction CreateBottomAlignAction(
RectangleF
source,
RectangleF
target,
dy
)

CreateCentreAlignAction

#
Create a snapping action for horizontal centre box alignment.
public static SnappingAction CreateCentreAlignAction(
RectangleF
source,
RectangleF
target,
dx
)

CreateHorizontalGapActionAbove

#
Create a snapping action for horizontal gap spacing with the feedback on top.
public static SnappingAction CreateHorizontalGapActionAbove(
RectangleF
source,
RectangleF
target,
gapSize,
dx
)

CreateHorizontalGapActionBelow

#
Create a snapping action for horizontal gap spacing with the feedback underneath.
public static SnappingAction CreateHorizontalGapActionBelow(
RectangleF
source,
RectangleF
target,
gapSize,
dx
)

CreateLeftAlignAction

#
Create a snapping action for left box alignment.
public static SnappingAction CreateLeftAlignAction(
RectangleF
source,
RectangleF
target,
dx
)

CreateRightAlignAction

#
Create a snapping action for right box alignment.
public static SnappingAction CreateRightAlignAction(
RectangleF
source,
RectangleF
target,
dx
)

CreateStraightenWireAction

#
Create a wire straightening action.
public static SnappingAction CreateStraightenWireAction(
PointF
source,
PointF
target
)

CreateTopAlignAction

#
Create a snapping action for left box alignment.
public static SnappingAction CreateTopAlignAction(
RectangleF
source,
RectangleF
target,
dy
)

CreateVerticalGapActionOnLeft

#
Create a snapping action for vertical gap spacing with the label on the left.
public static SnappingAction CreateVerticalGapActionOnLeft(
RectangleF
source,
RectangleF
target,
gapSize,
dy
)

CreateVerticalGapActionOnRight

#
Create a snapping action for vertical gap spacing with the label on the right.
public static SnappingAction CreateVerticalGapActionOnRight(
RectangleF
source,
RectangleF
target,
gapSize,
dy
)

Draw

#
Draw this action in a graphics context.
public void Draw(
context,
Color
colour
)

HorizontalOrthoAction

#
Create a horizontal ortho constraint. This one has no deflection, but it does have feedback.
public static SnappingAction HorizontalOrthoAction(
PointF
origin,
RectangleF
frame
)

SmallerMagnitude

#
Return the action with the smaller magnitude.
public static SnappingAction SmallerMagnitude()

VerticalOrthoAction

#
Create a vertical ortho constraint. This one has no deflection, but it does have feedback.
public static SnappingAction VerticalOrthoAction(
PointF
origin,
RectangleF
frame
)