Share via


ShapeGeometry.DoHitTest Method (IGeometryHost, PointD, DiagramHitTestInfo, Boolean)

Determines whether a point is inside a shape.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)

Syntax

'Declaration
Public MustOverride Function DoHitTest ( _
    geometryHost As IGeometryHost, _
    hitPoint As PointD, _
    hitTestInfo As DiagramHitTestInfo, _
    includeTolerance As Boolean _
) As Boolean
public abstract bool DoHitTest(
    IGeometryHost geometryHost,
    PointD hitPoint,
    DiagramHitTestInfo hitTestInfo,
    bool includeTolerance
)
public:
virtual bool DoHitTest(
    IGeometryHost^ geometryHost, 
    PointD hitPoint, 
    DiagramHitTestInfo^ hitTestInfo, 
    bool includeTolerance
) abstract
abstract DoHitTest : 
        geometryHost:IGeometryHost * 
        hitPoint:PointD * 
        hitTestInfo:DiagramHitTestInfo * 
        includeTolerance:bool -> bool
public abstract function DoHitTest(
    geometryHost : IGeometryHost, 
    hitPoint : PointD, 
    hitTestInfo : DiagramHitTestInfo, 
    includeTolerance : boolean
) : boolean

Parameters

  • includeTolerance
    Type: Boolean

    true to include additional tolerance around the shape geometry when the hit test is performed; otherwise, false. If true, the test will result true even if the point is slightly outside the shape, unless there is a sibling shape directly underneath.

Return Value

Type: Boolean
true if the shape geometry was hit; otherwise, false.

Remarks

The geometry boundary includes the thickness of the outline pen that lies outside of the graphics path used to draw the geometry.

.NET Framework Security

See Also

Reference

ShapeGeometry Class

DoHitTest Overload

Microsoft.VisualStudio.Modeling.Diagrams Namespace

GetHitTestTolerance