2.3.8.1 EmfPlusSetTSClip Record
The EmfPlusSetTSClip record specifies clipping areas in the graphics device context for a terminal server.<31>
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type |
Flags |
||||||||||||||||||||||||||||||
Size |
|||||||||||||||||||||||||||||||
DataSize |
|||||||||||||||||||||||||||||||
Rects (variable) |
|||||||||||||||||||||||||||||||
... |
Type (2 bytes): An unsigned integer that identifies this record type as EmfPlusSetTSClip from the RecordType enumeration. The value MUST be 0x403A.
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
91
0
1
2
3
4
5
6
7
8
92
0
1
2
3
4
5
6
7
8
93
0
1C
NumRects
-
C (1 bit): The format of the rectangle data in the Rects field. If set, each rectangle is defined in 4 bytes. If clear, each rectangle is defined in 8 bytes.
-
NumRects (15 bits): The number of rectangles that are defined in the Rect field.
Size (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes in the entire record, including the 12-byte record header and record-specific data. The computation of this value is determined by the C bit in the Flags field, as shown in the following table.
-
C bit value
Meaning
0
NumRects rectangles, consisting of 8 bytes each, are defined in the Rects field, and Size is computed as follows:
-
Size = (NumRects * 0x00000008) + 0x0000000C
1
NumRects rectangles, consisting of 4 bytes each, are defined in the Rects field, and Size is computed as follows:
-
Size = (NumRects * 0x00000004) + 0x0000000C
-
DataSize (4 bytes): An unsigned integer that specifies the 32-bit-aligned number of bytes of record-specific data that follows. The computation of this value is determined by the C bit in the Flags field, as shown in the following table.
-
C bit value
Meaning
0
NumRects rectangles, consisting of 8 bytes each, are defined in the Rects field, and DataSize is computed as follows:
-
DataSize = NumRects * 0x00000008
1
NumRects rectangles, consisting of 4 bytes each, are defined in the Rects field, and DataSize is computed as follows:
-
DataSize = NumRects * 0x00000004
-
Rects (variable): An array of NumRects rectangles that define clipping areas. The format of this data is determined by the C bit in the Flags field.
The compression scheme for data in this record uses the following algorithm. Each point of each rectangle is encoded in either a single byte or 2 bytes. If the point is encoded in a single byte, the high bit (0x80) of the byte MUST be set, and the value is a signed number represented by the lower 7 bits. If the high bit is not set, then the value is encoded in 2 bytes, with the high-order byte encoded in the 7 lower bits of the first byte, and the low-order byte value encoded in the second byte.
Each point is encoded as the difference between the point in the current rectangle and the point in the previous rectangle. The bottom point of the rectangle is encoded as the difference between the bottom coordinate and the top coordinate on the current rectangle.
See section 2.3.8 for the specification of additional terminal server record types.