次の方法で共有


ShapeGeometry.DoHitTest Method

Definition

Overloads

DoHitTest(IGeometryHost, PointD, DiagramHitTestInfo)

Returns a value indicating whether the given point is within the boundary of the geometry. The hit test results are also returned.

DoHitTest(IGeometryHost, PointD, DiagramHitTestInfo, Boolean)

Returns a value indicating whether the given point is within the boundary of the geometry. The hit test results are also returned.

DoHitTest(IGeometryHost, PointD, DiagramHitTestInfo)

Returns a value indicating whether the given point is within the boundary of the geometry. The hit test results are also returned.

public:
 bool DoHitTest(Microsoft::VisualStudio::Modeling::Diagrams::IGeometryHost ^ geometryHost, Microsoft::VisualStudio::Modeling::Diagrams::PointD hitPoint, Microsoft::VisualStudio::Modeling::Diagrams::DiagramHitTestInfo ^ hitTestInfo);
public bool DoHitTest (Microsoft.VisualStudio.Modeling.Diagrams.IGeometryHost geometryHost, Microsoft.VisualStudio.Modeling.Diagrams.PointD hitPoint, Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo hitTestInfo);
member this.DoHitTest : Microsoft.VisualStudio.Modeling.Diagrams.IGeometryHost * Microsoft.VisualStudio.Modeling.Diagrams.PointD * Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo -> bool
Public Function DoHitTest (geometryHost As IGeometryHost, hitPoint As PointD, hitTestInfo As DiagramHitTestInfo) As Boolean

Parameters

geometryHost
IGeometryHost

The instance data for the geometry.

hitPoint
PointD

The point to test. The point is in world units and is relative to the top-left of the IGeometryHost's parent.

hitTestInfo
DiagramHitTestInfo

The object which will be updated with the hit test results.

Returns

true if the given point is within the boundary of the geometry.

Remarks

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

Applies to

DoHitTest(IGeometryHost, PointD, DiagramHitTestInfo, Boolean)

Returns a value indicating whether the given point is within the boundary of the geometry. The hit test results are also returned.

public:
 abstract bool DoHitTest(Microsoft::VisualStudio::Modeling::Diagrams::IGeometryHost ^ geometryHost, Microsoft::VisualStudio::Modeling::Diagrams::PointD hitPoint, Microsoft::VisualStudio::Modeling::Diagrams::DiagramHitTestInfo ^ hitTestInfo, bool includeTolerance);
public abstract bool DoHitTest (Microsoft.VisualStudio.Modeling.Diagrams.IGeometryHost geometryHost, Microsoft.VisualStudio.Modeling.Diagrams.PointD hitPoint, Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo hitTestInfo, bool includeTolerance);
abstract member DoHitTest : Microsoft.VisualStudio.Modeling.Diagrams.IGeometryHost * Microsoft.VisualStudio.Modeling.Diagrams.PointD * Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo * bool -> bool
Public MustOverride Function DoHitTest (geometryHost As IGeometryHost, hitPoint As PointD, hitTestInfo As DiagramHitTestInfo, includeTolerance As Boolean) As Boolean

Parameters

geometryHost
IGeometryHost

The instance data for the geometry.

hitPoint
PointD

The point to test. The point is in world units and is relative to the top-left of the IGeometryHost's parent.

hitTestInfo
DiagramHitTestInfo

The object which will be updated with the hit test results.

includeTolerance
Boolean

true if the tolerance around the geometry should be included when determining if the geometry was hit.

Returns

true if the given point is within the boundary of the geometry.

Remarks

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

Applies to