'=========================================================================== ' Subject: COLOURED TEXT WITH SHADOW Date: 04-28-99 (07:08) ' Author: Alexander Meyer Code: QB, QBasic, PDS ' Origin: Meyer.Karl@t-online.de Packet: GRAPHICS.ABC '=========================================================================== ' //// ' 0(o o)0 '-------------------------ooO (_) Ooo--------------------- ' COLORTXT.BAS -- Written in QuickBasic 4.5 ' ' Name: Colored text & shadow ' Author: Alexander Meyer ' Date: 04-24-1999 ' Description: This program draws every pixel on the screen ' ina new colour and with a shadow. ' 'For questions or comments mail to: Meyer.Karl@t-online.de '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- DECLARE SUB ColoredText (C1%, C2%, C3%, C4%, SC%, Sx%, Sy%) 'C1%, C2%, C3%, C4% = Colours to draw 'SC% = Colour of shadow 'Sx% = x-length of shadow 'Sy% = y-length of shadow SCREEN 13 LOCATE 2, 2 PRINT "° Hello World ±" LOCATE 5, 5: PRINT "This is a little demonstration...." CIRCLE (150, 100), 40, 15 LINE (200, 150)-(250, 160), 15, BF CALL ColoredText(44, 46, 48, 50, 24, 2, 2) END SUB ColoredText (C1%, C2%, C3%, C4%, SC%, Sx%, Sy%) RANDOMIZE TIMER FOR x% = 1 TO 320 FOR y% = 1 TO 200 z% = POINT(x%, y%) IF z% <> 0 AND z% <> SC% THEN I% = INT(RND * 4) IF I% = 0 THEN PSET (x%, y%), C1% IF I% = 1 THEN PSET (x%, y%), C2% IF I% = 2 THEN PSET (x%, y%), C3% IF I% = 3 THEN PSET (x%, y%), C4% IF POINT(x% + Sx%, y% + Sy%) = 0 THEN PSET (x% + Sx%, y% + Sy%), SC% END IF END IF NEXT y% NEXT x% END SUB