typedef struct tagANNSMARTDISTANCE
{
L_UINT uStructSize; // sizeof(ANNSMARTDISTANCE)
L_DOUBLE dDistance; // distance in units
L_UINT uRulerUnit; // One of the ANNUNIT_XXXX constants
L_UINT uSmartUnit; // One of the ANNUNIT_XXXX constants
} ANNSMARTDISTANCE, *pANNSMARTDISTANCE;
The ANNSMARTDISTANCE contains information about the unit to be used for a ruler.
Member | Description | |
uStructSize | Size of this structure. Use sizeof(ANNSMARTDISTANCE) | |
dDistance | Distance in appropriate units. The field uSmartUnit identifies the unit. | |
uRulerUnit | Value that specifies the type of measurement. Can be any one of the following constants: | |
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. | |
If uRulerUnit is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual units can be found in the uSmartUnit member. If uRulerUnit is not one ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then uRulerUnit contains the unit constant. | ||
uSmartUnit | Value that specifies the base unit of measure. Always contains the unit constant. This can be any of the ANNUNIT_XXX constants EXCEPT ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH. |
A "smart unit" is a unit that can be automatically promoted to the next higher unit. For example, suppose you have a ruler that is 13 inches long. If the units of the ruler are ANNUNIT_INCHES, then the length is 13. However, if the units of the ruler are ANNUNIT_SMART_ENGLISH, then the length of the ruler is automatically promoted to feet. The length in this case would be 1.0833 feet.
For more information, see the documentation for LAnnPolyRuler::GetDistance2.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET