L_VecGetObjectParallelogram

#include "lvkrn.h"

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

const pVECTORHANDLE pVector;

pointer to a vector handle

const pVECTOROBJECT pObject;

pointer to a vector object

pVECTORPOINT pMin;

pointer to a VECTORPOINT structure

pVECTORPOINT pMax;

pointer to a VECTORPOINT structure

L_UINT32 dwFlags;

flag

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

Parameter Description
pVector Pointer to a vector handle.
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.
pMin Pointer to a VECTORPOINT structure to be updated with the minimum point of the bounding parallelogram of the specified object.
pMax Pointer to a VECTORPOINT structure to be updated with the maximum point of the bounding parallelogram of the specified object.
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

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

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_VecSelectObject, L_VecIsObjectSelected, L_VecGetObjectRect

Example

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

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 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C API Help