AnnSetROP2 method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnSetROP2(long hObject, short nROP2, VARIANT_BOOL bSelected);

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the binary raster operation (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.

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

Crossproduct

Curve

Closed Curve

Ellipse

Freehand Line

Freehand Hotspot

Line

Pointer

Point

Polygon

Polyline

Polyruler

Protractor

Rectangle

Ruler

Stamp (including the Rubber Stamp tools)

Text Pointer

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

The AnnSetROP2 method can be used 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 call this method with nROP2 set to ANN_ROP2_AND.

Note that AnnSetROP2 method and the AnnSetFillModeExt method affect each other. If you set nFillMode to ANN_MODE_OPAQUE, then nROP2 cannot be ANN_ROP2_AND. If you set nFillMode to ANN_MODE_TRANSLUCENT, then nROP2 has to be ANN_ROP2_AND. If you set nFillMode to ANN_MODE_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.

If the value of the AnnContainer property is passed as the hObject parameter, the method will modify all the annotations in the container depending on the value of bSelected parameter.

If the value of the AnnAutomation property is passed as the hObject parameter, the method will modify the default values used whenever an annotation is created.

See Also

Elements

AnnAlpha property, AnnAutoSnapCursor property, AnnCalibrateRuler method, AnnFillMode property, AnnGetFillModeExt method, AnnGetOptions method, AnnGetRotateOptions method, AnnGetTextOptions method, AnnSetFillModeExt method, AnnSetOptions method, AnnSetRotateOptions method, AnnSetTextOptions method, AnnShowBorder property, AnnShowRotateHandles property, AnnShowText property, AnnTextColor property, AnnTextEdit method, AnnGetROP2 method, AnnGetFillMode method, AnnSetFillMode method, AnnSetBackColor method, AnnSetForeColor method, AnnGetSelected method, AnnSetSelected method, AnnGetTransparent method, AnnSetTransparent method

Topics

Annotations (Document/Medical only): Object Manipulation

 

Annotations (Document/Medical only): Displaying Annotations

 

Annotations (Document/Medical only): Getting and Setting Color Properties

 

Displaying and Manipulating Annotation Objects