#include "l_bitmap.h"
L_LTDIS_API L_HPALETTE L_CreatePaintPalette(hDC, pBitmap)
L_HDC hDC; |
device context that is used |
pBITMAPHANDLE pBitmap; |
pointer to the LEAD bitmap handle |
Returns a palette handle that must be selected and realized before calling the L_PaintDC function.
Parameter |
Description |
hDC |
Device context that is used. |
pBitmap |
Pointer to the LEAD bitmap handle that references the image data. |
> 0 |
Palette handle. |
NULL |
No palette needed. |
You must use this function if either the display device or the bitmap is 8 bits per pixel or less. You can use this function whenever the bitmap or device changes, and check the return value to decide whether to select and realize the palette. If the return value is NULL, no palette needs to be selected.
You must also call this function before calling L_PaintDC, when painting a 16-bit grayscale image on a 24-bit device.
You must delete the palette handle when it is no longer needed.
GDI+ paint does not require a palette. If the current paint display mode is set to GDI+ using L_SetDisplayMode with the DISPLAYMODE_GDIPLUS flag, then this function will always return NULL for the palette even if the bitmap is 8 bits per pixel or less.
Required DLLs and Libraries
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, Linux.
Functions: |
|
|
|
|
|
Topics: |
|
|
For a short example, refer to L_PaintDC. For complete sample code, refer to the COLOR example.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.