2.3.1.5 META_STRETCHBLT Record

The META_STRETCHBLT Record specifies the transfer of a block of pixels according to a raster operation, with possible expansion or contraction.

The destination of the transfer is the current output region in the playback device context.

There are two forms of META_STRETCHBLT, one which specifies a bitmap as the source, and the other which uses the playback device context as the source. Definitions follow for the fields that are the same in the two forms of META_STRETCHBLT are defined below. The subsections that follow specify the packet structures of the two forms of META_STRETCHBLT.

The expansion or contraction is performed according to the stretching mode currently set in the playback device context, which MUST be a value from the StretchMode Enumeration (section 2.1.1.30).

RecordSize: A 32-bit unsigned integer that defines the number of 16-bit WORD structures, defined in [MS-DTYP] section 2.2.61, in the record.

RecordFunction: A 16-bit unsigned integer that defines this WMF record type. The low-order byte MUST match the low-order byte of the RecordType Enumeration (section 2.1.1.1) table value META_STRETCHBLT.

RasterOperation: A 32-bit unsigned integer that defines how the source pixels, the current brush in the playback device context, and the destination pixels are to be combined to form the new image. This code MUST be one of the values in the Ternary Raster Operation Enumeration (section 2.1.1.31).

SrcHeight: A 16-bit signed integer that defines the height, in logical units, of the source rectangle.

SrcWidth: A 16-bit signed integer that defines the width, in logical units, of the source rectangle.

YSrc: A 16-bit signed integer that defines the y-coordinate, in logical units, of the upper-left corner of the source rectangle.

XSrc: A 16-bit signed integer that defines the x-coordinate, in logical units, of the upper-left corner of the source rectangle.

DestHeight: A 16-bit signed integer that defines the height, in logical units, of the destination rectangle.

DestWidth: A 16-bit signed integer that defines the width, in logical units, of the destination rectangle.

YDest: A 16-bit signed integer that defines the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.

XDest: A 16-bit signed integer that defines the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.

The RecordSize and RecordFunction fields SHOULD be used to differentiate between the two forms of META_STRETCHBLT. If the following Boolean expression is TRUE, a source bitmap is not specified in the record.

 RecordSize == ((RecordFunction >> 8) + 3)

See section 2.3.1 for the specification of additional bitmap records.