LVectorBase::Load

Summary

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

Syntax

#include "ltwrappr.h"

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

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

Parameters

L_TCHAR * pszFile

Character string containing the name of the file to load.

pLOADFILEOPTION pLoadOptions

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

pFILEINFO 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 ifLFile::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

Value Meaning
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

See Also

Functions

Topics

Example

For an example, refer to LVectorBase::IsFileNameEnabled.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.