Gets the current unit of measurement values set by the LAnnPolyRuler::SetUnit function.
#include "ltwrappr.h"
virtual L_UINT LAnnPolyRuler::GetUnit(pUnitAbbrev, puUnivAbbrevLen, puPrecision)
Character string to be updated with the unit abbreviation string to be displayed after the distance.
Address of the variable to be updated with the length of the unit abbreviation string.
Pointer to a variable to be updated with the number of digits to be displayed after the decimal place.
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 LAnnPolyRuler::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 LAnnPolyRuler::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.
// This example get unit in Polyruler object
L_INT LAnnPolyRuler_GetUnitExample()
{
LAnnPolyRuler annPolyRuler;
annPolyRuler.Create();
L_TCHAR UnitAbbrev[256];
L_SIZE_T uUnivAbbrevLen;
L_UINT uPrecision;
L_INT nUnit;
nUnit = annPolyRuler.GetUnit(UnitAbbrev, &uUnivAbbrevLen, &uPrecision);
return SUCCESS;
}
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