LVectorBase::IsObjectInsideRect
#include "ltwrappr.h"
virtual L_INT LVectorBase::IsObjectInsideRect(pRect, bInside, dwFlags=0)
const RECT L_FAR *pRect; |
/* pointer to a RECT structure */ |
/* pointer to a variable */ | |
L_UINT32 dwFlags; |
/* flags */ |
Determines whether the specified object(s) is (are) within the specified rectangle.
Parameter |
Description |
|
pRect |
Pointer to a RECT structure that contains information about a bounding rectangle. |
|
bInside |
Pointer to a variable to be updated with a value that indicates whether the object is inside the specified parallelogram. Possible values are: |
|
|
Value |
Meaning |
|
TRUE |
The specified object(s) is(are) within the specified parallelogram. |
|
FALSE |
The specified object(s) is(are) not within the specified parallelogram. |
dwFlags |
Flag that indicates which object(s) to test. This flag is valid only if pObject is NULL. If pObject is not NULL, this parameter is ignored. Possible values are: |
|
|
Value |
Meaning |
|
0 |
Test all objects in the vector handle to determine whether they are in the specified rectangle. |
|
VECTOR_FLAGS_SELECTED_ONLY |
Test only the selected objects within the vector handle. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The rectangle is given in screen (physical) coordinates.
The current view port, pan position, camera, scale, translation and rotation values are all considered when determining whether the object is within the rectangle.
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: |
LVectorBase::IsObjectInsideParallelogram, LVectorBase::GetObjectParallelogram, LVectorBase::GetObjectRect, LVectorObject::IsObjectInsideRect |
Topics: |
|
|
Example
//This example displays tests if all vector objects are inside a rectangle.
L_VOID Example121(HWND hWnd, LVectorBase *pVector)
{
LVectorBase Vector;
RECT rcBounds;
L_BOOL bInside;
Vector.Load(TEXT("test.dxf"));
//Define a rectangle
rcBounds.left =0;
rcBounds.top =0;
rcBounds.right =50;
rcBounds.bottom =50;
Vector.IsObjectInsideRect(&rcBounds, &bInside);
if (bInside)
MessageBox(hWnd, TEXT("IsObjectInsideRect() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsObjectInsideRect() returns FALSE"), TEXT(""), MB_OK);
}