L_VecLogicalToPhysical

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecLogicalToPhysical(pVector, pDst, pSrc)

Converts a 3D VECTORPOINT into a Windows 2D POINT.

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

L_POINT *pDst

Pointer to a POINT structure to be updated with the physical 2 dimensional point converted from the 3 dimensional vector point in pSrc.

const pVECTORPOINT pSrc

Pointer to a VECTRPOINT structure that contains a 3 dimensional point to be converted into a 2 dimensional point.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Converts a given logical point in the vector drawing (with X, Y, Z coordinates), into a physical 2D point.

Conversion will be based on the current view port and camera set in the VECTORHANDLE.

Required DLLs and Libraries

See Also

Functions

Example

This example will obtain drawing physical extents.

L_INT VecLogicalToPhysicalExample( 
   pVECTORHANDLE pVector, 
   RECT* pExtent) 
{ 
   L_INT nRet; 
   VECTORPOINT LeftTop, RightBottom; 
 
   /* Get drawing logical extents */ 
   nRet = L_VecGetObjectParallelogram( pVector, NULL, &LeftTop, &RightBottom, 0L ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Convert to physical to get the rect where the drawing will be painted */ 
   nRet = L_VecLogicalToPhysical( pVector, (POINT *) &pExtent->left, &LeftTop ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = L_VecLogicalToPhysical( pVector, (POINT *) &pExtent->right, &RightBottom ); 
 
   return nRet; 
} 

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