Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Vector C++ Class Library Help

LVectorObject::GetObjectRect

Show in webframe

#include "ltwrappr.h"

virtual L_INT LVectorObject::GetObjectRect(pRect)

RECT *pRect;

/* pointer to a RECT structure */

Gets the physical bounding rectangle for the class object.

Parameter

Description

pRect

Pointer to a RECT structure to be updated with the bounding rectangle of the class object.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

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:

LVectorObject::SelectObject, LVectorObject::IsObjectSelected, LVectorObject::GetObjectRect, LVectorBase::HitTest

Topics:

Manipulating Objects or Vertices within a Vector Image

 

Vector Images: Obtaining Object Information

Example

This example will get the extents of a vector object under pPoint.

L_INT LVectorObject__GetObjectRectExample(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
   L_INT          nRet;
   LVectorObject  VectorObject;
   nRet = pVector->HitTest(pPoint, &VectorObject);
   if (nRet==SUCCESS)
   {
      RECT boundingRect;
      L_TCHAR szMsg[200];
      nRet = VectorObject.GetObjectRect(&boundingRect);
      if(nRet != SUCCESS)
         return nRet;
      wsprintf(szMsg, TEXT("GetObjectRect boundingRect[%d,%d] [%d,%d]"), 
               boundingRect.left,
               boundingRect.top,
               boundingRect.right,
               boundingRect.bottom
               );
      MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
   }
   else
      return nRet;
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.