AnnSetROP2 method (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AnnSetROP2(HANNOBJECT hObject, unsigned uROP2, bool bSelected)

Delphi Syntax

Function AnnSetROP2(hObject: HANNOBJECT; uROP2: L_UINT; bSelected: Boolean): L_INT

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the ROP2 code for one or more annotation objects. ROP2 codes specify how pen or brush colors are to be combined with the colors in the image.

It is possible to use the AnnSetROP2 method to turn a simple rectangle into a hilite-type object. This is the only way to have a hilite object that has different colors for border and interior. To do that, draw a rectangle with a thick border, choose different foreground and background colors (using the AnnSetForeColor method and the AnnSetBackColor method), and then call this method with uROP2 set to ANNROP2_AND.

The AnnSetROP2 method is valid only for the following object types:

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_CURVE

ANNOBJECT_CURVECLOSED

ANNOBJECT_ELLIPSE

ANNOBJECT_FREEHAND

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_LINE

ANNOBJECT_POINTER

ANNOBJECT_POINT

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RECT

ANNOBJECT_RULER

ANNOBJECT_STAMP

ANNOBJECT_TEXTPOINTER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores ROP2 settings along with the other object default settings

For descriptions of the various types of objects and their properties, refer to Types of Annotations.

Note that the AnnSetROP2 method and the AnnSetFillMode method affect each other. If you set nFillMode to ANNFILLMODE_OPAQUE, then nROP2 cannot be ANNROP2_AND. If you set nFillMode to ANNFILLMODE_TRANSLUCENT, then nROP2 has to be ANNROP2_AND. If you set nFillMode to ANNFILLMODE_TRANSPARENT, nROP2 can be anything.

Use the AnnGetROP2 method to obtain the ROP2 code being used for one or more annotation objects.

When working with automated annotations, note that it is possible to change the color of the pen that is used for highlighting and selecting by setting the AnnAutoHilightPen property for that automation object.

See Also

Elements

AnnGetROP2 method, AnnGetFillMode method, AnnSetFillMode method, AnnGetTransparent method, AnnSetTransparent method.

Topics

Annotations (Document/Medical only): Object Manipulation

 

Altering Annotation Object Settings

 

Drawing Simple Objects

 

Using Color Values in LEADTOOLS

 

Changing the Annotation Automation Pen Highlight Color