2.3.4.4 META_CREATEPATTERNBRUSH Record

The META_CREATEPATTERNBRUSH Record creates a brush object with a pattern specified by a bitmap.<57>


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

Bitmap16 (14 bytes)

...

...

...

Reserved (18 bytes)

...

...

...

Pattern (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 WMF 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_CREATEPATTERNBRUSH.

Bitmap16 (14 bytes): A partial Bitmap16 Object (section 2.2.2.1), which defines parameters for the bitmap that specifies the pattern for the brush. Fields not described below are specified in section 2.2.2.1.


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

Type

Width

Height

WidthBytes

Planes

BitsPixel

Bits

...

Bits (4 bytes): This field MUST be ignored.

Reserved (18 bytes): This field MUST be ignored.

Pattern (variable): A variable-length array of bytes that defines the bitmap pixel data that composes the brush pattern. The length of this field, in bytes, can be computed from bitmap parameters as follows.

 (((Width * BitsPixel + 15) >> 4) << 1) * Height

The Width, BitsPixel, and Height values are specified in the Bitmap16 field of this record.

The BrushStyle Enumeration (section 2.1.1.4) table value for the brush object created by this record MUST be BS_PATTERN.

See section 2.3.4 for the specification of other Object Records.