typedef struct tagANNTEXTOPTIONS
{
L_UINT uStructSize; // size of this structure
L_UINT uFlags;
L_BOOL bShowText; // TRUE if you want to show the text
L_BOOL bShowBorder; // TRUE if you want to show the border
COLORREF crText;
L_INT32 nReserved;
} ANNTEXTOPTIONS, *pANNTEXTOPTIONS;
Provides information about the text options for text annotation objects, including the Automation object.
Size of this structure. Use sizeof(ANNTEXTOPTIONS)
Flags that identify which fields are valid, or to execute an operation that does not depend on a field. Possible values are one or more of the following constants "or"ed together. Possible values are:
Value | Meaning |
---|---|
ANNTEXT_SHOW_TEXT (0x001) | The bShowText field is valid. |
ANNTEXT_SHOW_BORDER (0x002) | The bShowBorder field is valid. |
ANNTEXT_TEXTCOLOR (0x004) | The crText field is valid. |
ANNTEXT_TEXTBACKCOLOR (0x008) | nReserved is valid and corresponds to the RTF text background color. |
ANNTEXT_RTF (0x010) | All flags are applied to ANNOBJECT_RTF objects (in addition to other text objects). |
ANNTEXT_ALL | Logical or of (ANNTEXT_SHOW_TEXT | ANNTEXT_SHOW_BORDER | ANNTEXT_TEXTCOLOR). |
Boolean value that indicates whether you want to show the text. Possible values are:
Value | Meaning |
---|---|
TRUE | Show the text. |
FALSE | Do not show the text. |
Boolean value that indicates whether you want to show the border. Possible values are:
Value | Meaning |
---|---|
TRUE | Show the border. |
FALSE | Do not show the border. |
A COLORREF value that represents the color to be used for the text.
A COLORREF value that represents the color to be used for the background text in the ANNOBJECT_RTF.
The ANNTEXTOPTIONS structure is used with the L_AnnSetTextOptions and L_AnnGetTextOptions functions to get or set the text options for text annotation objects, including the Automation object. If the annotation objects are container, automation, text, text pointer, stamp, note, pushpin, or button objects it is possible to use these functions to set the objects to show or hide the text and to set the color of the text. In addition, if the annotation objects are text or stamp objects these functions can set the objects to show or hide the borders of the object. These features must be enabled using the L_AnnSetOptions function before they can be used.
When calling the GetTextOptionsfunction, the uFlags
field identifies which fields to retrieve. When calling the SetTextOptions function, the uFlags
field identifies which fields to set.
When you create an object in the automation mode, the values for bShowText
, bShowBorder
, and crText
are taken from the Automation object.
The default value for bShowText
is TRUE, which means that text objects will show text. The default value for crText
is red (RGB(255,0,0). This flag applies to all text objects including:
The default value for bShowBorder
is TRUE. This flag affects the following objects:
These values can be changed through automation by right clicking the object, and choosing Properties->Text.
This function can also be used to change to properties of an ANNOBJECT_RTF.
To change the text foreground color of an ANNOBJECT_RTF:
crText
member to the desired text foreground colorTo change the text background color of an ANNOBJECT_RTF:
nReserved
member to the desired text background colorTo disable drawing of the border of an ANNOBJECT_RTF:
bShowBorder
member to FALSE
For an example, refer to L_AnnGetTextOptions
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document