AnnSetTransparentColor method (Annotation Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AnnSetTransparentColor(HANNOBJECT hObject, TColor clTransparent, bool bSelected)

Delphi Syntax

Function AnnSetTransparentColor (hObject: HANNOBJECT; clTransparent: TColor; bSelected: Boolean): L_INT

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the color to be used as a transparent color. A transparent color is not painted when painting an image. For information on how LEADTOOLS uses colors, refer to Using Colors in LEADTOOLS.

The AnnSetTransparentColor method is valid only for the following object types when they are using a bitmap:

ANNOBJECT_POINT

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores transparent color settings along with the other object default settings.

Use the AnnSetTransparent method to set such objects to use a transparent color. By default the transparent color is white (0x00FFFFFF). Use the AnnSetTransparentColor method to set the color to be used as the transparent color. Use the AnnGetTransparent method to get a value that indicates whether the bitmap being used by the annotation object is using a transparent color. Use the AnnGetTransparentColor method to get a value that indicates which color is being used as the transparent color.

This transparent color is used only if the object is set to use a transparent color by calling the AnnSetTransparent method.

If hObject is a container object, then bSelected indicates which objects to process. If hObject is an automation object, all objects created by this automation object will have this transparent color.

In design mode, the transparent color can be picked by selecting the Transparent color from the Properties menu. If the object’s bitmap has a palette, a dialog box will appear so that a color can be selected from the palette colors. If the object’s bitmap does not have a palette, the standard Windows color pick dialog box is used to select a transparent color.

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements

AnnSetTransparent method, AnnGetSelected method, AnnSetSelected method, AnnGetROP2 method, AnnSetROP2 method, AnnGetTransparentColor method, AnnGetTransparent method, AnnGetBackColor method, AnnSetBackColor method, AnnSetForeColor method, AnnGetForeColor method, AnnSetAutoBackColor method

Topics

Annotations (Document/Medical only): Object Manipulation

 

Annotations (Document/Medical only): Object Bitmap

 

Stamp Annotation Object

 

Point Annotation Object

 

Annotation Automation Object

 

Using Color Values in LEADTOOLS

 

Implementing Transparency

 

Altering Annotation Object Settings

 

Displaying and Manipulating Annotation Objects