GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoView Class / SnapPoint Method
A PointF in document coordinates.
the GoObject being moved or resized
In This Topic
    SnapPoint Method (GoView)
    In This Topic
    Find the nearest grid point to a given point when MoveSelection or CopySelection need to snap object locations to a grid.
    Syntax
    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.
    See Also