2.2.2.4.10.1.9 ExtTextOrder

The ExtTextOrder packet contains a string to be displayed and positions for the individual characters.


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)

...

fuOptions

Left (optional)

...

Top (optional)

Right (optional)

...

Bottom (optional)

String (variable)

...

deltaX (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_EXTTEXTOUT_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 Bounds 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

K

L

M

N

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.

K

                

The Left value is present.

L

                

The Top value is present.

M

                

The Right value is present.

N

                

The Bottom 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 following values, which specify how the foreground and background SHOULD be mixed.

Value

Meaning

TRANSPARENT

0x0001

The region SHOULD be filled with the background color before the drawing is finished.

OPAQUE

0x0002

The region SHOULD NOT be filled with the background color before the drawing is finished.

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

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

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.

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 FieldBytes is set. This represents the height of the font, in logical units.<18>

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

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

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


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

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

T

K

U

I

S

P

Where the bits are defined as:

Value

Description

P

                

The text SHOULD use a fixed pitch.

S

                

The text SHOULD use a fixed size.

I

                

The text SHOULD be italic.

U

                

The text SHOULD be underlined.

K

                

The text SHOULD use strikethrough formatting.

T

                

The text SHOULD be drawn with a TrueType font.

FontIndex (2 bytes): This value MUST be present if the corresponding bit from FieldBytes 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'.

fuOptions (2 bytes): A bitmap of the following values MUST be present if the corresponding bit from FieldBytes is set, indicating the actions to apply to the text.

Value

Meaning

ETO_OPAQUE

0x0002

The background color fills the rectangle before the text is drawn.

ETO_CLIPPED

0x0004

The text is clipped to the rectangle.

Left (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the window coordinates of the left edge of the rectangle.

Top (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the window coordinates of the top edge of the rectangle.

Right (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the window coordinates of the right edge of the rectangle.

Bottom (2 bytes): This value MUST be present if the corresponding bit from FieldBytes is set. This represents the window's coordinates of the bottom edge of the rectangle.

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

deltaX (variable): A value MUST be present that represents an array of delta positions between the letters of the string. The first 2 bytes of the array represent the length of the array as an integer. The entries that follow correspond directly to the characters in String and specify the delta distance to the subsequent character. This field can be from 2 to 257 bytes in length.