L_VecSaveFile

#include "lvkrn.h"

L_LVKRN_API L_INT L_VecSaveFile(pszFile, pVector, nFormat, pSaveOptions)

L_TCHAR pszFile;

/* file name */

pVECTORHANDLE pVector;

/* pointer to the vector handle */

L_INT nFormat;

/* file format */

pSAVEFILEOPTION pSaveOptions;

/* pointer to a structure */

Saves a vector image, contained in a vector handle, to a file in any of the supported compressed or uncompressed formats.

Parameter

Description

pszFile

Character string containing the output file name.

pVector

Pointer to the vector handle that references the image data to save.

nFormat

Format of the output file. For valid values, refer to Formats of Output Files.

pSaveOptions

Reserved for future use. Pass NULL.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Saves a vector image contained in a vector handle to a file in any of the supported vector image formats. For more information about file formats that support vector images, refer to Formats of Output Files.

Required DLLs and Libraries

LVKRN
LTFIL

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_VecLoadFile, L_VecApplyTransformation

Example

This example loads a temporary vector and saves it to a new file.

L_INT VecSaveFileExample(L_VOID)
{
   L_INT nRet;
   VECTORHANDLE TmpVector; /* Vector handle for the temporary vector image. */
   /* Load a vector vector image */
   nRet = L_VecLoadFile(TEXT("C:\\Program Files\\LEAD Technologies\\LEADTOOLS 15\\Images\\drawing3.dxf"), &TmpVector, NULL, NULL );
   if(nRet != SUCCESS)
      return nRet;
   /* Save the image as a windows meta file. */
   nRet = L_VecSaveFile(TEXT("C:\\Program Files\\LEAD Technologies\\LEADTOOLS 15\\Images\\TEST.WMF"), &TmpVector, FILE_WMF, NULL );
   if(nRet != SUCCESS)
      return nRet;
   /* Free the temporary vector.*/
   nRet = L_VecFree( &TmpVector );
   return nRet;
}