Diagram.DoHitTest 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 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
参数
- view
- DiagramClientView
- point
- PointD
点在世界上,相对于关系图的左上角。
- shapesHit
- List<ShapeElement>
将接收命中形状列表的对象。
- includeTolerance
- Boolean
如果确定是否点击了形状,则为 true。
返回
如果已命中形状,则为 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。
返回
如果已命中形状,则为 true; 否则为 false。