AnnSetPoints method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Syntax short AnnSetPoints(OLE_HANDLE hObject, const VARIANT FAR& vXArray, const VARIANT FAR& vYArray, long lPointCount);

Overview:  Refer to Point Annotation Object.

Remarks

(Document/Medical only) Defines the shape of an annotation object, such as a polygon, that requires multiple points.

Coordinates of an object's points are relative to its container object. The coordinates are interpreted using the container's scaling factors and offsets, which are described in Low-Level Coordinate System for Annotations.

For annotation objects that are defined by a rectangle, use the AnnRect... properties.

You can position a Point object using the following (VB):

   ReDim x(1) As Single, y(1) As Single
   x(1) = 100
   y(1) = 200
   LEAD1.AnnSetPoints hPoint, x, y, 1
   ' where x,y contain the desired position.

To set the points of a cross-product object, do the following:

   ReDim x(5) As Single, y(5) As Single
   ' Assign values for x and y from 1 through 5
   LEAD1.AnnSetPoints hXproduct, x, y, 5

hXproduct is the handle to the cross-product object. x(1),y(1) and x(2),y(2) are the points for the primary ruler. x(3),y(3) is the intersection point. x(4),y(4) and x(5),y(5) are the points for the secondary ruler.

To set the points of a protractor object, do the following:

   ReDim x(3) As Single, y(3) As Single
   ' Assign values for x and y from 1 through 3
   LEAD1.AnnSetPoints hProtractor, x, y, 3

hProtractor is the handle to the protractor object. x(1),y(1) and x(3),y(3) are the endpoints for the two rulers. x(2),y(2) is the intersection point. This is shown below:

image\annocx02.gif

When calling AnnSetPoints for an ANNOBJECT_TEXTPOINTER object, specify three points. The three points are (Upper Left), (Lower Right), (Anchor).

See Also

Elements:  AnnBringToFront method, AnnSendToBack method, AnnRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnBoundingRectTop property, AnnBoundingRectLeft property, AnnBoundingRectHeight property, AnnBoundingRectWidth property, AnnGetPointCount method, AnnGetPointX method, AnnGetPointY method

Topics:  Annotations (Document/Medical only): Automation