2.3.1.4 META_SETDIBTODEV Record

The META_SETDIBTODEV Record sets a block of pixels in the playback device context using device-independent color data.

The source of the color data is a DIB.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

RecordSize

RecordFunction

ColorUsage

ScanCount

StartScan

yDib

xDib

Height

Width

yDest

xDest

DIB (variable)

...

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

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

ColorUsage (2 bytes): A 16-bit unsigned integer that defines whether the Colors field of the DIB contains explicit RGB values or indexes into a palette. This MUST be one of the values in the ColorUsage Enumeration (section 2.1.1.6).

ScanCount (2 bytes): A 16-bit unsigned integer that defines the number of scan lines in the source.

StartScan (2 bytes): A 16-bit unsigned integer that defines the starting scan line in the source.

yDib (2 bytes): A 16-bit unsigned integer that defines the y-coordinate, in logical units, of the source rectangle.

xDib (2 bytes): A 16-bit unsigned integer that defines the x-coordinate, in logical units, of the source rectangle.

Height (2 bytes): A 16-bit unsigned integer that defines the height, in logical units, of the source and destination rectangles.

Width (2 bytes): A 16-bit unsigned integer that defines the width, in logical units, of the source and destination rectangles.

yDest (2 bytes): A 16-bit unsigned integer that defines the y-coordinate, in logical units, of the upper-left corner of the destination rectangle.

xDest (2 bytes): A 16-bit unsigned integer that defines the x-coordinate, in logical units, of the upper-left corner of the destination rectangle.

DIB (variable): A variable-sized DeviceIndependentBitmap Object (section 2.2.2.9) that is the source of the color data.

The source image in the DIB is specified in one of the following formats:

  • An array of pixels with a structure specified by the ColorUsage field and information in the DeviceIndependentBitmap header.

  • A JPEG image [JFIF].<50>

  • A PNG image [W3C-PNG].<51>

See section 2.3.1 for the specification of additional bitmap records.