Ruler Annotation Object

Note:

This topic is for Document/Medical only.

The ruler annotation object (ANN_OBJECT_RULER) is a simple line with gauges on both ends for measuring distance. With the automated functions, the ruler is started on a mouse-down event and completed on a mouse-up event.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

With low-level functions, you must provide the points that define the ruler. Other applicable properties have the following defaults, which you can change:

Visible

Defaults to FALSE. It can be changed using the AnnSetVisible method.

Selected

Defaults to FALSE. It can be changed using the AnnSetSelected method.

Name

Defaults to an empty string. It can be changed using the AnnSetNameOptions method.

Line width

Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)

Line style

Defaults to solid. It can be changed using the AnnSetLineStyle method.

ROP2 code

Defaults to ANN_ROP2_COPY. It can be changed using the AnnSetROP2 method.

Fill mode

Defaults to transparent. It can be changed using the AnnSetFillModeExt method. For version 14.5, before calling this method enable the alpha background fill mode by calling the AnnSetOptions method.

Foreground color

Defaults to red. It can be changed using the AnnSetForeColor method.

Background color

Defaults to white. It can be changed using the AnnSetBackColor method. The default does not affect highlight, redaction, or note objects.

Font size

Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.

Font underline

Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.

Font strikethrough

Defaults to FALSE. It can be changed using the AnnSetFontStrikeThrough method.

Font italic

Defaults to FALSE. It can be changed using the AnnSetFontItalic method.

Font bold

Defaults to FALSE. It can be changed using the AnnSetFontBold method.

Font name

Defaults to "Arial". It can be changed using the AnnSetFontName method.

Ruler show flags

Defaults to Show Length and Show Tic Marks, using smart English as the measurement unit with a precision of 2, and a tic mark length of 30. These options can be changed using the AnnSetShowFlags method, the AnnSetGaugeLength method, and the AnnSetUnit method.

Gauge length

Defaults to 30. It can be changed using the AnnSetGaugeLength method.

Unit

Defaults to ANNUNIT_SMART_ENGLISH. It can be changed using the AnnSetUnit method.

Unit abbreviation

Varies depending on the length shown. It can be changed using the AnnSetUnit method.

Precision

Defaults to 2. It can be changed using the AnnSetUnit method.

Fixed State

Defaults to not fixed. It can be changed using the AnnFixed property.

Hyperlink

Defaults to None. It can be changed using the AnnSetHyperlinkString method.

Tag (identifier)

Defaults to 0. It can be changed using the AnnSetTag method.

Window handle

Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.

User mode

Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

Related topics:

New Annotation Features of Version 14.5

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations

Using Rulers in Annotation Objects