Method BitBlt
BitBlt(nint, int, int, int, int, nint, int, int, int)
Performs a bit-block transfer of color data from a source device context to a destination device context.
public static extern int BitBlt(nint hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, nint hdcSrc, int nXSrc, int nYSrc, int rop)
Parameters
hdcDestnintA handle to the destination device context.
nXDestintThe x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nYDestintThe y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nWidthintThe width, in logical units, of the rectangle to be transferred.
nHeightintThe height, in logical units, of the rectangle to be transferred.
hdcSrcnintA handle to the source device context.
nXSrcintThe x-coordinate, in logical units, of the upper-left corner of the source rectangle.
nYSrcintThe y-coordinate, in logical units, of the upper-left corner of the source rectangle.
ropintThe raster-operation code that specifies how the source and destination data are combined. For a list of common raster-operation codes, see the Windows GDI documentation.
Returns
- int
If the operation succeeds, the return value is a nonzero value. If the operation fails, the return value is zero, and extended error information can be retrieved by calling GetLastWin32Error().
Remarks
The BitBlt function is a low-level GDI operation used for copying
pixel data between device contexts. It is commonly used for rendering
graphics or performing screen
captures.