This document is archived and information here might be outdated. Recommended version. |
Provides access to members that control snapping graphics.
Name | Description | |
---|---|---|
Name | The name of the snap agent. | |
SnapX | Indicates if the point is snapped in the horizontal direction. | |
SnapY | Indicates if the point is snapped in the vertical direction. |
Classes | Description |
---|---|
GridSnap | Snap to grid agent. |
GuideSnap | Snap to guides agent. |
MarginSnap | Snap to margins agent. |
RulerSnap | Snap to ruler agent. |
The graphic snap is used to create snap agents that snaps graphics to the grid, guides, margins and rulers of the page layout.
There are three different types of graphic snaps: the guide snap moves graphics to the horizontal and vertical guides. The margin snap snaps graphics to the layouts printable bounds. The ruler snap snaps graphics to the rulers. They all implement the IGraphicSnap interface.
Name is the name of the snap agent.
SnapX and SnapY are unique and are used to determine if a graphic can be snapped. For example, the GridSnap agent�s implementation of SnapX for polygon graphics checks if either the Xmin or Xmax of the graphics bounding rectangle is within snap tolerance of the snap grid. If either is, the graphic is moved the calculated distance between the two. SnapX and SnapY always return a Boolean, indicating whether or not the graphic was snapped. If any snap agent returns True, no other snap agents are called.
See also IPageLayoutSnap.