'=========================================================================== ' Subject: STRETCHED TEXT Date: 02-26-99 (17:41) ' Author: Alexander Meyer Code: QB, QBasic, PDS ' Origin: Meyer.Karl@t-online.de Packet: GRAPHICS.ABC '=========================================================================== ' //// ' 0(o o)0 '-------------------------ooO (_) Ooo--------------------- ' STRETCH.BAS -- Written in QuickBasic 4.5 ' ' Name: Stretched text ' Author: Alexander Meyer ' Date: 02-22-1999 ' Description: Stretched text.... ' 'For questions or comments mail to: Meyer.Karl@t-online.de '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ' 'PLEASE READ FIRST: 'This is not so comfortable yet, the original text must be printed in the 'first row on the screen, but it is removed after the stretched 'text is created. 'If you don't want to see the original text, you must work with GET and PUT. 'I know that there are other routines which don't need that.... 'By the way: You can choose between 5 modes to print the text. 'And you can add yours very simple! DECLARE SUB StretchText (Text$, x%, y%, ScrMode%, Colour%, Mode%) CALL StretchText("Stretched Text Example", 20, 50, 9, 15, 1) CALL StretchText("Another example....", 10, 120, 9, 12, 2) CALL StretchText("Hello World!", 5, 180, 9, 10, 3) CALL StretchText("How are you?", 30, 240, 9, 2, 4) CALL StretchText("Press any key", 300, 180, 9, 3, 5) DO: LOOP WHILE INKEY$ = "" END SUB StretchText (Text$, x%, y%, ScrMode%, Colour%, Mode%) SCREEN ScrMode% SELECT CASE ScrMode% CASE 1, 2, 7, 8, 13: l% = 8: h% = 8 CASE 9, 10: l% = 8: h% = 14 CASE 11, 12, 4: l% = 8: h% = 16 CASE 3: l% = 9: h% = 14 END SELECT LOCATE 1 PRINT Text$ FOR a% = 0 TO LEN(Text$) * l% - 1 FOR b% = 0 TO h% IF POINT(a%, b%) <> 0 THEN SELECT CASE Mode% CASE 1: PSET (x% + a% + a%, y% + b% + b%), Colour% CASE 2: PSET (x% + a% + a%, y% + b%), Colour% CASE 3: PSET (x% + a%, y% + b% + b%), Colour% CASE 4: PSET (x% + a% + b%, y% + b%), Colour% CASE 5: PSET (x% + a%, y% + b% + a%), Colour% 'Add your modes here END SELECT END IF NEXT b% NEXT a% LOCATE 1: PRINT SPACE$(LEN(Text$)) END SUB