次の方法で共有


2.3.2 Clipping Record Types

The Clipping record types define and manage clipping regions. The clipping regions used by clipping record types are part of the Regions state element (section 3.1.1.2.1) in the playback device context (section 3.1).

Note: The EMR_SETMETARGN record does not specify parameters.

The following are the clipping record types.

Name

Section

Description

EMR_EXCLUDECLIPRECT

2.3.2.1

Specifies a clipping region that consists of the current clipping region minus the specified rectangle.

EMR_EXTSELECTCLIPRGN

2.3.2.2

Combines the specified region with the current clipping region, using the specified mode.

EMR_INTERSECTCLIPRECT

2.3.2.3

Specifies a clipping region from the intersection of the current clipping region and the specified rectangle.

EMR_OFFSETCLIPRGN

2.3.2.4

Specifies a clipping region as the current clipping region moved by a specified offset.

EMR_SELECTCLIPPATH

2.3.2.5

Specifies a clipping region as the current clipping region combined with the current path bracket, using the specified mode.

EMR_SETMETARGN

2.3.2

If the current metaregion is null, it is set to the current clipping region. Otherwise, the current metaregion is intersected with the current clipping region, and the result is the new metaregion.

After the operation, the current clipping region is set to null.

During playback, drawing occurs only within the intersection of the metaregion and clipping region.

This EMF record specifies no parameters.

The generic structure of clipping 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

ClippingRecordBuffer (variable, optional)

...

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

Name

Value

EMR_OFFSETCLIPRGN

0x0000001A

EMR_SETMETARGN

0x0000001C

EMR_EXCLUDECLIPRECT

0x0000001D

EMR_INTERSECTCLIPRECT

0x0000001E

EMR_SELECTCLIPPATH

0x00000043

EMR_EXTSELECTCLIPRGN

0x0000004B

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.

ClippingRecordBuffer (variable, optional): An array of bytes that contains the data for the clipping record. The size of this field is a multiple of 4 bytes.

The EMR_SETMETARGN record does not contain this field.


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

ClippingRecordParm (variable)

...

AlignmentPadding (variable, optional)

...

ClippingRecordParm (variable): An array of bytes that contains the parameters for the clipping 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.