L_VecDeleteObject

Summary

Deletes an object from a vector image. This function is available in the LEADTOOLS Vector Imaging Toolkit.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecDeleteObject(pVector, pObject, dwFlags)

Parameters

pVECTORHANDLE pVector

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.

Returns

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

See Also

Functions

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

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

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.