LAnnotation::GetROP2

Summary

Gets a constant that indicates which binary raster operation (ROP2) code is being used for one or more objects.

Syntax

#include "ltwrappr.h"

virtual L_UINT LAnnotation::GetROP2()

Returns

The ROP2 code. Possible values are:

Value Meaning
ANNROP2_COPY [0x0000] Draw the object using the object's color
ANNROP2_AND [0x0001] Draw the object, performing an AND operation between the object's color and the background color. This creates a highlight effect. White objects become transparent.
ANNROP2_XOR [0x0002] Draw the object, performing an XOR operation between the object's color and the background color. This creates an inverted effect. Black objects become transparent.

Default is ANNROP2_COPY.

Comments

The ROP2 codes specify how pen or brush colors are to be combined with the colors in the image.

The LAnnotation::GetROP2 function is valid only for the following object types:

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

If you try to use the LAnnotation::GetROP2 function with an object that does not support it, the function returns Error (-16), which is "Feature not supported".

Call the LAnnotation::SetROP2 function to set the ROP2 code being used for one or more annotation objects.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LAnnotation_GetROP2Example(LAnnotation& LeadAnn) 
{ 
   L_INT nRet =SUCCESS; 
   L_UINT uRop2; // ROP2 code  
 
   // Get the current ROP2 code  
   uRop2 = LeadAnn.GetROP2(); 
 
   // if the code is not ANNROP2_AND, make it so 
   if(uRop2 != ANNROP2_AND) 
      nRet = LeadAnn.SetROP2( nRet = ANNROP2_AND, ANNFLAG_RECURSE); // set ROP2 code  
 
   return nRet; 
 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.