NShape Reference
Shape.CanConnect Method

<< Click to Display Table of Contents >>

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

NShape Reference
Shape.CanConnect Method

Previous pageReturn to chapter overviewNext page

Returns true if a connection between the specified connection points of this shape and the other shape is feasible.

Syntax

public abstract bool CanConnect(ControlPointId ownPointId, Shape otherShape, ControlPointId otherPointId);

Description

CalculateRelativePosition and CalculateAbsolutePosition are used to keep track of a point relative to another shape even when that shape moves or is resized. For example, a label stores its anchor as a relative position of the labeled shape. Therefore the anchor follows all movements and modifications of the labeled shape.

Note for implementers:

The meaning of RelativePosition entirely depends on the shape. For instance, a circle shape might store the angle between itself and the coordinate in A and the number of radiuses between its center and the coordinate in B. Depending on the way, how the relative position is calculated, the point defined by this relative position moves differently when the shape is rotated, moved or resized.

Parameters

Name

Description

ownPointId

The (active or passive) control point id of this shape.

otherShape

The partner shape for the connection

otherPointId

The (passive or active) control point id of the other shape

See Also

Concepts: Connections

Connect Method

Disconnect Method