L_VecSetLayer

#include "lvkrn.h"

L_INT EXT_FUNCTION L_VecSetLayer(pVector, pLayer, pLayerDesc)

pVECTORHANDLE pVector;

/* pointer to a vector handle */

const pVECTORLAYER pLayer;

/* pointer to a vector layer */

const pVECTORLAYERDESC pLayerDesc;

/* pointer to a structure */

Updates a vector layer with new information. 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 vector layer to set.

pLayerDesc

Pointer to a VECTORLAYERDESC structure that contains the new layer information to set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

For more information on the layer information that can be set, refer to the VECTORLAYERDESC structure.

To get the layer information for a specific layer, use the L_VecGetLayer function.

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_VecGetLayer, L_VecFreeLayer.

Topics:

Working with Vector Layers

Example

/* This example will make the layer with the given name locked from changes. */
void LockLayer( pVECTORHANDLE pVector, const L_TCHAR *pszName )
{
   VECTORLAYER       Layer;
   VECTORLAYERDESC   LayerDesc;
   L_INT             nRet;

   /* find the layer with that name */
   nRet = L_VecGetLayerByName( pVector, pszName, &Layer );
   if( nRet != SUCCESS )
      return;  /* layer not found */

   /* get this layer for editing */
   L_VecGetLayer( pVector, &Layer, &LayerDesc );

   /* lock the layer */
   LayerDesc.bLocked = TRUE;

   /* set back and clean up */
   L_VecSetLayer( pVector, &Layer, &LayerDesc );
   L_VecFreeLayer( &LayerDesc );
}