Back to main

 

Function 4 - draw a line of text

 

Characteristic:

  * eax = 4 is the number of functions

  * ebx = X*65536+Y, window or buffer coordinates

  * ecx = 0xXXRRGGBB, where

    * RR, GG, BB set the text color

    * XX=ABFFCSSS (bits):

      * A=1-the drawn line ends with zero

      * B=1-paint the background (color = edi)

      * FF sets font and encoding:

        0 = 6x9 cp866

        1 = 8x16 cp866

        2 = 8x16 UTF-16LE

        3 = 8x16 UTF-8

      * C=0-draw to window,

        C=1 - draw to clipboard (edi)

      * SSS = (size multiplier)-1, i.e. 0 = x1, 7 = x8

  * edx = pointer to the beginning of the line

  * esi = for A=0 string length, for A=1 ignored

  * edi = if B=1-background color,

          if C=1 - pointer to buffer

 

Returned value:

  * function does not return a value

Comments:

  * You cannot use B=1 and C=1 at the same time,

    because in both cases the edi register is used.

  * If SSS=0, the font may be smoothed,

    depending on the system setting.

  * Buffer structure:

Xsize dd

Ysize dd

picture rb Xsize*Ysize*4 ; 32 bits

 

Constants for registers:

  eax - SF_DRAW_TEXT (4)