L_VecConvertPointToUnit

#include "l_bitmap.h"

L_LVKRN_API L_INT L_VecConvertPointToUnit(pVector, pptDst, pptSrc, pUnitToUse)

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

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

pVECTORPOINT pptDst

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

const pVECTORPOINT pptSrc

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

const pVECTORUNIT pUnitToUse

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

Returns

Value Meaning
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 L_VecConvertPointFromUnit function.

To change or retrive the currently used unit type in the vector toolkit, call the L_VecSetUnit or L_VecGetUnit function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example converts values from points unit to Inches unit.

L_INT VecConvertPointToUnitExample(pVECTORHANDLE pVector, pVECTORPOINT pPoint) 
{ 
   VECTORPOINT ConvetedPoint;  
   VECTORUNIT VecUnit;  
   L_INT nRet; 
 
   VecUnit.nSize = sizeof(VecUnit);  
   VecUnit.Unit = VECTOR_UNIT_INCHES;   
    
   nRet =L_VecConvertPointToUnit (pVector, pPoint, &ConvetedPoint, &VecUnit); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =L_VecSetUnit(pVector, &VecUnit); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help