Displaying and Manipulating Annotation Objects
Note: |
This topic is for Document/Medical only. |
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 object’s 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 following 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::CopyFromClipboard
LAnnotation::GetRestrictToContainer
LAnnotation::SetRestrictToContainer
LAnnotationWindow::CopyFromClipboard
LAnnotationWindow::CopyToClipboard
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::GetTransparentColor
LAnnPoint::SetTransparentColor
LAnnStamp::GetTransparentColor
LAnnStamp::SetTransparentColor
Set the color display options of any annotation object by calling the following functions:
When working with automated annotations, change the color of the pen used for highlighting and selecting by calling the following function:
LAnnAutomation::SetAutoHilightPen
Perform geometric transformations on an annotation object by calling the following functions: