3.2.2 META_CREATEPENINDIRECT Example

This section provides an example of a META_CREATEPENDIRECT Record (section 2.3.4.5).

 00000010:       08 00 00 00 FA 02 04 00 00 00 00 00 00 00
 00000020: FF 00


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 (0x00000008)

RecordFunction (0x02FA)

Pen Object

...

...

RecordSize (4 bytes): 0x00000008 specifies the number of WORD structures, defined in [MS-DTYP] section 2.2.61, in this record, which is equivalent to 16 (0x00000010) bytes.

RecordFunction (2 bytes): 0x02FA specifies a META_CREATEPENINDIRECT record from the RecordType Enumeration (section 2.1.1.1).

Pen Object (10 bytes): A Pen Object (section 2.2.1.4) that defines the pen to create.


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

PenStyle (0x0004)

PointS Object

...

ColorRef Object

...

PenStyle (2 bytes): 0x0004 specifies the PS_DASHDOTDOT style from the PenStyle Enumeration (section 2.1.1.23).

PointS Object (4 bytes): A PointS Object (section 2.2.2.16) that specifies the width of the pen.


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

x (0x0000)

y (0x0000)

x (2 bytes): 0x0000 specifies the width of the pen to be the default, which is 1 pixel.

y (2 bytes): 0x0000 is not used.

ColorRef Object (4 bytes): A ColorRef Object (section 2.2.2.8) that specifies a green pen color.


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

Reserved (0x00)

Blue (0x00)

Green (0xFF)

Red (0x00)

Reserved (1 byte): 0x00 is not used.

Blue (1 byte): 0x00 specifies no blue.

Green (1 byte): 0xFF specifies full intensity of green.

Red (1 byte): 0x00 specifies no red.

Note  The Pen Object created by processing this record is assigned index 0 in the WMF Object Table (section 3.1.4.1).