2.2.2.4.10.1.4 ChordOrder

The ChordOrder packet contains a chord.


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

pControlFlags

OrderType (optional)

FieldBytes

...

Bounds (13 bytes, optional)

...

...

...

BackMode (optional)

nLeftRect (optional)

nTopRect (optional)

nRightRect (optional)

nBottomRect (optional)

nXStart (optional)

nYStart (optional)

nXEnd (optional)

nYEnd (optional)

BackColor (optional)

ForeColor (optional)

...

BrushOrgX (optional)

BrushOrgY (optional)

BrushStyle (optional)

BrushHatch

BrushExtra

...

...

ROP2 (optional)

PenStyle (optional)

PenWidth (optional)

PenColor (optional)

ArcDirection (optional)

pControlFlags (1 byte): MUST be set to the value OE2_CF_STANDARD_ENC from the OE2 Control Flags enumeration. If the order differs in type from the last order that is sent, this field contains the bitwise AND of the value OE2_CF_TYPE_CHANGE. If the bounding rectangle has changed since the last order of the same type, this field contains the bitwise AND of the value OE2_CF_BOUNDS. If the coordinates of the bounding rectangle are specified as deltas from the last bounding rectangle used, this field contains the bitwise AND of the value OE2_CF_DELTACOORDS.

OrderType (1 byte): If the order differs in type from the last, this field MUST contain the value OE2_CHORD_ORDER from the Order Types enumeration. If the order is the same type as the last, this field is not present.

FieldBytes (3 bytes): A 24-bit field, with each bit indicating which of the fields that follow Bounds is present. A bit that is set to 1 indicates that the field is present and its value has changed since the same order type was last sent.


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

0

0

0

0

0

0

0

0

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

0

0

0

0

0

Where the bits are defined as:

Value

Description

A

                

The BackMode value is present.

B

                

The nLeftRect value is present.

C

                

The nTopRect value is present.

D

                

The nRightRect value is present.

E

                

The nBottomRect value is present.

F

                

The nXStart value is present.

G

                

The nYStart value is present.

H

                

The nXEnd value is present.

I

                

The nYEnd value is present.

J

                

The BackColor value is present.

K

                

The ForeColor value is present.

L

                

The BrushOrgX value is present.

M

                

The BrushOrgY value is present.

N

                

The BrushStyle value is present.

O

                

The ROP2 value is present.

P

                

The PenStyle value is present.

Q

                

The PenWidth value is present.

R

                

The PenColor value is present.

S

                

The ArcDirection value is present.

Bits marked with 0 MUST be 0.

Bounds (13 bytes): A byte array of a BoundsData structure. This field is present only if pControlFlags contains the bitwise AND of the value OE2_CF_BOUNDS from the OE2 Control Flags enumeration.

BackMode (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents one of the BackMode values that are defined in section 2.2.1.2.1 and that specify how the foreground and background SHOULD be mixed.

nLeftRect (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the left edge of the bounding rectangle, in screen coordinates.

nTopRect (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the top edge of the bounding rectangle, in screen coordinates.

nRightRect (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the right edge of the bounding rectangle, in screen coordinates.

nBottomRect (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the bottom edge of the bounding rectangle, in screen coordinates.

nXStart (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the x-coordinate of the first radial endpoint.

nYStart (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the y-coordinate of the first radial endpoint.

nXEnd (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the x-coordinate of the second radial endpoint.

nYEnd (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the y-coordinate of the second radial endpoint.

BackColor (3 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the background color value that is specified by a byte array of a TSHR_COLOR structure.

ForeColor (3 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the foreground color value that is specified by a byte array of a TSHR_COLOR structure.

BrushOrgX (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the x-offset at which the brush begins. The offset is based on window coordinates where the origin of (0,0) is upper left.

BrushOrgY (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the y-offset at which the brush begins. The offset is based on window coordinates where the origin of (0,0) is upper left.

BrushStyle (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This represents one of the BrushStyle values that are defined in section 2.2.1.2.3.

BrushHatch (1 byte): If BrushStyle is set to BS_PATTERN, this field is the first byte of the 64-by-64 pixel monochrome bitmap of the brush, laid out in top-to-bottom, left-to-right order. If set to BS_HATCHED, the BrushStyle values that are defined in section 2.2.1.2.2 specify the orientation of the lines that are used to create the hatch. Otherwise, this field is not used.

BrushExtra (7 bytes): If BrushStyle is set to BS_PATTERN, this field is the last seven bytes of the 64-by-64 pixel monochrome bitmap of the brush, laid out in top-to-bottom, left-to-right order. Otherwise, this field is not used.

ROP2 (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This represents one of the ROP2 values that are defined in section 2.2.1.2.5 and that specify the mix mode of the foreground.

PenStyle (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This represents one of the PenStyle values that are defined in section 2.2.1.2.4.

PenWidth (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the width, in pixels, of the pen.

PenColor (3 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the color value of the pen and is specified by a byte array of a TSHR_COLOR structure.

ArcDirection (1 byte): This value MUST be present if the corresponding bit from FieldBytes is set. This field represents one of the following values and indicates the direction in which the arc SHOULD be drawn.

Value

Meaning

ORD_ARC_COUNTERCLOCKWISE

0x01

The arc SHOULD be drawn counterclockwise.

ORD_ARC_CLOCKWISE

0x02

The arc SHOULD be drawn clockwise.