Platforms to show: All Mac Windows Linux Cross-Platform

Back to Graphics class.

Graphics.StretchBltMBS(nXOriginDest as Integer, nYOriginDest as Integer, nWidthDest as Integer, nHeightDest as Integer, source as graphics, nXOriginSrc as Integer, nYOriginSrc as Integer, nWidthSrc as Integer, nHeightSrc as Integer, dwRop as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Graphics & Pictures MBS Win Plugin 6.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The StretchBlt function copies a bitmap from a source rectangle into a destination rectangle, stretching or compressing the bitmap to fit the dimensions of the destination rectangle, if necessary.

This is just a wrapper to the StretchBlt function from the Windows API.

The system stretches or compresses the bitmap according to the stretching mode currently set in the destination device context.

Parameters:

nXOriginDestSpecifies the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nYOriginDestSpecifies the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.
nWidthDestSpecifies the width, in logical units, of the destination rectangle.
nHeightDestSpecifies the height, in logical units, of the destination rectangle.
hdcSrcThe source device context.
nXOriginSrcSpecifies the x-coordinate, in logical units, of the upper-left corner of the source rectangle.
nYOriginSrcSpecifies the y-coordinate, in logical units, of the upper-left corner of the source rectangle.
nWidthSrcSpecifies the width, in logical units, of the source rectangle.
nHeightSrcSpecifies the height, in logical units, of the source rectangle.
dwRopSpecifies the raster operation to be performed. Raster operation codes define how the system combines colors in output operations that involve a brush, a source bitmap, and a destination bitmap. See BitBlt for a list of common raster operation codes (ROPs). Note that the CAPTUREBLT ROP generally cannot be used for printing device contexts.

Return Values

If the function succeeds, the return value is true.
If the function fails, the return value is false.

Possible operation modes:

SRCCOPY&h00CC0020dest = sourceCopies the source rectangle directly to the destination rectangle.
SRCPAINT&h00EE0086dest = source OR destCombines the colors of the source and destination rectangles by using the Boolean OR operator.
SRCAND&h008800C6dest = source AND destCombines the colors of the source and destination rectangles by using the Boolean AND operator.
SRCINVERT&h00660046dest = source XOR destCombines the colors of the source and destination rectangles by using the Boolean XOR operator.
SRCERASE&h00440328dest = source AND (NOT dest )Combines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.
NOTSRCCOPY&h00330008dest = (NOT source)Copies the inverted source rectangle to the destination.
NOTSRCERASE&h001100A6dest = (NOT src) AND (NOT dest)Combines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.
MERGECOPY&h00C000CAdest = (source AND pattern)Merges the colors of the source rectangle with the brush currently selected in hdcDest, by using the Boolean AND operator.
MERGEPAINT&h00BB0226dest = (NOT source) OR destMerges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.
PATCOPY&h00F00021dest = patternCopies the brush currently selected in hdcDest, into the destination bitmap.
PATPAINT&h00FB0A09dest = DPSnooCombines the colors of the brush currently selected in hdcDest, with the colors of the inverted source rectangle by using the Boolean OR operator. The result of this operation is combined with the colors of the destination rectangle by using the Boolean OR operator.
PATINVERT&h005A0049dest = pattern XOR destCombines the colors of the brush currently selected in hdcDest, with the colors of the destination rectangle by using the Boolean XOR operator.
DSTINVERT&h00550009dest = (NOT dest)Inverts the destination rectangle.
BLACKNESS&h00000042dest = BLACKFills the destination rectangle using the color associated with index 0 in the physical palette. (This color is black for the default physical palette.)
WHITENESS&h00FF0062dest = WHITEFills the destination rectangle using the color associated with index 1 in the physical palette. (This color is white for the default physical palette.)
NOMIRRORBITMAP&h80000000Do not Mirror the bitmap in this call.Prevents the bitmap from being mirrored.
CAPTUREBLT&h40000000Include layered windows.Includes any windows that are layered on top of your window in the resulting image. By default, the image only contains your window. Note that this generally cannot be used for printing device contexts.

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...