L_VecSetGroup

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecSetGroup(pVector, pGroup, pGroupDesc)

Updates a vector group with new information. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameters

pVECTORHANDLE pVector

Pointer to the vector handle.

const pVECTORGROUP pGroup

Pointer to a VECTORGROUP structure that references the vector group to set.

const pVECTORGROUPDESC pGroupDesc

Pointer to a VECTORGROUPDESC structure that contains the new group information to set.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

For more information on the group information that can be set, refer to the VECTORGROUPDESC structure.

To get the group information for a specific group, use the L_VecGetGroup function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example will change the name of a given group.

L_LTVKRNTEX_API L_INT VecSetGroupExample( 
   pVECTORHANDLE pVector, 
   const L_TCHAR* pszOldName, 
   const L_TCHAR* pszNewName) 
{ 
   VECTORGROUP       Group; 
   VECTORGROUPDESC   GroupDesc; 
   L_INT             nRet; 
 
   /* find the group with that name */ 
   nRet = L_VecGetGroupByName( pVector, pszOldName, &Group ); 
   if( nRet != SUCCESS ) 
      return nRet;  /* group not found */ 
 
   /* get this group for editing */ 
   nRet = L_VecGetGroup( pVector, &Group, &GroupDesc ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* set new name */ 
   lstrcpy( GroupDesc.szName, pszNewName );  
 
   /* set back and clean up */ 
   nRet = L_VecSetGroup( pVector, &Group, &GroupDesc ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = L_VecFreeGroup( &GroupDesc ); 
 
   return nRet; 
} 

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

LEADTOOLS Vector C API Help

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