WPF Fixed Annotations

Show in webframe

Note: This topic is for Document/Medical only.

Most annotation objects can be "fixed". When an annotation is 'fixed', it gets drawn using a default annotation container transform. The container transform is manipulated using the AnnContainer.Transform property.

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 container. Zooming and scrolling will move the underlying image and non-fixed annotations, but fixed annotations will not move. The annotation can still be moved by selecting and dragging the annotation with the mouse.

A fixed annotation object could be desireable in certain situation, for example, if you do not want the thickness of a line object to grow larger or smaller when the container is zoomed in and out, you set its fixed state to PenWidth. If you have a ruler object and you do not want the thickness of its line nor the size of its font to change when the container zoomes in and out, you set its fixed state to FontSize | PenWidth.

Fixing an annotation is easily accomplished using automation. Right-click the annotation, select the Fixed menu item.

With code, fixing an annotation is performed with the AnnObject.FixedState property. By default the value of this property is

This property type is AnnFixedStateOperations.None which means the object is not fixed and will zoom and scroll whenever the container zooms and scrolls, also, its pen size and font size will scale up and down upon zooming.

You can change this property by using any combination of the following:

Member Description
AnnFixedStateOperations.None

The object is not fixed and will scale up and down when the container zooms in and out. This is the default behavior.

AnnFixedStateOperations.Scrolling

Use this to prevent the object from moving when the container scrolls. This will result with an object with fixed position.

AnnFixedStateOperations.Zooming

Use this to prevent the object from scaling up and down (resizing) when the container is zoomed in or out. This will result with an object with a fixed size.

AnnFixedStateOperations.FontSize

Use this to prevent the size of any text in the annotation object from changing if the container is zoomed in or out. For example, the Leadtools.Windows.Annotations.AnnRulerObject contains text for the length value, it may be desirable to prevent the text size of the length from changing if the container is zoomed in and out. If you set the font size of this ruler to 9 points and use this member in the AnnObject.FixedState property, then the font size of the ruler text will always be 9 points regardless of how much the container is zoomed in or out.

AnnFixedStateOperations.PenWidth

Use this to prevent the width of the pen used to draw an annotation object from getting thicker or thinner when the container is zoomed in or out. Setting this property will effect all parts of an annotation object.

 

 


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