Stretch

The Stretch function performs a transfer and stretching of the data corresponding to a rectangle of pixels from the active image into a inactive image.

Stretch nXDest, nYDest, nWidthDest, nHeightDest, nXSrc, nYSrc, nWidthSrc, nDestSrc, sRop, sMode

Parameters

nXDest
Specifies the logical x-coordinate of the upper-left corner of the destination rectangle.

nYDest
Specifies the logical y-coordinate of the upper-left corner of the destination rectangle.

nWidthDest
Specifies the logical width of the destination rectangle.

nHeightDest
Specifies the logical height of the destination rectangle.

nXSrc
Specifies the logical x-coordinate of the upper-left corner of the source rectangle.

nYSrc
Specifies the logical y-coordinate of the upper-left corner of the source rectangle.

nWidthSrc
Specifies the logical width of the source rectangle.

nHeightSrc
Specifies the logical height of the source rectangle.

sRop
Specifies a raster-operation code. These codes define how the color data for the source rectangle is to be combined with the color data for the destination rectangle to achieve the final color.
StringMeaning
"DSTINVERT" Inverts the destination rectangle.
"MERGECOPY" Merges the colors of the source rectangle with the specified pattern by using the Boolean AND operator.
"MERGEPAINT" Merges the colors of the inverted source rectangle with the colors of the destination rectangle by using the Boolean OR operator.
"NOTSRCCOPY" Copies the inverted source rectangle to the destination.
"NOTSRCERASE" Combines the colors of the source and destination rectangles by using the Boolean OR operator and then inverts the resultant color.
"SRCAND" Combines the colors of the source and destination rectangles by using the Boolean AND operator.
"SRCCOPY" Copies the source rectangle directly to the destination rectangle.
"SRCERASE" Combines the inverted colors of the destination rectangle with the colors of the source rectangle by using the Boolean AND operator.
"SRCINVERT" Combines the colors of the source and destination rectangles by using the Boolean XOR operator.
"SRCPAINT" Combines the colors of the source and destination rectangles by using the Boolean OR operator.

sMode
Sets the stretching mode
StringMeaning
"BLACKONWHITE" Performs a Boolean AND operation using the color values for the eliminated and existing pixels.
"COLORONCOLOR" Deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
"HALFTONE" Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
"WHITEONBLACK" Performs a Boolean OR operation using the color values for the eliminated and existing pixels.

Remarks

The "active image" means the image currently selected by SelectClipboard calling.
If some transformations exist in the destination image, the function does nothing.