Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS Vector C++ Class Library Help

LVectorBase::Load

Show in webframe

#include "ltwrappr.h"

virtual L_INT LVectorBase::Load(pszFile, pLoadOptions=NULL, pFileInfo=NULL)

virtual L_INT LVectorBase::Load(pLoadOptions=NULL, pFileInfo=NULL)

L_TCHAR * pszFile;

/* name of the file to load */

pLOADFILEOPTION pLoadOptions;

/* pointer to a structure */

pFILEINFO pFileInfo;

/* pointer to a structure */

Loads a vector image from disk into the class object. The image file can be in any supported vector image file format.

Parameter

Description

pszFile

Character string containing the name of the file to load.

pLoadOptions

Pointer to a LOADFILEOPTION structure that contains information on loading the file.

pFileInfo

Pointer to a FILEINFO structure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.

 

If nothing is known about the file, pass NULL for this parameter, or declare a variable of type FILEINFO and set the FILEINFO.Flags to 0, then pass the address of the FILEINFO structure in this parameter. In this case, if the address of a FILEINFO structure is passed, the FILEINFO structure will be updated with the results of LFile::GetInfo

 

If only the file type is known, set pFileInfo.Format to the file type and set pFileInfo.Flags to FILEINFO_ONLYFORMATVALID. This can also be done if LFile::GetInfo has been called previously, but values that affect the size of the image loaded have been changed (for example, by calling LFileSettings::SetPCDResolution or LFileSettings::SetWMFResolution). In this case the FILEINFO structure pointed to by pFileInfo will be updated with the results of LFile::GetInfo

 

If LFile::GetInfo has been called prior to calling this function, and no changes have been made to the contents of the structure filled by LFile::GetInfo, then the address of the filled FILEINFO structure can be passed for this parameter. In this case, the FILEINFO.Flags member should be set to FILEINFO_INFOVALID. The LFile::GetInfo function will set the FILEINFO.Flags to FILEINFO_INFOVALID. In this case the load will be faster since this function does not have to query the file filters for the file type.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

For supported vector formats, refer to Formats of Vector Input Files.

Before calling this function, you may need to get or set file information. Refer to Getting and Setting File Information.

The function will initialize the vector handle and allocate the storage necessary to hold the image.

The class object will free the vector when it is destroyed. If you wish to free the vector, use LVectorBase::Free.

You should never pass an uninitialized FILEINFO structure to this function.

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:

LVectorBase::Save, LVectorBase::SetFileName, Class Members

Topics:

Vector Loading, Saving and Copying

 

Vector Images: Loading and Saving Vector Files

Example

For an example for both forms of LVectorBase::Load(),

refer to LVectorBase::IsFileNameEnabled.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.