Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
L_SetXPSOptions
#include "l_bitmap.h"
L_LTFIL_API L_INT EXT_FUNCTION L_SetXPSOptions(pOptions)
pFILEXPSOPTIONS pOptions; |
/* pointer to a structure */ |
Sets the file options used by LEADTOOLS when loading XPS files.
Parameter |
Description |
pOptions |
Pointer to a structure that contains the options to use when loading XPS files |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The uStructSize member of the FILEXPSOPTIONS structure must be set before calling this function. If XPS file is loaded without first calling this function, the following default values will be used:
FILEXPSOPTIONS Member: |
Default value: |
nXResolution |
96 |
nYResolution |
96 |
The values set by this function are valid for the current thread. To change the values used by the current thread, this function must be called again.
To get the current options used when loading an XPS file, call L_GetXPSOptions.
Required DLLs and Libraries
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. |
Platforms
Windows 95 / 98 / Me, Windows 2000 / XP / Vista
See Also
Functions: |
|
Topics: |
|
|
Example
L_INT SetXPSOptionsExample(L_TCHAR * pszxpsFileName,
pBITMAPHANDLE pBitmap)
{
L_INT nRet;
FILEXPSOPTIONS xpsOptions;
/* Get the current XPS option */
nRet = L_GetXPSOptions(&xpsOptions,sizeof(FILEXPSOPTIONS));
if(nRet != SUCCESS)
return nRet;
/*Change Resolution */
xpsOptions.nXResolution = 120;
xpsOptions.nYResolution = 120;
/* Set new XPS options */
nRet = L_SetXPSOptions(&xpsOptions);
if(nRet != SUCCESS)
return nRet;
/* Now load the XPS file */
nRet = L_LoadBitmap(pszxpsFileName, pBitmap, sizeof(BITMAPHANDLE), 0, ORDER_RGB, NULL, NULL);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}