Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LAnnAutomation::GetUnit

Show in webframe

#include "ltwrappr.h"

virtual L_UINT LAnnAutomation::GetUnit(pUnitAbbrev, puUnivAbbrevLen, puPrecision)

L_TCHAR * pUnitAbbrev;

/* character string to be updated with the unit abbreviation string */

L_SIZE_T *puUnivAbbrevLen;

/* address of the integer variable to be updated with the unit abbreviation string length */

L_UINT * puPrecision;

/* pointer to a variable to be updated */

Gets the current unit of measurement values set by the LAnnAutomation::SetUnit function.

Parameter

Description

pUnitAbbrev

Character string to be updated with the unit abbreviation string to be displayed after the distance.

puUnivAbbrevLen

Address of the variable to be updated with the length of the unit abbreviation string.

puPrecision

Pointer to a variable to be updated with the number of digits to be displayed after the decimal place.

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.

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.

See Also

Functions:

LAnnAutomation::SetBitmapDpiX, LAnnAutomation::SetBitmapDpiY, LAnnAutomation::GetBitmapDpiX, LAnnAutomation::GetBitmapDpiY, LAnnAutomation::SetUnit, LAnnAutomation::GetDistance, LAnnAutomation::SetGaugeLength, LAnnAutomation::GetGaugeLength, Class Members, LAnnAutomation::GetTicMarkLength, LAnnAutomation::SetTicMarkLength, LAnnotation::CalibrateRuler

Topics:

Annotation Functions: Working with the Toolbar

 

Implementing Annotations

 

Automated User Interface for Annotations

 

Using Rulers in Annotation Objects

 

Calibrating Annotation Ruler Objects

Example

For an example, refer to LAnnAutomation::GetDistance.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.