L_VecGetOrigin

Summary

Gets the origin point for the specified vector handle.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecGetOrigin(pVector, pOrigin)

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

pVECTORPOINT pOrigin

Pointer to a VECTORPOINT structure to be updated with the origin point.

Returns

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

Comments

The origin of a vector drawing may change whenever new objects are added. To insure that the drawing is centered around its origin, call L_VecSetOrigin(pVector, NULL) after adding objects.

The origin point may be set using L_VecSetOrigin.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will show the origin of a vector image in a dialog box.

L_LTVKRNTEX_API L_INT VecGetOriginExample(pVECTORHANDLE pVector) 
{ 
   L_INT nRet; 
   VECTORPOINT Origin; 
   L_TCHAR     szBuffer[ 80 ]; 
 
   nRet = L_VecGetOrigin( pVector, &Origin ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   _stprintf_s( szBuffer,80, TEXT("%f, %f, %f"), Origin.x, Origin.y, Origin.z ); 
   MessageBox( NULL, szBuffer, TEXT("Origin At"), MB_OK ); 
 
   return SUCCESS; 
} 

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.