'===========================================================================
' Subject: Graphical Font                     Date: 06-15-01 (19:34)       
'  Author: Achilles Mina
                     Code: XBASIC                 
'  Origin: vvacme@worldonline.nl            Packet: XBASIC.ABC
'===========================================================================
' ####################
' #####  PROLOG  #####
' ####################
'
' By Achilles Mina
' A graphical font Example.
'
PROGRAM	"DOG"

	IMPORT	"xst"
	IMPORT	"xgr"

	DECLARE FUNCTION  Dog ()

' ####################
' #####  Dog ()  #####
' ####################


FUNCTION  Dog ()
UBYTE color, w, h, start, fin, inc, trick, woof

	XgrGetDisplaySize ("", @#displayWidth, @#displayHeight,@#windowBorderWidth, @#windowTitleHeight)
	w = (#displayWidth/2) - #windowBorderWidth - #windowBorderWidth
	h = (#displayHeight/2) - #windowBorderWidth - #windowBorderWidth -#windowTitleHeight
	XgrCreateWindow (@window, 0, 200, 150, w, h, 0, "")

	XgrSetWindowTitle (window, @"Dog")
	XgrCreateGrid (@grid, 0, 0, 0, w, h, window, 0, 0)
	XgrDisplayWindow (window)
	XgrClearGrid (grid, $$BrightBlue)
	start = 0 :	fin	= 500	:	inc = 50	:	color = $$BrightYellow

	FOR trick = 1 TO 2
		FOR dog = start TO fin STEP inc
			XgrCreateFont (@font, @"Courier", 400, 700, 0, dog)
			XgrSetGridFont (grid, font)
			XgrSetDrawpoint(grid,70,200)
			XgrDrawText (grid, color, @"OLD DOGS CAN JUMP")
			XstSleep(35)
		NEXT
		start = 500	:	fin = 0	:	inc = -50	:	color = $$White
		XstSleep(100)
	NEXT

	XstSleep(100)
	XgrClearGrid (grid, $$BrightBlue)
	XgrSetDrawpoint(grid,70,200)
	XgrDrawText (grid, $$White, @"OLD DOGS CAN JUMP")
	XstSleep(300)

	FOR woof = 1 TO 2
		XgrSetDrawpoint(grid,290,200)
		XgrDrawText (grid, $$BrightYellow, @"Woof!")
		XstSleep(300)
		XgrSetDrawpoint(grid,290,200)
		XgrDrawText (grid, $$BrightBlue, @"Woof!")
		XstSleep(300)
	NEXT
END FUNCTION
END PROGRAM

