Diagram.DoHitTest 方法

定义

重载

DoHitTest(DiagramClientView, PointD, List<ShapeElement>, Boolean)

执行命中测试并返回 shapesHit 参数中的信息。

DoHitTest(PointD, DiagramHitTestInfo, Boolean)

执行命中测试并返回 DiagramHitTestInfo 参数中的信息。 关系图本身被视为 ShapeElement,如果命中,将返回。

DoHitTest(DiagramClientView, PointD, List<ShapeElement>, Boolean)

执行命中测试并返回 shapesHit 参数中的信息。

public:
 virtual bool DoHitTest(Microsoft::VisualStudio::Modeling::Diagrams::DiagramClientView ^ view, Microsoft::VisualStudio::Modeling::Diagrams::PointD point, System::Collections::Generic::List<Microsoft::VisualStudio::Modeling::Diagrams::ShapeElement ^> ^ shapesHit, bool includeTolerance);
public virtual bool DoHitTest (Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView view, Microsoft.VisualStudio.Modeling.Diagrams.PointD point, System.Collections.Generic.List<Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement> shapesHit, bool includeTolerance);
override this.DoHitTest : Microsoft.VisualStudio.Modeling.Diagrams.DiagramClientView * Microsoft.VisualStudio.Modeling.Diagrams.PointD * System.Collections.Generic.List<Microsoft.VisualStudio.Modeling.Diagrams.ShapeElement> * bool -> bool
Public Overridable Function DoHitTest (view As DiagramClientView, point As PointD, shapesHit As List(Of ShapeElement), includeTolerance As Boolean) As Boolean

参数

point
PointD

点在世界上,相对于关系图的左上角。

shapesHit
List<ShapeElement>

将接收命中形状列表的对象。

includeTolerance
Boolean

如果确定是否点击了形状,则为 true。

返回

Boolean

如果已命中形状,则为 true; 否则为 false。

适用于

DoHitTest(PointD, DiagramHitTestInfo, Boolean)

执行命中测试并返回 DiagramHitTestInfo 参数中的信息。 关系图本身被视为 ShapeElement,如果命中,将返回。

public:
 override bool DoHitTest(Microsoft::VisualStudio::Modeling::Diagrams::PointD point, Microsoft::VisualStudio::Modeling::Diagrams::DiagramHitTestInfo ^ hitTestInfo, bool includeTolerance);
public override bool DoHitTest (Microsoft.VisualStudio.Modeling.Diagrams.PointD point, Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo hitTestInfo, bool includeTolerance);
override this.DoHitTest : Microsoft.VisualStudio.Modeling.Diagrams.PointD * Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo * bool -> bool
Public Overrides Function DoHitTest (point As PointD, hitTestInfo As DiagramHitTestInfo, includeTolerance As Boolean) As Boolean

参数

point
PointD

点在世界上,相对于关系图的左上角。

hitTestInfo
DiagramHitTestInfo

将接收命中测试结果的对象。

includeTolerance
Boolean

如果确定是否点击了形状,则为 true。

返回

Boolean

如果已命中形状,则为 true; 否则为 false。

适用于