2.2.2.4.10.1.29 TextOrder

The TextOrder order contains a string.


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)

nXStart (optional)

...

nYStart (optional)

BackColor (optional)

...

ForeColor (optional)

...

CharExtra

BreakExtra

...

BreakCount

FontHeight (optional)

...

FontWidth (optional)

FontWeight (optional)

...

FontFlags (optional)

FontIndex (optional)

...

String (variable)

...

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 was 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 that was 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_TEXTOUT_ORDER from the Order Types enumeration. If the order is the same type as the last, this field is not present.

FieldBytes (2 bytes): A 16-bit field, with each bit indicating which of the fields that follow the Bounds field is present. A bit 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

A

B

C

D

E

F

G

H

I

J

0

0

0

0

0

0

Where the bits are defined as:

Value

Description

A

                

The BackMode value is present.

B

                

The nXStart value is present.

C

                

The nYStart value is present.

D

                

The BackColor value is present.

E

                

The ForeColor value is present.

F

                

The FontHeight value is present.

G

                

The FontWidth value is present.

H

                

The FontWeight value is present.

I

                

The FontFlags value is present.

J

                

The FontIndex value is present.

The bits that are marked with 0 MUST be 0.

Bounds (13 bytes): A byte array of a BoundsData structure. This field is present only if the pControlFlags field 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 the FieldBytes field 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.

nXStart (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents the window's x-coordinate of the string.

nYStart (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents the window's y-coordinate of the string.

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

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

CharExtra (2 bytes): Reserved. MUST be set to zero when sent and MUST be ignored on receipt.

BreakExtra (2 bytes): Reserved. MUST be set to zero when sent and MUST be ignored on receipt.

BreakCount (2 bytes): Reserved. MUST be set to zero when sent and MUST be ignored on receipt.

FontHeight (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents the height of the font, in logical units.<24>

FontWidth (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents the width of the font, in logical units.<25>

FontWeight (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents the weight of the font, in logical units from 0x00000000 through 0x000003E8 (1000).

FontFlags (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents a bitmap of the following values, indicating attributes of the font.

Value

Meaning

NF_FIXED_PITCH

0x00000001

The text SHOULD use a fixed pitch.

NF_FIXED_SIZE

0x00000002

The text SHOULD use a fixed size.

NF_ITALIC

0x00000004

The text SHOULD be italic.

NF_UNDERLINE

0x00000008

The text SHOULD be underlined.

NF_STRIKEOUT

0x00000010

The text SHOULD be struck out.

NF_TRUETYPE

0x00000080

The text SHOULD be drawn with a TrueType font.

FontIndex (2 bytes): This value MUST be present if the corresponding bit from the FieldBytes field is set. This represents the index of the font in the font table. The font index is an index into an array of font names. For example, 0x41 is the first index into the remote font table that starts with the character 'A'.

String (variable): The text to be drawn. The first byte of the string is an integer that indicates the length of the string. The string MUST be from 1 to 256 bytes in length.