LEADTOOLS Raster Imaging C++ Class Library Help > Classes and Member Functions > LMemoryFile > LMemoryFile Member Functions > LMemoryFile::SetBitmapMemoryInfo |
#include "ltwrappr.h"
static L_INT LMemoryFile:: SetBitmapMemoryInfo(pBitmap, uMemory, uTileSize, uTotalTiles, uConvTiles, uMaxTileViews, uTileViews, uFlags)
static L_INT LMemoryFile::SetBitmapMemoryInfo(plBitmap, uMemory, uTileSize, uTotalTiles, uConvTiles, uMaxTileViews, uTileViews, uFlags)
pBITMAPHANDLE pBitmap; |
/* pointer to the bitmap handle */ |
LBitmapBase *plBitmap; |
/* pointer to a bitmap class object*/ |
L_UINT uMemory; |
/* memory type to set */ |
L_UINT uTileSize; |
/* tile size to set */ |
L_UINT uTotalTiles; |
/* number of tiles to set */ |
L_UINT uConvTiles; |
/* number of conventional tiles to set */ |
L_UINT uMaxTileViews; |
/* maximum number of disk tile views to set */ |
L_UINT uTileViews; |
/* number of actual disk tile views to set */ |
L_UINT uFlags; |
/* flags that indicate which parameters are valid */ |
Sets the bitmap allocation parameters.
Parameter |
Description |
|
pBitmap |
Pointer to the bitmap handle that references the bitmap for which to set the allocation parameters. It cannot be NULL and it must be allocated. |
|
plBitmap |
Pointer to the LBitmapBase object that references the bitmap for which to get the memory information. This bitmap must be allocated and this pointer cannot be NULL. |
|
uMemory |
Value that represents the new memory type for the bitmap. This parameter is used only if SETMEM_MEMORY is set in uFlags. |
|
uTileSize |
Value that represents the new size for the tile. This parameter is used only if SETMEM_TILESIZE is set in uFlags. |
|
uTotalTiles |
Value that represents the new number of tiles. This parameter is used only if SETMEM_TOTALTILES is set in uFlags. |
|
uConvTiles |
Value that represents the new number of conventional tiles. This parameter is used only if SETMEM_CONVTILES is set in uFlags. |
|
uMaxTileViews |
Value that represents the new maximum number of swap buffers for the disk tiles. This parameter is used only if SETMEM_MAXTILEVIEWS is set in uFlags. |
|
uTileViews |
Value that represents the new number of swap buffers for the disk tiles. This parameter is used only if SETMEM_TILEVIEWS is set in uFlags. |
|
uFlags |
Flags that indicate which parameters should be considered valid. Use one or more values. You can use a bitwise OR ( | ) to combine values. Possible values are: |
|
|
Value |
Meaning |
|
SETMEM_MEMORY |
[0x0001] The uMemory parameter is valid |
|
SETMEM_TILESIZE |
[0x0002] The uTileSize parameter is valid |
|
SETMEM_TOTALTILES |
[0x0004] The uTotalTiles parameter is valid |
|
SETMEM_CONVTILES |
[0x0008] The uConvTiles parameter is valid |
|
SETMEM_MAXTILEVIEWS |
[0x0010] The uMaxTileViews parameter is valid |
|
SETMEM_TILEVIEWS |
[0x0020] The uTileViews parameter is valid |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
If uMemory is valid and is not TYPE_TILED, then the other parameters are ignored. If uMemory is not valid and the bitmap is not tiled, then the other parameters are ignored. This overrides the uFlags parameter
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. |
Win32, x64.
See Also
Functions: |
LFileSettings::SetTempDirectory, LFileSettings::GetTempDirectory, Class Members |
Topics: |
|
|
Example
// change the tiled bitmap so is can use as many cache buffers as possible:
L_INT LMemoryFile__SetBitmapMemoryInfoExample(LBitmap *pBitmap) { L_INT nRet = 0; nRet = LMemoryFile::SetBitmapMemoryInfo( pBitmap, 0, // uMemory 0, // uTileSize 0, // uTotalTiles 0, // uConvTiles (L_UINT)-1, // uMaxTileViews, (L_UINT)-1, // uTileViews, SETMEM_MAXTILEVIEWS | SETMEM_TILEVIEWS ); if(nRet != SUCCESS) return nRet; return SUCCESS; }