NShape Reference
Shape.CalculateRelativePosition Method

<< Click to Display Table of Contents >>

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

NShape Reference
Shape.CalculateRelativePosition Method

Previous pageReturn to chapter overviewNext page

Transforms absolute coordinates to a relative position.


public abstract RelativePosition CalculateRelativePosition(int x, int y)


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.





X coordinate of the absolute diagram position


Y coordinate of the absolute diagram position



See Also

CalcAbsolutePosition Method