Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

Displaying and Manipulating Annotation Objects

Show in webframe

The LAnnotation::Draw function can be used to display a specific annotation object. If the annotation object is within a container, call the LAnnotation::BringToFront or the LAnnotation::SendToBack function to alter the objects display order within the container.

The LAnnAutomation::SetAutoDrawEnabled function enables or disables the default use of the left mouse button to draw an annotation object in design mode. To implement the automated design mode for annotations, this property must be set to True.

To apply an annotation object (except for Encrypt objects, which cannot be realized) to the bitmap itself, call the LAnnotation::Realize or the LAnnContainer::Realize function. This application is permanent, except when realizing a redact object. Realized redact objects store the background behind them within the object. Call LAnnContainer::Unrealize or LAnnRedact::Unrealize to restore the background hidden by the redact object.

Call the LAnnotation::SetVisible function to make an object visible. When an object is not visible, it cannot be displayed. Some objects (notably containers) may be transparent, but if their visible-object property is True, a user can select them with a mouse. Call the LAnnotation::IsVisible function to determine whether the specified object is visible.

Use the LAnnotation::SetAutoSnapCursor function to set the automation cursor behavior when clicking outside the container. It has no effect on the behavior of the cursor when clicking inside the container. When creating annotations using automation in design mode, the user first chooses an annotation tool. Next, the user clicks the mouse in the window containing the image, either on or outside the container (annotation image).

If cursor snapping is enabled and the user clicks outside the container the cursor will "snap" to the container border, as shown in the figure.

If cursor snapping is disabled and the user clicks outside the container but in the window, drawing of the annotation object begins with the annotation object outside of the container.

The default for behavior is to have cursor snapping enabled. Use the LAnnotation::GetAutoSnapCursor function to get a value that indicates whether snapping is enabled.

The following functions may be used to work with containers and the objects they contain:

LAnnAutomation::SetAutoContainer

LAnnContainer::Convert

LAnnContainer::CopyFromClipboard

LAnnContainer::Create

LAnnContainer::GetGrouping

LAnnContainer::GetItem

LAnnContainer::GetSelectcount

LAnnContainer::GetSelectItems

LAnnContainer::GetSelectRect

LAnnContainer::HitTest

LAnnContainer::Insert

LAnnContainer::RestrictCursor

LAnnContainer::SelectPoint

LAnnContainer::SelectRect

LAnnContainer::SetGrouping

LAnnotation::BringToFront

LAnnotation::Copy

LAnnotation::CreateAnnObject

LAnnotation::CutToClipboard

LAnnotation::Define2

LAnnotation::Define

LAnnotation::Destroy

LAnnotation::Flip

LAnnotation::GetBoundingRect

LAnnotation::GetContainer

LAnnotation::GetRect

LAnnotation::GetRestrictToContainer

LAnnotation::GetScalarX

LAnnotation::GetScalarY

LAnnotation::GetTopContainer

LAnnotation::Group

LAnnotation::IsClipboardReady

LAnnotation::Lock

LAnnotation::Realize

LAnnotation::Remove

LAnnotation::Resize

LAnnotation::Reverse

LAnnotation::Rotate

LAnnotation::SendToBack

LAnnotation::SetRect

LAnnotation::SetRestrictToContainer

LAnnotation::SetScalarX

LAnnotation::SetScalarY

LAnnotation::SetSelected

LAnnotation::Ungroup

LAnnotation::Unlock

LAnnotationWindow::CopyFromClipboard

LAnnotationWindow::CopyToClipboard

LAnnotationWindow::CreateWnd

LAnnotationWindow::GetAutomationObject

LAnnotationWindow::GetContainerObject

LAnnotationWindow::GetContainerObject

LAnnotation::SetRestrictToContainer

If the annotation object(s) are Stamp or Point objects and are using a bitmap, the user can call the following functions to set transparency and the transparent color:

LAnnAutomation::GetTransparentColor

LAnnAutomation::SetTransparentColor

LAnnPoint::GetTransparent

LAnnPoint::GetTransparentColor

LAnnPoint::SetTransparent

LAnnPoint::SetTransparentColor

LAnnStamp::GetTransparentColor

LAnnStamp::GetTransparent

LAnnStamp::SetTransparent

LAnnStamp::SetTransparentColor

Set the color display options of any annotation object by calling the following functions:

LAnnotation::GetROP2

LAnnotation::SetROP2

When working with automated annotations, change or obtain the color of the pen used for highlighting and selecting by calling the following function:

LAnnAutomation::SetAutoHilightPen

LAnnAutomation::GetAutoHilightPen

Perform geometric transformations on an annotation object by calling the following functions:

LAnnFreehand::Define

LAnnFreehand::GetPointCount

LAnnotation::BringToFront

LAnnotation::Define2

LAnnotation::Define

LAnnotation::Flip

LAnnotation::Move

LAnnotation::Resize

LAnnotation::Reverse

LAnnotation::Rotate

LAnnotation::SendToBack

LAnnLine::GetPointCount

LAnnPolygon::Define

LAnnPolygon::GetPointCount

LAnnPolyline::Define

LAnnPolyline::GetPointCount

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.