L_VecConvertPointFromUnit

Summary

Converts the values from a specified unit to a point unit type. This function is available in the LEADTOOLS Vector Imaging Toolkit.

Syntax

#include "ltvkrn.h"

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

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 the unit types from 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_VecConvertPointToUnit function.

To change or retrieve 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 a unit used in vector toolkit to point unit.

L_INT VecConvertPointFromUnitExample(pVECTORHANDLE pVector, pVECTORPOINT pPoint) 
{ 
   VECTORUNIT VecUnit;  
   VECTORPOINT ConvetedPoint;  
   L_INT nRet; 
    
   nRet =L_VecGetUnit(pVector, &VecUnit); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =L_VecConvertPointFromUnit(pVector, pPoint, &ConvetedPoint, &VecUnit); 
   if(nRet !=SUCCESS) 
      return nRet; 
   return SUCCESS; 
    
} 

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

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.