LAnnAutomation::SetUnit

#include "ltwrappr.h"

virtual L_INT LAnnAutomation::SetUnit(uUnit, pUnitAbbrev, uPrecision, uFlags=0)

L_UINT uUnit;

the unit of measurement to set

L_TCHAR * pUnitAbbrev;

character string containing the unit abbreviation string

L_UINT uPrecision;

number of digits to be displayed after the decimal place

L_UINT uFlags;

reserved for future versions

Sets the unit of measurement for the rulers used by those objects that use rulers.

Parameter Description
uUnit The unit of measure of the ruler. Possible values are:
  Value Meaning
  ANNUNIT_INCHES [0] inches
  ANNUNIT_FEET [1] feet
  ANNUNIT_YARDS [2] yards
  ANNUNIT_MICROMETERS [3] micrometers
  ANNUNIT_MILLIMETERS [4] millimeters
  ANNUNIT_CENTIMETERS [5] centimeters
  ANNUNIT_METERS [6] meters
  ANNUNIT_TWIPS [7] twips
  ANNUNIT_POINTS [8] points
  ANNUNIT_PIXELS [9] pixels
  ANNUNIT_SMART_METRIC [10] Smart Metric
  ANNUNIT_SMART_ENGLISH [11] Smart English
  ANNUNIT_DISPLAY [12] Display (1/100 inch)
  ANNUNIT_DOCUMENT [13] Document (1/300 inch)
pUnitAbbrev Character string containing the unit abbreviation string to be displayed after the distance. You can pass NULL to get the default abbreviations for the current unit of measurement.
uPrecision Number of digits to be displayed after the decimal place.
uFlags Reserved for future versions, use 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The following annotation objects utilize one or more rulers as part of the annotation:

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RULER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores default ruler settings along with the other object default settings.

To determine the unit of measure for each ruler as well as its precision, call the LAnnAutomation::GetUnit function or the LAnnRuler::GetUnit function. The default unit of measure for Ruler, Polyruler, and Crossproduct objects is Smart English. With the smart units, the unit changes with the length. For example, if the length is 11 inches (assuming the default precision of 2 is being used), "11.00 in" displays whereas if the length is 15 inches, "1 ft 3.00 in" displays. Call the LAnnAutomation::SetUnit or the LAnnRuler::SetUnit function to set the unit of measurement and its precision for the ruler. The precision indicates how many digits to display to the right of the decimal point in the length.

Refer to Annotation Automation Object.

Required DLLs and Libraries

LTANN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help