#include "l_bitmap.h"
L_LTDIS_API L_INT L_PaintDCBuffer(hDC, pBitmap, pSrc, pClipSrc, pDst, pClipDst, uROP3, pBuffer, nRow, nCount)
Paints image data into a device context from a buffer.
Handle to a device context, such as a screen, to use as the display surface. The mapping mode of the device context must be MM_TEXT.
Pointer to the bitmap handle that describes the image to paint.
Pointer to the Windows RECT structure that specifies the part of the bitmap to use as the display source.
The coordinates in the RECT structure are relative to the bitmap. You can pass NULL to use the default, which matches the bitmap.
Pointer to the Windows RECT structure that specifies the portion of the display source to paint. Generally, this is used for updating the display when part of the source bitmap has changed.
The coordinates in the RECT structure are relative to the bitmap. You can pass NULL to use the default, which matches the bitmap.
Pointer to the Windows RECT structure that determines how the source rectangle is scaled and how the image is positioned in the device context.
The coordinates in the RECT structure are relative to the device context. There is no default for this parameter. You must specify the RECT structure.
Pointer to the Windows RECT structure that specifies the portion of the display rectangle to paint. Generally, this is used for updating changes in the display surface, such as when a user moves another window, uncovering a part of the image that had been covered up.
The coordinates in the RECT structure are relative to the device context. You can pass NULL to use the default, which matches the device context. In most cases, however, you should use the rectangle returned by the Windows WM_PAINT message.
The Windows ROP code that determines how the destination rectangle is updated. This parameter takes the same codes as the Windows BitBlt function. For ordinary painting, use SRCCOPY.
Pointer to the buffer that contains the image data to paint.
The first row to paint. The painted portion of any row may be limited by the RECT parameters.
The number of rows to paint. The painted portion of any row may be limited by the RECT parameters. If the image data in pBuffer
is compressed 1-bit data, you can specify the number of lines as a negative value (-nLines), as explained in Speeding Up 1-Bit Documents.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function references a LEAD bitmap handle, which may or may not have a loaded bitmap. In either case, the following fields must be specified in the LEAD BITMAPHANDLE structure:
The Width, Height, BitsPerPixel, Order, and ViewPerspective fields must all be set to the correct values for the image. (You can use the L_InitBitmap function to set the values.)
The pPalette must be a valid palette (an array of RGBQUAD values). You can create or update the palette using the L_PutBitmapColors function.
Except for the buffer specifications, this function uses source and destination rectangles the same as L_PaintDC. For a complete explanation, refer to L_PaintDC.
You can call L_PaintDCBuffer from a callback function to paint an image while a bitmap is being loaded. This technique is used in the FILEREADCALLBACK procedures in the DEMO.C example program.
Required DLLs and Libraries
Win32, x64.
For an example, refer to FILEREADCALLBACK.
For complete sample code, refer to the RESIZE
example.
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