Sets the unit of measurement for the rulers used by those objects that use rulers.
#include "ltwrappr.h"
virtual L_INT LAnnPolyRuler::SetUnit(uUnit, pUnitAbbrev, uPrecision, uFlags)
The unit of measure of the ruler. Possible values are:
Value | Meaning |
---|---|
ANNUNIT_INCH | [0x0000] inches |
ANNUNIT_FEET | [0x0001] feet |
ANNUNIT_YARDS | [0x0002] yards |
ANNUNIT_MICROMETERS | [0x0003] micrometers |
ANNUNIT_MILLIMETERS | [0x0004] millimeters |
ANNUNIT_CENTIMETERS | [0x0005] centimeters |
ANNUNIT_METERS | [0x0006] meters |
ANNUNIT_TWIPS | [0x0007] twips |
ANNUNIT_POINTS | [0x0008] points |
ANNUNIT_PIXELS | [0x0009] pixels |
ANNUNIT_SMART_METRIC | [0x000A] Smart Metric |
ANNUNIT_SMART_ENGLISH | [0x000B] Smart English |
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.
Number of digits to be displayed after the decimal place.
Reserved for future versions, use 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The following annotation objects utilize one or more rulers as part of the annotation:
In addition, the Polyruler object (ANNOBJECT_POLYRULER) 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. 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 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.
Win32, x64.
For an example, refer to LAnnPolyRuler::GetDistance
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document