Constructors
SnappingConstraints
#public SnappingConstraints()
RectangleF[]
boxes
Properties
Methods
CreateFromDocument
#Create a set of snapping constraints from the attributes in a document.
public static SnappingConstraints CreateFromDocument()
document,
Document to peruse.
includeSelected,
If true, selected objects are included in the snapping set.
includeUnselected,
If true, unselected objects are included in the snapping set.
filter = null
Omit all objects which match one of the filter ids, as well as all groups containing any filter ids.
CreateFromDocument
#Create a set of snapping constraints from the attributes in a document.
public static SnappingConstraints CreateFromDocument()
document,
Document to peruse.
filterIds
Omit all objects which match one of the filter ids, as well as all groups containing any filter ids.
DrawSnappingBoxes
#Draw all snapping boxes to a graphics context. Handy for debugging.
public void DrawSnappingBoxes()
Graphics
graphics
SnapObject
#Snap a specific object into place, using its current bounds.
public void SnapObject()
target,
Target object.
settings,
Snapping settings.
RectangleF
visibleLimit,
Limiting bounds for snap searches.
out SnappingAction
snapX,
Snap action in the X direction, if any.
out SnappingAction
snapY
Snap action in the Y direction, if any.
SnapRectangle
#Snap a custom rectangle into place.
public void SnapRectangle()
RectangleF
target,
Target box to snap.
settings,
Snapping settings to use.
RectangleF
visibleLimit,
Limiting bounds for snap searches.
out SnappingAction
snapX,
Snapping action along x, if any.
out SnappingAction
snapY
Snapping action along y, if any.
SnapWires
#Snap an object into place based on horizontal wire constraints.
public static SnappingAction SnapWires()
target,
Object to snap.
RectangleF
boundsOverride,
Override for the bounds of the target object. We need this because the target object is in the process of being dragged, and as such hasn't yet received it's newest location. Snaping actions are modifications to the dragging offset, so we need to know how the target object is about to be moved.
settings
Returns: Possible wire snapping action.
SnapWires
#Snap an object into place based on horizontal wire constraints.
Returns: Possible wire snapping action.