GoDiagram Web Reference
SnapPoint Method (GoView)

A PointF in document coordinates.
the GoObject being moved or resized
Find the nearest grid point to a given point when MoveSelection or CopySelection need to snap object locations to a grid.
Syntax
'Declaration
 
Public Overridable Function SnapPoint( _
   ByVal p As PointF, _
   ByVal obj As GoObject _
) As PointF
public virtual PointF SnapPoint( 
   PointF p,
   GoObject obj
)

Parameters

p
A PointF in document coordinates.
obj
the GoObject being moved or resized

Return Value

A PointF grid point in document coordinates, or else the value of p if the point is not in or near any grid.
Remarks
This method looks at all top-level IGoDragSnapper objects, from front to back, in all layers that are part of this view, to see which one has the grid point closest to the given point p. This calls IGoDragSnapper.IGoDragSnapper.CanSnapPoint to ask whether a grid object can participate in this calculation. If a grid's IGoDragSnapper.SnapOpaque property is true, it stops the search for any additional IGoDragSnapper objects that are underneath it.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoView Class
GoView Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback