L_VecGetObjectParallelogram

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecGetObjectParallelogram(pVector, pObject, pMin, pMax, dwFlags)

Gets the parallelogram that contains the specified object(s).

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

const pVECTOROBJECT pObject

Pointer to a VECTOROBJECT structure that references an object. If this parameter is not NULL, the top left point of this objects bounding parallelogram will be copied into pLeftTop and the bottom right point of the parallelogram will be copied into pRightBottom.

If this parameter is NULL, dwFlags will control which objects parallelogram to copy into pLeftTop and pRightBottom.

pVECTORPOINT pMin

Pointer to a VECTORPOINT structure to be updated with the minimum point of the bounding parallelogram of the specified object.

pVECTORPOINT pMax

Pointer to a VECTORPOINT structure to be updated with the maximum point of the bounding parallelogram of the specified object.

L_UINT32 dwFlags

Flag that indicates which parallelogram to use when updating the pLeftTop and pRightBottom parameters. This flag is valid only if pObject is NULL. If pObject is not NULL, this parameter is ignored. Possible values are:

Value Meaning
0 pMin and pMax will be updated with the parallelogram containing all objects within the vector handle.
VECTOR_FLAGS_SELECTED_ONLY pMin and pMax will be updated with the parallelogram containing all selected objects within the vector handle.
VECTOR_FLAGS_TRANSFORMED Apply transformation settings on pMin and pMax to be updated with the parallelogram.

Returns

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

Comments

Obtains the bounding parallelogram of a single object, several selected objects, or all objects within the specified vector handle.

Required DLLs and Libraries

See Also

Functions

Example

This example will show the logical extent of the drawing, in a message box.

L_LTVKRNTEX_API L_INT VecGetObjectParallelogramExample(pVECTORHANDLE pVector) 
{ 
   L_INT nRet; 
   VECTORPOINT    Min;              /* Left-top point */ 
   VECTORPOINT    Max;              /* Right-bottom point */ 
   L_TCHAR        szBuffer[ 80 ];   /* Buffer */ 
 
   /* Get the parallelogram of all objects */ 
   nRet = L_VecGetObjectParallelogram( pVector, NULL, &Min, &Max, 0L ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Format into a buffer */ 
   _stprintf_s( szBuffer,80, TEXT("%.3f, %.3f, %.3f - %.3f, %.3f, %.3f"), 
               Min.x, Min.y, Min.z, 
               Max.x, Max.y, Max.z ); 
 
   /* Show in a message box */ 
   MessageBox( NULL, szBuffer, TEXT("Drawing extent"), 0 ); 
 
   return SUCCESS; 
} 

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

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