LVectorBase::ConvertPointFromUnit
#include "ltwrappr.h"
virtual L_INT LVectorBase::ConvertPointFromUnit(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 a specified unit to a point unit type. 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 the unit types from 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::ConvertPointToUnit 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::ConvertPointToUnit, LVectorBase::GetUnit, LVectorBase::SetUnit |
Topics: |
|
|
Example
This example converts a unit used in vector toolkit to point unit.
L_INT LVectorBase__ConvertPointFromUnitExample(LVectorBase *pVector, pVECTORPOINT pPoint) { VECTORUNIT VecUnit; VECTORPOINT ConvetedPoint; L_INT nRet = 0; nRet = pVector->GetUnit( &VecUnit); if (nRet == SUCCESS) nRet = pVector->ConvertPointFromUnit( pPoint, &ConvetedPoint, &VecUnit); return nRet; }