GoDiagram Web Reference
FindNearestGridPoint Method (GoGrid)

A PointF in document coordinates.
the object being dragged if SnapDragWhole is true; may be null/nothing
Find the nearest grid point to a given point.
Syntax
'Declaration
 
Public Overridable Function FindNearestGridPoint( _
   ByVal p As PointF, _
   ByVal obj As GoObject _
) As PointF
public virtual PointF FindNearestGridPoint( 
   PointF p,
   GoObject obj
)

Parameters

p
A PointF in document coordinates.
obj
the object being dragged if SnapDragWhole is true; may be null/nothing

Return Value

A PointF point in document coordinates, adjusted according to value of SnapCellSpot. When obj is not null, the returned point is also adjusted to try to include the whole object within the grid. If that object cannot fit in the grid because it is too wide and/or too tall, the GoObject.Location of the object, if along one of the four edges of the object, determines which side(s) stay within the bounds of the grid.
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

GoGrid Class
GoGrid Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback