Annotation Automation Object

The annotation automation object (ANNOBJECT_AUTOMATION) is an object that lets you maintain default properties when using the automated annotation functions. This object has no position or dimensions. It is never placed in a container, but is associated with a root container using the LAnnAutomation::SetAutoContainer function.

The class for Automation Annotation objects is LAnnAutomation.

Any properties that you set in the automation object become the default values for any new objects that are inserted into the associated container. In addition to the properties of other object types, the automation object also has properties, such as the default toolbar selection, that control the automated user interface.

This object has an automation tool property that you can use without implementing the toolbar. For example, if you want to supply your own toolbar or menu options, you can use the automation object alone to keep track of the tool selection.

Applicable properties have the following defaults, which you can change:

Automation tool

Defaults to the selection pointer. It can be changed using the LAnnAutomation::SetTool function.

Name

Defaults to an empty string. It can be changed using the LAnnotation::SetNameOptions function.

Line width

Defaults to 0.75 points. It can be changed using the LAnnAutomation::SetLineWidth function. (Note that when displayed, the line must have a minimum width of 1 pixel.)

Line style

Defaults to solid. It can be changed using the LAnnAutomation::SetLineStyle function.

ROP2 code

Defaults to ANNROP2_COPY. It can be changed using the LAnnotation::SetROP2 function.

Transparent option

Defaults To Do Not Use Transparent Color. It can be changed using the LAnnAutomation::SetTransparent function.

Transparent Color

Defaults to White. It can be changed using the LAnnAutomation::SetTransparent function.

Fill pattern

Defaults to solid. It can be changed using the LAnnAutomation::SetFillPattern function.

Fill mode

Defaults to transparent. It can be changed using the LAnnotation::SetFillMode function. Before calling this function enable the alpha background fill mode by calling the LAnnotation::SetOptions function.

Polygon fill mode

Defaults to winding. It can be changed using the LAnnAutomation::SetPolyFillMode function.

Foreground color

Defaults to red. It can be changed using the LAnnAutomation::SetForeColor function.

Background color

Defaults to white. It can be changed using the LAnnAutomation::SetBackColor function. The default does not affect highlight, redaction, or note objects.

Note Background Color

Defaults to yellow. It can be changed using the LAnnNote::SetBackColor function.

Redact Background Color

Defaults to black. It can be changed using the LAnnRedact::SetBackColor function.

Hilite Background Color

Defaults to yellow. It can be changed using the LAnnHilite::SetBackColor function.

Font size

Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the LAnnAutomation::SetFontSize function.

Font underline

Defaults to FALSE. It can be changed using the LAnnAutomation::SetFontUnderline function.

Font strikethrough

Defaults to FALSE. It can be changed using the LAnnAutomation::SetFontStrikeThrough function.

Font italic

Defaults to FALSE. It can be changed using the LAnnAutomation::SetFontItalic function.

Font bold

Defaults to FALSE. It can be changed using the LAnnAutomation::SetFontBold function.

Font name

Defaults to "Arial". It can be changed using the LAnnAutomation::SetFontName function.

Button Font

Defaults to a regular MS Sans Serif red font at 10 points.

Hotspot Metafile

Defaults to a campfire graphic. It can be changed using the LAnnXXX::SetMetafile function.

Encrypt Metafile

Defaults to an image of a black skeleton key. It can be changed using the LAnnEncrypt::SetMetafile function.

Decrypt Metafile

Defaults to an image of a red skeleton key. It can be changed using the LAnnEncrypt::SetMetafile function.

Ruler

Defaults to Show Length and Show Tic Marks, using smart English as the measurement unit with a precision of 2, and a tic mark length of 30. These options can be changed using the LAnnRuler::SetShowFlags function, the LAnnRuler::SetGaugeLength function, the LAnnRuler::SetTicMarkLength, and the LAnnRuler::SetUnit function.

Nodes

Defaults to displaying every node. It can be changed using the LAnnXXX::SetNodes function.

Protractor

Defaults to drawing the inside angle in degrees with a precision of 2 and at an arc radius of 30. These options can be changed using the LAnnProtractor::SetProtractorOptions and the LAnnAutomation::SetShowFlags function.

Point

Defaults to using a bitmap and not using transparent color. These options can be changed using the LAnnPoint::SetTransparent function, LAnnPoint::SetTransparentColor function, the LAnnPoint::SetPredefinedBitmap function, and the LAnnPoint::SetBitmap function.

Encrypt

Defaults to Encryptor. Set encryption options using the LAnnEncrypt::SetEncryptOptions function.

Fixed State

Defaults to not fixed. It can be changed using the LAnnXXX::SetFixed function.

Hyperlink

Defaults to ANNLINK_NONE. It can be changed using the LAnnotation::SetHyperlink function.

Menus enabled

Defaults to TRUE. It can be changed using the LAnnAutomation::SetAutoMenuEnabled function.

Automation text strings

Default to hard-coded strings for menus and dialog boxes. Strings can be changed using the LAnnAutomation::SetAutoText function.

Highlight Pen Color

Defaults to white. It can be changed using the LAnnAutomation::SetAutoHilightPen function.

Additional automation properties can be set with the following functions. For details, see the corresponding documentation.

LAnnAutomation::SetAutoContainer

LAnnAutomation::SetAutoCursor

LAnnAutomation::SetAutoDialogFontSize

LAnnAutomation::SetAutoDrawEnabled

LAnnAutomation::SetAutoMenuEnabled

LAnnAutomation::SetAutoOptions

LAnnAutomation::SetAutoText

LAnnAutomation::SetAutoUndoEnable

LAnnAutomation::SetBitmapDpiX

LAnnAutomation::SetBitmapDpiY

LAnnAutomation::SetDpiX

LAnnAutomation::SetDpiY

LAnnAutomation::SetEncryptOptions

LAnnAutomation::SetFillPattern

LAnnAutomation::SetFixed

LAnnAutomation::SetGaugeLength

LAnnotation::SetHyperlink

LAnnAutomation::SetHyperlinkMenuEnabled

LAnnAutomation::SetLineStyle

LAnnAutomation::SetLineWidth

LAnnAutomation::SetNodes

LAnnAutomation::SetPointOptions

LAnnAutomation::SetPolyFillMode

LAnnAutomation::SetShowFlags

LAnnAutomation::SetTextAlign

LAnnAutomation::SetTextExpandTokens

LAnnAutomation::SetTextPointerFixed

LAnnAutomation::SetTextRotate

LAnnAutomation::SetTextRTF

LAnnAutomation::SetTicMarkLength

LAnnAutomation::SetTool

LAnnAutomation::SetTransparentColor

LAnnAutomation::SetUndoDepth

LAnnAutomation::SetUnit

LAnnContainer::SetGrouping

LAnnPushPin::SetSecondaryBitmap

LAnnContainer::SetUserMode

LAnnContainer::SetWnd

LAnnotation::SetActiveState

LAnnotation::SetAutoBackColor

LAnnotation::SetAutoDefaults

LAnnotation::SetAutoMenuItemEnable

LAnnotation::SetAutoMenuState

LAnnotation::SetBackColor

LAnnotation::SetFontBold

LAnnotation::SetFontItalic

LAnnotation::SetFontName

LAnnotation::SetFontSize

LAnnotation::SetFontStrikethrough

LAnnotation::SetFontUnderline

LAnnotation::SetForeColor

LAnnotation::SetNameOptions

LAnnotation::SetOffsetX

LAnnotation::SetOffsetY

LAnnotation::SetPredefinedMetafile

LAnnotation::SetRect

LAnnotation::SetRestrictToContainer

LAnnotation::SetROP2

LAnnotation::SetScalarX

LAnnotation::SetScalarY

LAnnotation::SetSelected

LAnnotation::SetTag

LAnnotation::Rotate

LAnnotation::SetUser

LAnnotation::SetUserData

LAnnotation::SetVisible

LAnnPoint::SetPoints

LAnnPoint::SetPredefinedBitmap

LAnnProtractor::SetProtractorOptions

LAnnStamp::SetMetafile

LAnnToolBar::SetButtonVisible

LAnnToolBar::SetToolChecked

LAnnStamp::SetTransparent

LAnnotation::GetOptions

LAnnotation::SetOptions

LAnnotation::GetFillMode

LAnnotation::SetFillMode

LAnnotation::CalibrateRuler

LAnnotation::SetTextOptions

LAnnotation::GetTextOptions

LAnnotation::GetRotateOptions

LAnnotation::SetRotateOptions

LAnnotation::GetAutoSnapCursor

LAnnotation::SetAutoSnapCursor

Use the LAnnotation::SetOptions function and the LAnnotation::GetOptions function to control the following features:

For more information about these features, refer to Key Annotation Features

If the annotation objects are container, automation, text, text pointer, stamp, note, pushpin, or button objects it is possible to use the LAnnotation::GetTextOptions and the LAnnotation::SetTextOptions 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 LAnnotation::SetOptions function.

The LAnnotation::SetFillMode and the LAnnotation::GetFillMode extends the original functions to support the ANNMODE_ALPHA fill mode. Before calling these two functions, enable the alpha background fill mode by calling the LAnnotation::SetOptions function.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations.

Annotation Functions: Creating Custom Annotations

Fixed Annotations

Using Annotation Bitmap Objects

Using Rulers in Annotation Objects