2.3.4.19 EmfPlusFillPolygon Record

The EmfPlusFillPolygon record specifies filling the interior of a polygon.


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

Flags

Size

DataSize

BrushId

Count

PointData (variable)

...

Type (2 bytes): An unsigned integer that identifies this record type as EmfPlusFillPolygon from the RecordType enumeration. The value MUST be 0x400C.

Flags (2 bytes): An unsigned integer that provides information about how the operation is to be performed, and about the structure of the record.


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

S

C

X

X

P

X

X

X

X

X

X

X

X

X

X

X

S (1 bit): This bit indicates the type of data in the BrushId field.

If set, BrushId specifies a color as an EmfPlusARGB object. If clear, BrushId contains the index of an EmfPlusBrush object in the EMF+ Object Table.

C (1 bit): This bit indicates whether the PointData field specifies compressed data.

If set, PointData specifies absolute locations in the coordinate space with 16-bit signed integer coordinates. If clear, PointData specifies absolute locations in the coordinate space with 32-bit floating-point coordinates.

Note: If the P flag (below) is set, this flag is undefined and MUST be ignored.

X (1 bit): Reserved and MUST be ignored.

P (1 bit): This bit indicates whether the PointData field specifies relative or absolute locations.

If set, each element in PointData specifies a location in the coordinate space that is relative to the location specified by the previous element in the array. In the case of the first element in PointData, a previous location at coordinates (0,0) is assumed. If clear, PointData specifies absolute locations according to the C flag.

Note: If this flag is set, the C flag (above) is undefined and MUST be ignored.<25>

Size (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes in the entire record. At least 3 points MUST be specified.

Value

Meaning

0x0000001C ≤ value

If the P bit is set in the Flags field, the minimum Size is computed as follows:

 Size   = ((((Count * 0x00000002) + 0x00000014 + 0x00000003) / 4) * 4)

0x00000020 ≤ value

If the P bit is clear and the C bit is set in the Flags field, Size is computed as follows:

 Size   = (Count * 0x00000004) + 0x00000014

0x0000002C ≤ value

If the P bit is clear and the C bit is clear in the Flags field, Size is computed as follows:

 Size   = (Count * 0x00000008) + 0x00000014

DataSize (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes of record-specific data in the record. At least 3 points MUST be specified.

Value

Meaning

0x00000010 ≤ value

If the P bit is set in the Flags field, the minimum DataSize is computed as follows:

 DataSize   = ((((Count * 0x00000002) + 0x0000008 + 0x00000003) / 4) * 4)

0x00000014 ≤ value

If the P bit is clear and the C bit is set in the Flags field, DataSize is computed as follows:

 DataSize   = (Count * 0x00000004) + 0x00000008

0x00000020 ≤ value

If the P bit is clear and the C bit is clear in the Flags field, DataSize is computed as follows:

 DataSize   = (Count * 0x00000008) + 0x00000008

BrushId (4 bytes): An unsigned integer that defines the brush, the content of which is determined by the S bit in the Flags field.

Count (4 bytes): An unsigned integer that specifies the number of points in the PointData field. At least 3 points MUST be specified.

PointData (variable): An array of Count points that define the vertices of the polygon. The first two points in the array specify the first side of the polygon. Each additional point specifies a new side, the vertices of which include the point and the previous point. If the last point and the first point do not coincide, they specify the last side of the polygon.

The type of data in this array is specified by the Flags field, as follows:

Data Type

Meaning

EmfPlusPointR object

If the P flag is set in the Flags, the points specify relative locations.

EmfPlusPoint object

If the P bit is clear and the C bit is set in the Flags field, the points specify absolute locations with 16-bit signed integer values.

EmfPlusPointF object

If the P bit is clear and the C bit is clear in the Flags field, the points specify absolute locations with 32-bit floating-point values.

See section 2.3.4 for the specification of additional drawing record types.