Gets the physical bounding rectangle for the specified object(s).
#include "ltwrappr.h"
virtual L_INT LVectorBase::GetObjectRect(pRect, dwFlags=0)
Pointer to a RECT structure to be updated with the bounding rectangle of the specified object(s).
Flag that indicates which rectangle to use when updating the pRect parameter. Possible values are:
Value | Meaning |
---|---|
0 | pRect will be updated with the rectangle containing all objects within the vector handle. |
VECTOR_FLAGS_SELECTED_ONLY | pRect will be updated with the rectangle containing all selected objects within the vector handle. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Obtains the physical bounding rectangle of a single object, all selected objects, or all objects within the specified vector handle.
LVectorBase::GetObjectRect()
Shows the physical extent of the all objects inside drawing.
L_INT LVectorBase__GetObjectRectExample(HWND hWnd)
{
L_INT nRet;
RECT rect;
L_TCHAR szBuffer[100];
LVectorBase Vector;
nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf")));
if(nRet != SUCCESS)
return nRet;
nRet = Vector.AttachToWindow(hWnd);
if(nRet != SUCCESS)
return nRet;
GetClientRect(hWnd, &rect);
nRet = Vector.SetViewport(&rect);
if(nRet != SUCCESS)
return nRet;
// Get the rectangle of entire object
nRet = Vector.GetObjectRect(&rect);
if(nRet != SUCCESS)
return nRet;
wsprintf( szBuffer, TEXT("%d, %d, %d, %d"),
rect.left, rect.top, rect.right, rect.bottom );
MessageBox( NULL, szBuffer, TEXT("Selected Objects Physical Extent"), 0 );
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.