次の方法で共有


2.3.5 Drawing Record Types

The Drawing record types perform graphics drawing and painting functions. The clipping regions used by drawing records are maintained in the Regions state element (section 3.1.1.2.1) in the playback device context (section 3.1).

The following are EMF drawing record types.

Name

Section

Description

EMR_ANGLEARC

2.3.5.1

Draws a line segment of an arc.

EMR_ARC

2.3.5.2

Draws an elliptical arc.

EMR_ARCTO

2.3.5.3

Draws an elliptical arc, resetting the current drawing position to the endpoint of the arc.

EMR_CHORD

2.3.5.4

Draws a chord, which is a region bounded by the intersection of an ellipse and a line segment, called a secant.

EMR_ELLIPSE

2.3.5.5

Draws an ellipse.

EMR_EXTFLOODFILL

2.3.5.1

Draws a line segment of an arc.

EMR_EXTTEXTOUTA

2.3.5.7

Draws an ASCII text string using the current font and text colors.

EMR_EXTTEXTOUTW

2.3.5.8

Draws a Unicode text string using the current font and text colors.

EMR_FILLPATH

2.3.5.9

Closes any open figures in the current path bracket and fills the path's interior with the current brush.

EMR_FILLRGN

2.3.5.10

Fills the specified region with the specified brush.

EMR_FRAMERGN

2.3.5.11

Draws a border around the specified region with the specified brush.

EMR_GRADIENTFILL

2.3.5.12

Fills the specified rectangle and triangle structures.

EMR_LINETO

2.3.5.13

Draws a line from the current position up to, but not including, the specified point. This record resets the current position to that point.

EMR_PAINTRGN

2.3.5.14

Paints the specified region with the current brush.

EMR_PIE

2.3.5.15

Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials.

EMR_POLYBEZIER

2.3.5.16

Draws one or more Bezier curves. The cubic Bezier curves are defined with the endpoints and control points specified in this record.

EMR_POLYBEZIER16

2.3.5.17

Draws one or more Bezier curves with the current pen.

EMR_POLYBEZIERTO

2.3.5.18

Draws one or more Bezier curves based on the current position.

EMR_POLYBEZIERTO16

2.3.5.19

Draws one or more Bezier curves based on the current position.

EMR_POLYDRAW

2.3.5.20

Draws a set of line segments and Bezier curves.

EMR_POLYDRAW16

2.3.5.21

Draws a set of line segments and Bezier curves.

EMR_POLYGON

2.3.5.22

Draws a polygon consisting of two or more vertexes connected by straight lines.

EMR_POLYGON16

2.3.5.23

Draws a polygon consisting of two or more vertexes connected by straight lines.

EMR_POLYLINE

2.3.5.24

Draws a series of line segments by connecting the points in the specified array.

EMR_POLYLINE16

2.3.5.25

Draws a series of line segments by connecting the points in the specified array.

EMR_POLYLINETO

2.3.5.26

Draws one or more straight lines based upon the current position.

EMR_POLYLINETO16

2.3.5.27

Draws one or more straight lines based upon the current position.

EMR_POLYPOLYGON

2.3.5.28

Paints a series of closed polygons. Each polygon is outlined with the current pen and filled with the current brush and polygon fill mode.

EMR_POLYPOLYGON16

2.3.5.29

Paints a series of closed polygons. Each polygon is outlined with the current pen and filled with the current brush and polygon fill mode.

EMR_POLYPOLYLINE

2.3.5.30

Draws multiple series of connected line segments.

EMR_POLYPOLYLINE16

2.3.5.31

Draws multiple series of connected line segments.

EMR_POLYTEXTOUTA

2.3.5.32

Draws one or more ASCII text strings using the current font and text colors.

EMR_POLYTEXTOUTW

2.3.5.33

Draws one or more Unicode text strings using the current font and text colors.

EMR_RECTANGLE

2.3.5.34

Draws a rectangle. The rectangle is outlined with the current pen and filled with the current brush.

EMR_ROUNDRECT

2.3.5.35

Draws a rectangle with rounded corners.

EMR_SETPIXELV

2.3.5.36

Defines the color of the pixel at the specified logical coordinates.

EMR_SMALLTEXTOUT

2.3.5.37

Outputs a string.

EMR_STROKEANDFILLPATH

2.3.5.38

Closes any open figures in a path, draws the outline of the path with the current pen, and fills its interior with the current brush.

EMR_STROKEPATH

2.3.5.39

Draws the specified path with the current pen.

The generic structure of drawing records is specified as follows.


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

Size

DrawingRecordBuffer (variable)

...

Type (4 bytes): An unsigned integer that defines the type of record. The drawing record types are listed in the following table. See the preceding table for descriptions of these records.

Name

Value

EMR_POLYBEZIER

0x00000002

EMR_POLYGON

0x00000003

EMR_POLYBEZIERTO

0x00000005

EMR_POLYLINETO

0x00000006

EMR_POLYPOLYLINE

0x00000007

EMR_POLYPOLYGON

0x00000008

EMR_SETPIXELV

0x0000000F

EMR_ANGLEARC

0x00000029

EMR_ELLIPSE

0x0000002A

EMR_RECTANGLE

0x0000002B

EMR_ROUNDRECT

0x0000002C

EMR_ARC

0x0000002D

EMR_CHORD

0x0000002E

EMR_PIE

0x0000002F

EMR_EXTFLOODFILL

0x00000035

EMR_LINETO

0x00000036

EMR_ARCTO

0x00000037

EMR_POLYDRAW

0x00000038

EMR_FILLPATH

0x0000003E

EMR_STROKEANDFILLPATH

0x0000003F

EMR_STROKEPATH

0x00000040

EMR_FILLRGN

0x00000047

EMR_FRAMERGN

0x00000048

EMR_PAINTRGN

0x0000004A

EMR_EXTTEXTOUTA

0x00000053

EMR_EXTTEXTOUTW

0x00000054

EMR_POLYBEZIER16

0x00000055

EMR_POLYGON16

0x00000056

EMR_POLYLINE16

0x00000057

EMR_POLYBEZIERTO16

0x00000058

EMR_POLYLINETO16

0x00000059

EMR_POLYPOLYLINE16

0x0000005A

EMR_POLYPOLYGON16

0x0000005B

EMR_POLYDRAW16

0x0000005C

EMR_POLYTEXTOUTA

0x00000060

EMR_POLYTEXTOUTW

0x00000061

EMR_SMALLTEXTOUT

0x0000006C

EMR_GRADIENTFILL

0x00000076

Size (4 bytes): An unsigned integer that specifies the size in bytes of this record in the metafile. This value MUST be a multiple of 4 bytes.

DrawingRecordBuffer (variable): An array of bytes that contains the remainder of the drawing 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

DrawingRecordParm (variable)

...

AlignmentPadding (variable, optional)

...

DrawingRecordParm (variable): An array of bytes that contains the parameters for the drawing record.

AlignmentPadding (variable, optional): An array of up to 3 bytes that pads the record so that its total size is a multiple of 4 bytes. This field MUST be ignored.

See section 2.3 for more EMF record types.