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

Fixed Annotations

Show in webframe

Most annotation objects can be "fixed". When an annotation is "fixed", it gets painted using a default annotation container transform. The container transform is manipulated using the following functions:

Scaling factors:

LAnnotation::SetScalarX

LAnnotation::SetScalarY

LAnnotation::GetScalarX

LAnnotation::GetScalarY

Offsets:

LAnnotation::SetOffsetX

LAnnotation::SetOffsetY

LAnnotation::GetOffsetX

LAnnotation::GetOffsetY

Changing the container transform is primarily used for scrolling and zooming annotations on an image.

The effect of fixing an annotation is that it is frozen on the window. Zooming and scrolling will move the underlying image and non-fixed annotations, but fixed annotations will not move. (Note that for performance reasons, fixed annotations should be used in conjunction with double buffering. For more information, see the documentation for Minimizing Flicker With Double Buffering.) The annotation can still be moved by selecting and dragging the annotation with the mouse.

Fixing an annotation is easily accomplished using automation. Right-click the annotation, select the Fixed menu item, and the following dialog appears:

 

image\FixedDialogButton.gif

 

Select the Fixed check box, and click OK. Now when you zoom or scroll the underlying image, the fixed annotation stays in place. Again, the Fixed option works best when double buffering is enabled.

Leave the Adjust check box selected. This automatically adjusts the size and location of the object before fixing or un-fixing the annotation object. The result is the annotation object will not jump around as you change its fixed state.

 

Fixing an annotation programmatically is accomplished using the following functions:

Functionality for Fixing an annotation programmatically has been added to the Annotation C++ Class Library. This functionality has been implemented by adding the LAnnXXX::GetFixed, LAnnXXX::SetFixed, LAnnXXX::PushFixedState, LAnnXXX::PopFixedState, and LAnnXXX::FixedInRect functions, where LAnnXXX represents the classes that support fixing. These classes are as follows:

LAnnAutomation

LAnnAudioClip

LAnnButton

LAnnCrossProduct

LAnnCurve

LAnnCurveClosed

LAnnEllipse

LAnnFreehand

LAnnFreehandHotSpot

LAnnHilite

LAnnHotSpot

LAnnLine

LAnnNote

LAnnPolygon

LAnnPoint

LAnnPolyline

LAnnPolyRuler

LAnnProtractor

LAnnPointer

LAnnPushPin

LAnnRectangle

LAnnRTF

LAnnRuler

LAnnStamp

LAnnText

LAnnTextPointer

LAnnVideo

Fixing an annotation can be very useful. For example, a physician might want the patient information displayed using a text annotation in the upper right hand corner of the window, regardless of how the image is scrolled or zoomed. Or you might want a button that never moves out of view even when the image is scrolled. Fixing a ruler or polyruler annotation is very useful because the ruler can be used to measure any part of an image. The tic marks and displayed units of the ruler will automatically adjust based on the zoom factor.

The following annotations cannot be fixed:

ANNOBJECT_CONTAINER

ANNOBJECT_REDACT

ANNOBJECT_ENCRYPT

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