AnnAdjustPoint method (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AnnAdjustPoint(double dAnchorX, double dAnchorY, double dMoveX, double dMoveY, double dAngle, int nType)

Delphi Syntax

AnnAdjustPoint (dAnchorX: L_DOUBLE; dAnchorY: L_DOUBLE; dMoveX: L_DOUBLE; dMoveY: L_DOUBLE; dAngle: L_DOUBLE; nType: L_INT ): L_INT

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Modifies the point (dMoveX,d MoveY) based on the angle between line (dAnchor, dMove) and the horizontal.

This utility method is used when creating custom annotation objects. It can be used to calculate the horizontal, vertical, or 45 degree component of a rotated annotation object. It can also be used to easily restrict the mouse cursor on rotated annotation objects.

As an example, consider a rectangle that is rotated 35 degrees in the clockwise direction.

image\Ann14doc.gif

The user has clicked on the Anchor point, and moved the mouse to the Move point.

To find the horizontal component of the line that goes from (Anchor, Move), make the following call, and the (dMoveX, dMoveY) point is adjusted to contain only the horizontal component.

The adjusted (dMoveX, dMoveY) point can be seen in step 4.

Conceptually, the following occurs:

1.

Initial situation

2.

Points and rectangle are rotated 35 degrees counter clockwise

3.

Move point is adjusted to contain only the horizontal component

4.

Points and rectangle are rotated 35 degrees clockwise to the adjusted Move point.

See Also

Elements:

AnnHitTestExt method, AnnRotateAngle property, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method

Topics:

Annotations: Object Manipulation

 

Annotations (Document/Medical only): Implementing Automation

 

Annotations (Document/Medical only): Creating and Deleting Annotations

 

Displaying and Manipulating Annotation Objects