2 ; Ullrich von Bassewitz, 22.06.2002
6 .include "tgi-kernel.inc"
8 .import _strlen, pushax, tosumulax
10 .export _tgi_textheight
12 ;-----------------------------------------------------------------------------
13 ; unsigned __fastcall__ tgi_textwidth (const char* s);
14 ; /* Calculate the width of the text in pixels according to the current text
20 ldy _tgi_textdir ; Get text direction
25 ; strlen (s) * tgi_textmagx * tgi_fontsizex
27 ; Since we don't expect textmagx to have large values, we do the multiplication
43 jmp tosumulax ; Result * strlen (s)
45 ;-----------------------------------------------------------------------------
46 ; unsigned __fastcall__ tgi_textheight (const char* s);
47 ; /* Calculate the height of the text in pixels according to the current text
52 ldy _tgi_textdir ; Get text direction
53 bne width ; Jump if vertical
57 ; tgi_textmagy * tgi_fontsizey
59 ; Since we don't expect textmagx to have large values, we do the multiplication