Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
#include "ltwrappr.h"
virtual L_INT LPaint::PaintRgnDCBuffer(LBuff, nRow, nCount=1, uROP3=SRCCOPY)
LBuffer& LBuff; |
/* an LBuffer object */ |
L_INT nRow; |
/* first row to paint */ |
L_INT nCount; |
/* number of rows to paint */ |
L_UINT32 uROP3; |
/* windows ROP code for display */ |
Paints image data into a device context from a buffer. This function works the same as LPaint::PaintDCBuffer, except that only the bitmap region is painted.
Parameter |
Description |
LBuff |
A LEAD buffer of type LBuffer that contains the image data to paint. |
nRow |
The first row to paint. The painted portion of any row may be limited by the bitmap object rectangles. |
nCount |
The number of rows to paint. The painted portion of any row may be limited by the bitmap object rectangles. |
uROP3 |
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. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
The bitmap must be allocated before you can create a region for it. Therefore, if you use this function in a paint-while-load routine, you must use your callback function to create the region after the bitmap is allocated.
The LBuff parameter is passed by reference, and is a required parameter.
Required DLLs and Libraries
LTDIS 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.
See Also
Functions: |
Class Members, LBitmapBase::RectToBitmap, LBitmapBase::RectFromBitmap |
Topics: |
|
|
|
|
|
|
Example
L_INT LPaint__PaintRgnDCBufferExample(LBitmapBase& LeadBitmap,HDC hDC) { L_INT nRet; LPaint LeadPaint(&LeadBitmap,hDC); LBitmapRgn LeadRegion; L_INT i,nBytesPerLine ; RECT Rect ; Rect.left = 10 ; Rect.top = 10 ; Rect.right = 50 ; Rect.bottom = 50 ; LeadRegion.SetBitmap(&LeadBitmap) ; nRet = LeadRegion.SetRgnRect(&Rect); if(nRet != SUCCESS) return nRet; nBytesPerLine = LeadBitmap.GetBytesPerLine() ; LBuffer LeadBuffer((DWORD)nBytesPerLine); for (i=0;i<LeadBitmap.GetHeight();i++) { LeadBitmap.GetRow(&LeadBuffer,i) ; nRet = LeadPaint.PaintRgnDCBuffer(LeadBuffer,i) ; if(nRet != SUCCESS) return nRet; } return SUCCESS; }