L_VecSetLayer

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecSetLayer(pVector, pLayer, pLayerDesc)

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

Parameters

pVECTORHANDLE pVector

Pointer to the vector handle.

const pVECTORLAYER pLayer

Pointer to a VECTORLAYER structure that references the vector layer to set.

const pVECTORLAYERDESC pLayerDesc

Pointer to a VECTORLAYERDESC structure that contains the new layer 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 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

See Also

Functions

Topics

Example

This example will make the layer with the given name locked from changes.

L_LTVKRNTEX_API L_INT VecSetLayerExample( 
   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 nRet;  /* layer not found */ 
 
   /* get this layer for editing */ 
   nRet = L_VecGetLayer( pVector, &Layer, &LayerDesc ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* lock the layer */ 
   LayerDesc.bLocked = TRUE; 
 
   /* set back and clean up */ 
   nRet = L_VecSetLayer( pVector, &Layer, &LayerDesc ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   nRet = L_VecFreeLayer( &LayerDesc ); 
 
   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.