Converts the values from point units to other unit types. This function is available in the LEADTOOLS Vector Imaging Toolkit.
#include "ltwrappr.h"
virtual L_INT LVectorBase::ConvertPointToUnit(pptDst, pptSrc, UnitToUse)
Pointer to VECTORPOINT structure to be updated with the converted values.
Pointer to VECTORPOINT structure that contains the source values to be converted.
Pointer to the VECTORUNIT structure that contains unit types to which the values are converted.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
To convert values from point units to other unit types, call the LVectorBase::ConvertPointFromUnit function.
To change or retrieve the currently used unit type in the vector toolkit, call the LVectorBase::SetUnit or LVectorBase::GetUnit function.
This example converts values from points unit to Inches unit.
L_INT LVectorBase__ConvertPointToUnitExample(LVectorBase *pVector, pVECTORPOINT pPoint)
{
VECTORPOINT ConvetedPoint;
VECTORUNIT VecUnit;
L_INT nRet = 0 ;
VecUnit.nSize = sizeof(VecUnit);
VecUnit.Unit = VECTOR_UNIT_INCHES;
nRet = pVector->ConvertPointToUnit( pPoint, &ConvetedPoint, &VecUnit);
if(nRet == SUCCESS)
nRet = pVector->SetUnit( &VecUnit);
return nRet ;
}
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