#include "ltvkrn.h"

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.

const pVECTOROBJECT 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.

L_UINT32 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.


Value Meaning
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

See Also



This example will delete the object under the mouse cursor.

L_LTVKRNTEX_API 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; 

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.