AnnSetFillModeExt method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnSetFillModeExt(long hObject, short nFillMode, short nAlpha, VARIANT_BOOL bSelected)

Overview

Refer to Implementing Annotations

Remarks

(Document/Medical only) Sets the fill mode and alpha of the specified annotation object.

Like AnnSetFillMode method, you can use this method to set the fill mode for annotation objects. With this method, the AnnSetFillMode method has been extended to support the new fill mode ANN_FILLMODE_ALPHA.

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

VB Example:

Private Sub ExampleEnableOption_Click()
   Dim lOptions As Long
   lOptions = RasterAnn.AnnGetOptions()
   RasterAnn.AnnSetOptions (lOptions Or ANN_OPTIONS_NEW_ALPHA)
End Sub

VC++ Example:

void CAnnCOMView::ExampleEnableOption() 
{
   long lOptions;
   lOptions = m_pltAnn->AnnGetOptions();
   m_pltAnn->AnnSetOptions(lOptions | ANN_OPTIONS_NEW_ALPHA);
}

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

image\alpha.gif

The nAlpha parameter is used only if the nFillMode parameter is passed as ANN_FILLMODE_ALPHA, in which case, nAlpha can be between -1 and 255 inclusive. Values are used as follows:

bmc sqrblit.bmp}a value of -1 means to leave the existing nAlpha value unchanged

bmc sqrblit.bmp}a value of 0 means the annotation object background is completely transparent

bmc sqrblit.bmp}a value of 255 means the annotation background is completely opaque.

bmc sqrblit.bmp}any value between 0 and 255 can be used to specify a varying degree of transparency.

Note that the AnnSetROP2 method and the AnnSetFillModeExt method affect each other. If you set nFillMode to ANN_FILLMODE_OPAQUE, then nROP2 cannot be ANN_ROP2_AND. If you set nFillMode to ANN_FILLMODE_TRANSLUCENT, then nROP2 has to be ANN_ROP2_AND. If you set nFillMode to ANN_FILLMODE_TRANSPARENT, nROP2 can be anything.

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

This method applies to multiple and selected objects based on values of the bSelected parameter.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

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:

AnnSetFillMode method, AnnGetFillMode method, AnnGetFillModeExt method, AnnSetFillPattern method, AnnGetFillPattern method, AnnSetFillMode method, AnnGetPolyFillMode method, AnnSetPolyFillMode method, AnnGetROP2 method, AnnSetROP2 method, AnnSetBackColor method, AnnSetForeColor method, AnnFillMode property

Topics:

New Annotation Features of Version 14.5

 

Annotations (Document/Medical only): Object Manipulation.