LAnnotation::GetFillModeExt

#include "ltwrappr.h"

L_INT LAnnotation::GetFillModeExt(puFillMode, pnAlpha)

L_UINT L_FAR * puFillMode;

/* pointer to a variable to be updated with the fill mode*/

L_INT L_FAR * pnAlpha;

/* pointer to a variable to be updated with the alpha value */

Gets the fill mode and alpha of the specified annotation object. This function is available in the Document/Medical Toolkits.

Parameter

Description

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

pnAlpha

Pointer to a variable to be updated with the object’s 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

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Like LAnnotation::GetFillMode, you can use this function to get the fill mode settings for annotation objects. This function extends the LAnnotation::GetFillMode function to support the new fill mode ANNMODE_ALPHA.

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

L_VOID ExampleEnableOption(LAnnAutomation& annAutomation)
{
   L_UINT nRet, uOptions = 0;
   nRet = annAutomation.GetOptions( &uOptions);
   nRet = annAutomation.SetOptions( 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 pnAlpha value. If you do not want the alpha value, pass NULL for the pnAlpha 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 LAnnotation::SetROP2 function and the LAnnotation::SetFillModeExt function affect each other. If you set uFillMode to ANNFILLMODE_OPAQUE, then uROP2 cannot be ANNROP2_AND. If you set uFillMode to ANNFILLMODE_TRANSLUCENT, then uROP2 has to be ANNROP2_AND. If you set uFillMode to ANNFILLMODE_TRANSPARENT, uROP2 can be anything.

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LAnnotation::GetFillMode, LAnnotation::SetFillMode, LAnnotation::SetFillModeExt, LAnnAutomation::SetFillPattern, LAnnAutomation::GetFillPattern, LAnnAutomation::GetPolyFillMode, LAnnAutomation::SetPolyFillMode, LAnnotation::GetROP2, LAnnotation::SetROP2, LAnnotation::SetBackColor, LAnnotation::SetForeColor, LAnnotation::GetOptions, LAnnotation::SetOptions

Topics:

New Annotation Features of Version 14.5

 

Annotation Functions (Document/Medical only) Displaying Annotations

 

Implementing Annotations

 

Annotation Functions: Object Information

 

Annotation Functions: Object Properties

 

Illustration of Fill Options for Annotations.

 

User Interface for Container and Automation Objects

 

Displaying and Manipulating Annotation Objects

 

Container Annotation Object

 

Annotation Automation Object

 

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

Example

For an example, refer to LAnnotation::SetFillModeExt.