2 ; Ullrich von Bassewitz, 22.06.2002
6 .include "tgi-kernel.inc"
8 .import _strlen, pushax, tosumulax
10 ;-----------------------------------------------------------------------------
11 ; unsigned __fastcall__ tgi_textwidth (const char* s);
12 ; /* Calculate the width of the text in pixels according to the current text
19 ldy _tgi_textdir ; Get text direction
24 ; strlen (s) * tgi_textmagx * tgi_fontsizex
26 ; Since we don't expect textmagx to have large values, we do the multiplication
42 jmp tosumulax ; Result * strlen (s)
44 ;-----------------------------------------------------------------------------
45 ; unsigned __fastcall__ tgi_textheight (const char* s);
46 ; /* Calculate the height of the text in pixels according to the current text
51 ldy _tgi_textdir ; Get text direction
52 bne width ; Jump if vertical
56 ; tgi_textmagy * tgi_fontsizey
58 ; Since we don't expect textmagx to have large values, we do the multiplication