WORD StretchDIBits(
LPPDEVICE lpPDevice,
WORD fGet,
WORD DestX,
WORD DestY,
WORD DestXE,
WORD DestYE,
WORD SrcX,
WORD SrcY,
WORD SrcXE,
WORD SrcYE,
LPSTR lpBits,
LPBITMAPINFO lpBitmapInfo,
LPINT lpTranslate,
DWORD dwROP,
LPBRUSH lpPBrush,
LPDRAWMODE lpDrawMode,
LPRECT lpClipRect
);
Moves a source bitmap into a destination bitmap, stretching or compressing the source bitmap as necessary to fit the dimensions of the destination bitmap. The function either converts and copies a DIB to a given device or converts and copies a device-specific bitmap to a DIB. The fGet parameter specifies whether the source bitmap is a DIB or device-specific bitmap.
>0 | Number of scanlines copied |
=0 | Error or no scanlines copied |
<0 | GDI must simulate operation |
Value | Meaning |
---|---|
SRCCOPY (0x00CC0020) | Copies source bits to the destination rectangle:
Destination = Source. |
SRCPAINT (0x00EE0086) | Combines the source and destination bits using the bitwise OR operator:
Destination = Source | Destination. |
SRCAND (0x008800C6) | Combines the source and destination bits using the bitwise AND operator:
Destination = Source & Destination. |
SRCINVERT (0x00660046) | Combines the source and destination bits using the bitwise exclusive OR operator:
Destination = Source ^ Destination. |
SRCERASE (0x00440328) | Combines the source and inverse of destination bits using the bitwise AND operator:
Destination = Source & (~ Destination). |
NOTSRCCOPY (0x00330008) | Copies the inverse of the destination bits to the destination rectangle:
Destination = ~ Destination. |
NOTSRCERASE (0x001100A6) | Combines the inverse of the source and destination bits using the bitwise AND operator:
Destination = (~ Source) & (~ Destination). |
MERGECOPY (0x00C000CA) | Combines the source and brush bits using the bitwise AND operator:
Destination = Source & Pattern. |
MERGEPAINT (0x00BB0226) | Combines the destination and inverse of the source bits using the bitwise OR operator:
Destination = (~ Source) | Destination. |
PATCOPY (0x00F00021) | Copies the brush bits to the destination rectangle:
Destination = Pattern. |
PATPAINT (0x00FB0A09) | Combines the destination, pattern, and the inverse of source bits using the bitwise OR operator:
Destination = (~ Source) | Pattern | Destination. |
PATINVERT (0x005A0049) | Combines the pattern and destination bits using the bitwise exclusive OR operator:
Destination = Pattern ^ Destination. |
DSTINVERT (0x00550009) | Copies the inverse of the destination bits:
Destination = ~ Destination. |
BLACKNESS (0x00000042) | Set all destination bits to black. |
WHITENESS (0x00FF0062) | Set all bits to white. |
The export ordinal for this function is 28.
GDI calls this function whenever an application calls the StretchDIBits function (GDI.439).
A graphics device driver must export the StretchDIBits function if the RC_STRETCHDIB value is set in the dpRaster member of the driver's GDIINFO structure.
For Windows version 3.x, the source bitmap will always be a DIB (with the fGet parameter set to zero). The destination bitmap can be either a memory bitmap or the actual device surface.
PDEVICE, PBITMAP, DRAWMODE, RECT, GDIINFO