AnnSetPoints method (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AnnSetPoints(HANNOBJECT hObject, LPANNPOINT pPoints, unsigned uCount)

Delphi Syntax

Function AnnSetPoints (hObject: HANNOBJECT; pPoints: LPANNPOINT; uCount: L_UINT): L_INT

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 (Delphi):

var
   ptAnn: ANNPOINT;
begin
   ptAnn.x:= 100;
   ptAnn.y:= 200;
   LEADAnn1.AnnSetPoints( hPoint, @ptAnn, 1 );


end;

where ptAnn defined as ANNPOINT and contains the desired position.

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

var
   ptAnn: Array [ 0..4 ] of ANNPOINT;
begin
   // Assign values for ptAnn x and y from 0 through 4
   LEADAnn1.AnnSetPoints( hXproduct, @ptAnn, 5 );


end;

hXproduct is the handle to the cross-product object. ptAnn[0].x, ptAnn[0].y and ptAnn[1].x, ptAnn[1].y are the points for the primary ruler. ptAnn[2].x, ptAnn[2].y is the intersection point. ptAnn[3].x, ptAnn[3].y and ptAnn[4].x, ptAnn[4].y are the points for the secondary ruler.

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

var
   ptAnn: Array [ 0..4 ] of ANNPOINT;
begin
   // Assign values for ptAnn x and y from 0 through 2
   LEADAnn1.AnnSetPoints( hProtractor, @ptAnn, 3 );


end;

hProtractor is the handle to the protractor object. ptAnn[0].x, ptAnn[0].y and ptAnn[2].x, ptAnn[2].y are the endpoints for the two rulers. ptAnn[1].x, ptAnn[1].y is the intersection point. This is shown below:

image\AnnOCX02.gif

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

AnnSetPoints works only with the following types of objects:

ANNOBJECT_POINTER

ANNOBJECT_FREEHAND

ANNOBJECT_LINE

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

ANNOBJECT_POINT

ANNOBJECT_PROTRACTOR

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_TEXTPOINTER

ANNOBJECT_POLYRULER

See Also

Elements:

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): Object Manipulation