Available in LEADTOOLS Vector Imaging toolkits. |
L_VecDeleteObject
#include "lvkrn.h"
L_LVKRN_API L_INT L_VecDeleteObject(pVector, pObject, dwFlags)
pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
const pVECTOROBJECT pObject; |
/* pointer to a vector object */ |
L_UINT32 dwFlags; |
/* flag that indicates which objects to delete */ |
Deletes an object object from a vector image. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Parameter |
Description |
|
pVector |
Pointer to a vector handle. Objects within this vector handle will be deleted. |
|
pObject |
Pointer to a VECTOROBJECT structure that references the object to be deleted. If this parameter is not NULL, only the specified object will be deleted. If this parameter is NULL, the objects to delete are determined by dwFlags. |
|
dwFlags |
Flag that indicates which objects to delete. This flag is valid only if pObject is NULL. If pObject is not NULL, this parameter is ignored. Possible values are: |
|
|
Value |
Meaning |
|
0 |
Delete all objects. |
|
VECTOR_FLAGS_SELECTED_ONLY |
Delete only the currently selected objects within the vector handle. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Deletes all or part of the specified vector image.
Note: |
When you delete a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind vertices mode set by L_VecSetBindVerticesMode. |
Note: |
In DirectX, you cannot delete objects, therefore this function does nothing. |
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_VecHitTest, L_VecSetBindVerticesMode |
Example
This example will delete the object under the mouse cursor.
L_INT VecDeleteObjectExample( pVECTORHANDLE pVector, POINT* pptMouse) { VECTOROBJECT Object; L_INT nRet; /* Get object under mouse pointer */ nRet = L_VecHitTest( pVector, pptMouse, &Object ); if( nRet == SUCCESS ) /* Delete it */ nRet = L_VecDeleteObject( pVector, &Object, 0L ); return nRet; }