Paints image data into a device context from a buffer.
virtual L_INT LPaint::PaintDCBuffer(LBuff, nRow, nCount=1, uROP3=SRCCOPY)
A LEAD buffer of type LBuffer that contains the image data to paint.
The first row to paint. The painted portion of any row may be limited by the bitmap object rectangles.
The number of rows to paint. The painted portion of any row may be limited by the bitmap object rectangles.. If the image data in LBuff 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.
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.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This function references a LEAD bitmap object, which may or may not have a loaded bitmap. In either case, the following fields must be specified in the LEAD bitmap object:
The Width, Height, BitsPerPixel, Order, and ViewPerspective fields must all be set to the correct values for the image. (You can use the LBitmapBase::Initialize function to set the values.)
The Palette for the bitmap object must be a valid palette (an array of RGBQUAD values). You can create or update the palette using the LBitmapBase::PutColors() function.
You can call [LPaint:PaintDCBuffer from a callback function to paint an image while a bitmap is being loaded. This technique is used through the LFile load callback functions.
The LBuff parameter is passed by reference, and is a required parameter.
L_INT LPaint__PaintDCBufferExample(LBitmapBase& LeadBitmap,HDC hDC)
nBytesPerLine = LeadBitmap.GetBytesPerLine() ;
LBuffer LeadBuffer((DWORD)nBytesPerLine) ;
for( i = 0 ; i < LeadBitmap.GetHeight() ; i++)
zRet = LeadBitmap.GetRow(&LeadBuffer,i) ;
if(zRet < 1)
nRet = LeadPaint.PaintDCBuffer(LeadBuffer,i) ;
if(nRet != SUCCESS)
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries