NShape Reference
HitTest Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape > Shape Class >

NShape Reference
HitTest Method

Previous pageReturn to chapter overviewNext page

Tests whether the shape has a control point near the given coordinates.

Syntax

public abstract ControlPointId HitTest(int x, int y, ControlPointCapabilities controlPointCapability, int range)

Description

This method tests whether the shape has a control point near the given coordinates. The maximum difference between the hit coordinate and the control point hit is defined by the range parameter. The control points to check can be restricted by the parameter controlPointCapability. Only control points that have the defined capabilities are eligible.

Parameters

Name

Description

x, y

Defines the (mouse) coordinates to test.

controlPointCapability

Restricts the control points to check by their capabilities. ControlPointCapabilies.All fits all control points.

range

Defines the maximum distance between the hit coordinate and the control point in logical units.

Return Value

Id of hit control point or ControlPointId.None.

Exceptions

None