L_LTVKRN_API L_INT L_VecDeleteObject(pVector, pObject, dwFlags)
Deletes an object object from a vector image. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Pointer to a vector handle. Objects within this vector handle will be deleted.
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.
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:
|0||Delete all objects.|
|VECTOR_FLAGS_SELECTED_ONLY||Delete only the currently selected objects within the vector handle.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
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
This example will delete the object under the mouse cursor.
L_LTVKRNTEX_API L_INT VecDeleteObjectExample(
/* Get object under mouse pointer */
nRet = L_VecHitTest( pVector, pptMouse, &Object );
if( nRet == SUCCESS )
/* Delete it */
nRet = L_VecDeleteObject( pVector, &Object, 0L );