L_VecCopyGroup

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecCopyGroup(pVectorDst, pGroupDst, pVectorSrc, pGroupSrc, dwFlags)

pVECTORHANDLE pVectorDst;

pointer to a vector handle

const pVECTORGROUP pGroupDst;

pointer to a group

const pVECTORHANDLE pVectorSrc;

pointer to a vector handle

const pVECTORGROUP pGroupSrc;

pointer to a vector group

L_UINT32 dwFlags;

copy flags

Copies the contents of one group to another. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter Description
pVectorDst Pointer to the destination vector handle.
pGroupDst Pointer to a VECTORGROUP structure that references the destination group.
pVectorSrc Pointer to the source vector handle.
pGroupSrc Pointer to a VECTORGROUP structure that references the source group.
dwFlags Flag that indicates whether or not to empty the destination group before copying. Possible values are:
  Value Meaning
  0 Do not empty the destination group before copying.
  VECTOR_FLAGS_REPLACE Empty the destination group before copying.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The destination group can be in the same vector handle as the source group, or it can be in a different vector handle.

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_VecAddGroup, L_VecGetGroup, L_VecGetGroupByName, L_VecGetGroupByIndex

Topics:

Working with Vector Groups

Example

This example will copy the group with the given name from the source vector to the destination vector.

L_INT VecCopyGroupExample( 
pVECTORHANDLE pVectorDst, 
pVECTORHANDLE pVectorSrc, 
L_TCHAR* pszName) 
{ 
   VECTORGROUP       GroupSrc, GroupDst; 
   VECTORGROUPDESC   GroupDesc; 
   L_INT             nRet; 
   /* Get the group with the given name */ 
   nRet = L_VecGetGroupByName( pVectorSrc, pszName, &GroupSrc ); 
   if( nRet == SUCCESS ) 
   { 
      /* get the group properties */ 
      nRet = L_VecGetGroup( pVectorSrc, &GroupSrc, &GroupDesc ); 
      if(nRet != SUCCESS) 
         return nRet; 
      /* add to the destination vector */ 
      nRet = L_VecAddGroup( pVectorDst, &GroupDesc, &GroupDst , VECTOR_FLAGS_RENAME_DUPLICATES); 
      if(nRet != SUCCESS) 
         return nRet; 
      /* no need for the group properties anymore */ 
      nRet = L_VecFreeGroup( &GroupDesc ); 
      if(nRet != SUCCESS) 
         return nRet; 
      /* copy content of source group into destination */ 
      nRet = L_VecCopyGroup( pVectorDst, &GroupDst, pVectorSrc, &GroupSrc, 0L ); 
   } 
   return nRet; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C API Help