L_VecSetLayer
#include "lvkrn.h"
L_LVKRN_API L_INT 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: |
|
Topics: |
Example
This example will make the layer with the given name locked from changes.
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; }