LBitmapBase::SetDisplayMode

#include "ltwrappr.h"

L_INT LBitmapBase::SetDisplayMode(uFlagPos, uFlagSet)

Sets flags that control the speed, quality, and style of painting operations.

Parameters

L_UINT32 uFlagPos

The flag or flags to be changed. You can use a bitwise OR ( | ) to specify more than one flag. You can use DISPLAYMODE_RESETPOSITIONS to indicate all flags.

Refer to Flags for the LBitmapBase::SetDisplayMode Function for descriptions of the flags.

L_UINT32 uFlagSet

The flags (of those specified in the uFlagPos parameter) to be turned on. You can use a bitwise OR ( | ) to include more than one flag. You can use 0 to turn off all the flags specified in the uFlagPos parameter.

Refer to Flags for the LBitmapBase::SetDisplayMode Function for descriptions of the flags.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This will be the local display mode setting for the class object and is used when painting the bitmap.

The first parameter specifies which flags are affected, and the second specifies which of those to turn on. The other affected flags are turned off.

Therefore:

For example, the following statement turns on fast painting, turns off dithered painting, and leaves all other flags as they were:

MyBitmapBase::SetDisplayMode(DISPLAYMODE_FASTPAINT | DISPLAYMODE_DITHEREDPAINT, DISPLAYMODE_FASTPAINT); 

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

L_INT LBitmapBase__SetDisplayModeExample() 
{ 
   L_INT nRet; 
   LBitmapBase MyBitmap; 
 
   nRet =MyBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")),24); 
   if(nRet !=SUCCESS) 
      return nRet; 
   nRet =MyBitmap.SetDisplayMode(DISPLAYMODE_SCALETOGRAY, DISPLAYMODE_SCALETOGRAY); 
   if(nRet !=SUCCESS) 
      return nRet; 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.