GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoGrid Class / CanSnapPoint Method
a PointF in document coordinates
the object being moved or resized (may be null/nothing)
the GoView in which the snapping is occuring; may be null/nothing
In This Topic
    CanSnapPoint Method (GoGrid)
    In This Topic
    This predicate is called by GoView.GoView.SnapPoint to decide whether this grid should take part.
    Syntax
    public virtual bool CanSnapPoint( 
       PointF p,
       GoObject obj,
       GoView view
    )

    Parameters

    p
    a PointF in document coordinates
    obj
    the object being moved or resized (may be null/nothing)
    view
    the GoView in which the snapping is occuring; may be null/nothing

    Return Value

    Remarks
    This considers the SnapDrag property (or the SnapResize property if resizing). If view is not null and the current Tool is either GoToolResizing or GoToolDragging, this method checks whether the GoView.LastInput point is within the grid; if the view is null or another type of tool is currently in use, it checks whether the given point p is within the grid. This predicate is false if GoObject.CanView returns false, but this predicate is not affected by the value of Style or any other properties that control this grid's appearance. To avoid confusion in some common cases, this predicate is also false if the obj is this grid itself, or if this grid GoObject.IsChildOf the obj, or if this grid is part of the view's Selection.
    See Also