Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Vector C++ Class Library Help

LVectorBase::ConvertPointToUnit

Show in webframe

#include "ltwrappr.h"

virtual L_INT LVectorBase::ConvertPointToUnit(pptDst, pptSrc, UnitToUse)

pVECTORPOINT pptDst;

/* pointer to a VECTORPOINT structure */

const pVECTORPOINT pptSrc;

/* pointer to a VECTORPOINT structure */

pVECTORUNIT UnitToUse;

/* pointer to a VECTORUNIT structure */

Converts the values from point units to other unit types. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

pptDst

Pointer to VECTORPOINT structure to be updated with the converted values.

pptSrc

Pointer to VECTORPOINT structure that contains the source values to be converted.

UnitToUse

Pointer to the VECTORUNIT structure that contains unit types to which the values are converted.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

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.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::ConvertPointFromUnit, LVectorBase::GetUnit, LVectorBase::SetUnit

Topics:

Vector Units Conversion

 

Vector Images: Vector Units

Example

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 ;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.