Gets the painting control flags, which are set by the LBitmapBase::SetDisplayMode function.
#include "ltwrappr.h"
L_UINT32 LBitmapBase::GetDisplayMode()
The unsigned integer containing the painting control flags. Possible values are:
Value | Meaning |
---|---|
DISPLAYMODE_ORDEREDDITHER | [0x00000001] Enables or disables ordered dithering when painting. Ordered dithering is faster than the default dithering method, which uses error diffusion, but the quality of the image is not as good. |
DISPLAYMODE_FASTPAINT | [0x00000002] Enables or disables fast painting. Fast painting should be performed only if the current video driver is good, and the image does not need to be dithered or resized to paint. No safety check for a faulty driver is performed. |
DISPLAYMODE_INDEXEDPAINT | [0x00000004] Enables or disables painting that is mapped directly to the selected palette. This is enabled by default; you can set this flag to disable it and let Windows do color matching between the paint palette and the selected palette. |
DISPLAYMODE_DITHEREDPAINT | [0x00000008] Enables or disables dithered painting. This is enabled by default, but you can set this flag to false to disable it. When enabled, Floyd-Steinberg dithering is used to dither true color or high color images on devices that are 8 bits per pixel or less. When disabled, the device is responsible for color reduction. |
DISPLAYMODE_SCALETOGRAY | [0x00000010] (Document/Medical only) Enables grayscaling of 1-bit images when they are displayed. This improves the readability of the images when they are zoomed in or zoomed out, but it slows down the display. If you enable grayscaling, you must call LBitmapBase::CreatePaintPalette, then select and realize the palette before painting an image. |
DISPLAYMODE_HALFTONEPRINT | [0x00000020] Enables use of the printing halftone (rather than the viewing halftone) when painting to a 1-bit device. This is useful if you are using the LPaint::PaintDC function for printing. |
DISPLAYMODE_FAVORBLACK | [0x00000040] (Document/Medical only) Enables a bias in preserving black objects when displaying zoomed-out 1-bit images. This can prevent the disappearance of fine lines and details, but it slows down the display. |
DISPLAYMODE_FIXEDPALETTE | [0x00000080] Forces the use of a fixed palette when painting to a device that supports 256 colors or less. When this flag is off, the bitmap handle controls palette usage. When this flag is on, the default is the LEAD fixed palette, but on 256-color devices, the Netscape palette is used if the DISPLAYMODE_NETSCAPEPALETTE flag is also set. |
DISPLAYMODE_NETSCAPEPALETTE | [0x00000100] Sets the Netscape fixed palette as the preferred fixed palette when painting to a device that supports 256 colors. This fixed palette is employed by both Netscape Navigator and Microsoft Internet Explorer. |
This will be the local display mode setting for the class object and is used when painting the bitmap.
Win32, x64.
L_INT LBitmapBase__GetDisplayModeExample()
{
L_INT nRet;
LBitmapBase MyBitmap;
L_UINT32 uDMode;
nRet =MyBitmap.Load(MAKE_IMAGE_PATH(TEXT("image1.cmp")),24);
if(nRet !=SUCCESS)
return nRet;
uDMode=MyBitmap.GetDisplayMode();
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document