L_AnnGetFillMode

Summary

Gets the fill mode and alpha of the specified annotation object.

Syntax

#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnGetFillMode(hObject, puFillMode, pnAlpha)

Parameters

HANNOBJECT hObject

Handle to the annotation object.

L_UINT * puFillMode

Pointer to a variable to be updated with the object's fill mode constant. Possible fill mode values are:

Value Meaning
ANNMODE_TRANSPARENT [0] Transparent.
ANNMODE_TRANSLUCENT [1] Translucent.
ANNMODE_OPAQUE [2] Opaque.
ANNMODE_ALPHA [3] Alpha.

L_INT * pnAlpha

Pointer to a variable to be updated with the objects alpha value. This is only valid if the fill mode puFillMode is updated with is ANNMODE_ALPHA. Possible values range from 0 255 where:

Value Meaning
0 Transparent background
255 Opaque background.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

You can use this function to get the fill mode settings for annotation objects.

Before calling L_AnnGetFillMode enable alpha background filling. You can enable alpha background filling by using the following code snippet:

L_VOID ExampleEnableOption(HANNOBJECT hAutomation) 
{ 
   L_UINT uOptions = 0; 
   L_AnnGetOptions( hAutomation); 
   L_AnnSetOptions( hAutomation, uOptions | OPTIONS_NEW_ALPHA); 
} 

The following figure displays rectangle annotation objects using different alpha values:

image\alpha.gif

Before calling this function, you must declare a variable of data type L_UINT. Then, pass the address of the variable in the puFillMode parameter. This function will update the variable with the annotation object's fill mode constant. If the returned fill mode is ANNMODE_ALPHA, then there is also a corresponding alpha value (0..255). To get the alpha value, declare a variable of type L_INT and pass the address for the puAlpha value. If you do not want the alpha value, pass NULL for the puAlpha value. Note that if the returned fill mode is anything other than ANNMODE_ALPHA, then there is no corresponding alpha value.

The ANNMODE_ALPHA parameter allows you to declare the amount of transparency of the annotation background. The alpha value can be between 0 (completely transparent) and 255 (completely opaque) inclusive.

To see the possible fill modes and patterns, refer to Illustration of Fill Options for Annotations.

Note that the L_AnnSetROP2 function and the L_AnnSetFillMode function affect each other. If you set uFillMode to:

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to L_AnnSetFillMode.

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.