#include "ltwrappr.h"
L_INT LVectorWindow::SelectAllObjects(bSelect, pRect)
Selects or unselects objects in a vector. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Flag that indicates whether to select or deselect one or more objects. Possible values are:
Value | Meaning |
---|---|
TRUE | Select all objects within the specified rectangle. |
FALSE | Unselect all objects within the specified rectangle. |
Pointer to a RECT structure that contains the rectangle in which the selection operation takes place. Pass NULL to operate on all objects in the vector.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Call this function to select or deselect objects in a vector. If bSelect is TRUE, the function will select objects. If bSelect is FALSE, the function will deselect objects. If pRect is NULL, all objects are affected. If pRect is not NULL, it should point to a valid rectangle. Only objects within this rectangle will be selected, based on the value of bSelect.
The rectangle specified by pRect 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
Assumes pVectorWindow points to a valid LVectorWindow object
This example selects all objects in the upper left quadrant of the vector window
L_INT LVectorWindow__SelectAllObjectsExample(LVectorWindow *pVectorWindow)
{
L_INT nRet;
RECT selectRect, clientRect;
nRet = pVectorWindow->GetVectorVisibleRect(&clientRect);
if(nRet != SUCCESS)
return nRet;
::SetRect(&selectRect, 0, 0, clientRect.right /2, clientRect.bottom/2);
nRet = pVectorWindow->SelectAllObjects(TRUE, &selectRect);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}