L_VecSetActiveLayer

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecSetActiveLayer(pVector, pLayer)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

const pVECTORLAYER pLayer;

/* pointer to a vector layer */

Sets the active layer in the specified vector handle. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

pVector

Pointer to the vector handle.

pLayer

Pointer to the VECTORLAYER structure that references the layer to set as the active layer.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Some functions use the active layer when NULL is passed for a pVECTORLAYER parameter. This makes it easier to work with the toolkit when layers are not needed.

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

Topics:

Working with Vector Layers

Example

This example will set the active layer to the one with the given name.

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

   /* Get the requested layer */
   nRet = L_VecGetLayerByName( pVector, pszName, &Layer );
   if( nRet == SUCCESS )
      /* Set it as the active layer */
      nRet = L_VecSetActiveLayer( pVector, &Layer );

   return nRet;
}