L_VecEmptyLayer

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecEmptyLayer(pVector, pLayer)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

const pVECTORLAYER pLayer;

/* pointer to a vector layer */

Empties the specified layer. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

pVector

Pointer to the vector handle.

pLayer

Pointer to a VECTORLAYER structure that references the layer to be emptied.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The specified layer is emptied by deleting all objects within that layer.

To delete a layer, call L_VecDeleteLayer.

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_VecAddLayer, L_VecDeleteLayer, L_VecCopyLayer, L_VecAddObject, L_VecCopyObject, L_VecGetLayer, L_VecGetLayerByIndex, L_VecGetLayerByName

Topics:

Working with Vector Layers

Example

This example will delete all objects inside the layer with the given name.

L_INT VecEmptyLayerExample(
   pVECTORHANDLE pVector,
   L_TCHAR* pszName)
{
   VECTORLAYER Layer;
   L_INT       nRet;

   /* Get the layer with the given name */
   nRet = L_VecGetLayerByName( pVector, pszName, &Layer );
   if( SUCCESS == nRet )
      nRet = L_VecEmptyLayer( pVector, &Layer );  /* empty out */

   return nRet;
}