LVectorBase::GetObjectParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetObjectParallelogram(pMin, pMax, dwFlags=0)

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

Parameters

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 pMin and pMax parameters. 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 current transformation on pMin and pMax before returning.

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 vector handle.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example obtains drawing physical extents.

L_INT LVectorBase__GetObjectParallelogramExample(HWND hWnd, LVectorBase *pVector) 
{ 
   UNREFERENCED_PARAMETER(hWnd); 
 
   L_INT          nRet; 
   VECTORPOINT    LeftTop, RightBottom; 
   POINT          LeftTop2D, RightBottom2D; 
 
   // Get drawing logical extents  
   nRet = pVector->GetObjectParallelogram(&LeftTop, &RightBottom); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   // Convert to physical to get the rect where the drawing will painted  
   nRet = pVector->LogicalToPhysical(&LeftTop2D, &LeftTop ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = pVector->LogicalToPhysical( &RightBottom2D, &RightBottom ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 

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

LEADTOOLS Vector C++ Class Library Help