Fixed Annotations

(Document and Medical Imaging toolkits)

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:

L_AnnSetScalarX

L_AnnSetScalarY

L_AnnGetScalarX

L_AnnGetScalarY

Offsets:

L_AnnSetOffsetX

L_AnnSetOffsetY

L_AnnGetOffsetX

L_AnnGetOffsetY

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:

L_AnnSetTextFixedSize

L_AnnGetTextFixedSize

L_AnnSetLineFixedWidth

L_AnnGetLineFixedWidth

L_AnnGetFixed

L_AnnSetFixed

L_AnnPushFixedState

L_AnnPopFixedState

L_AnnIsFixedInRect

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

Help Version 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.