AnnCalibrateRuler method (ILEADRasterAnnotation)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short AnnCalibrateRuler(long hObject, double dCalibrateLength, long lCalibrateUnit, double dDpiRatioXtoY);

Overview

Refer to Implementing Annotations.

Remarks

(Document/Medical only) Calibrates an ANN_OBJECT_RULER annotation object.

Call this method to calibrate an ANN_OBJECT_RULER object. This function is used to assign a specific length to any existing ANN_OBJECT_RULER object.

Note that this method only works on ANN_OBJECT_RULER objects, but can be used to indirectly calibrate other objects.

The dDpiRatioXtoY is the ratio of the horizontal resolution of the image (dots per inch or ‘DPI’) to the vertical resolution of the image. For most images, the horizontal resolution and the vertical resolution are the same, so this value will be 1.0. However for some fax images, the horizontal resolution is twice the vertical resolution (this would correspond to a dDpiRatioXtoY of 2.0). The dDpiRatioXtoY must be between (1/100) and 100 inclusive.

While this function only works on ANN_OBJECT_RULER objects, it can be used indirectly to calibrate any or all ruler objects, including ANN_OBJECT_POLYRULER, ANN_OBJECT_CROSSPRODUCT, and ANN_OBJECT_POLYRULER. To do this, calibrate an ANN_OBJECT_RULER object, get the resulting resolutions, and assign this resolution to all objects in the container. The example illustrates how to do this.

If you pass a negative value to the dDpiRatioXtoY parameter, the ERROR_INV_PARAMETER error will be returned.

Note:

In Version 14.5, you need to first enable this function by calling the AnnSetOptions method with the ANN_OPTIONS_NEW_CALIBRATE_RULER flag set. For more information, refer to New Annotation Features of Version 14.5.

See Also

Elements:

AnnGetBitmapDpiX method, AnnGetBitmapDpiY method, AnnSetBitmapDpiX method, AnnSetBitmapDpiY method, AnnSetUnit method, AnnGetUnit method, AnnGetDistance method, AnnGetDistance2 method.

Topics:

Annotations (Document/Medical only): Object Manipulation

 

Calibrating Annotation Ruler Objects

 

New Annotation Features of Version 14.5

 

Using Rulers In Annotation Objects