Computer Science Canada

font help

Author:  skier [ Wed Nov 03, 2004 5:04 pm ]
Post subject:  font help

alright im trying to make this work grow until it gets to size 50. heres what i have so far but i dont work, any help?



code:

setscreen ("graphics: 600,450,offscreenonly")

var font1 : int
var big : int
big := 10

Draw.FillBox (0, 0, 600, 450, 7)
loop

    font1 := Font.New ("Snap ITC", : big)
    big := big + 1
   
    Draw.Text ("PACMAN", 200, 300, font1, 12)
   
    Time.Delay (10)
    View.Update
end loop

Author:  Mazer [ Wed Nov 03, 2004 5:26 pm ]
Post subject: 

Change the line to:
code:
font1 := Font.New ("Snap ITC :" + intstr (big))

But remember that you haven't made any checks to make it stop after 50. Also, you should call Font.Free on your font somewhere at the end of the loop.

Author:  skier [ Wed Nov 03, 2004 5:33 pm ]
Post subject: 

but hten the work becomesun readable

Author:  Mazer [ Wed Nov 03, 2004 5:39 pm ]
Post subject: 

So clear the screen.
code:

cls

Author:  skier [ Wed Nov 03, 2004 5:44 pm ]
Post subject: 

ill bet that i look really dumb, dont i

Author:  skier [ Wed Nov 03, 2004 5:54 pm ]
Post subject: 

quick question;
what does "intstr" actually do?

Author:  Mazer [ Wed Nov 03, 2004 6:21 pm ]
Post subject: 

Don't worry, I've seen dumber. Wink

intstr is a function that takes an integer as an input and returns a string.
An example:
code:
put intstr(8008135)

Takes the integer 8008135 and returns the string "8008135".

If you want to know what a function/procedure does, just type it into the turing editor and hit F8 to see what parameters it takes and what it's output type is (see status bar), or hit F9 to open the turing reference with more in depth information about it.

Author:  skier [ Wed Nov 03, 2004 6:30 pm ]
Post subject: 

thanks for the help


: