
-----------------------------------
hq78
Wed Jan 05, 2005 8:10 pm

Font.Draw Problems!
-----------------------------------
var font1:int
var number:int:=15
The command Font.Draw (" ", x,y,font1,red)
why does it not let me use Font.Draw(number,x,y,font1,red)?

-----------------------------------
SuperGenius
Wed Jan 05, 2005 8:23 pm


-----------------------------------
i think that only a string can be used. so instead of:


Font.Draw(number,x,y,font1,red)

do this:


Font.Draw(intstr(number),x,y,font1,red)


-----------------------------------
hq78
Wed Jan 05, 2005 9:08 pm


-----------------------------------
PRAISES TO YOU!!!! Thanks SOOOO MUCH!!!

-----------------------------------
SuperGenius
Wed Jan 05, 2005 9:57 pm


-----------------------------------
for something like this if you looked in the help it would say the syntax required, which includes the var type for each parameter.

-----------------------------------
hq78
Thu Jan 06, 2005 4:20 pm


-----------------------------------
i looked for hours on this site before i posted so i guess i must have missed it

-----------------------------------
thaProfessor
Thu Jan 06, 2005 6:16 pm


-----------------------------------
im a newbie to programming and i just wanted to know how to make the statement you put in Font.Draw turn different colors or if you can do that ... any help would be nice

-----------------------------------
Cervantes
Thu Jan 06, 2005 6:38 pm


-----------------------------------
You sure can do that.  Check out the last parameter to the Font.Draw function:

Font.Draw (txtStr : string, x, y, fontID, Color : int)

So, just change the colour number.  Or you could use the RGB module.
Let's take a look at a simple example:


var font1 := Font.New ("Times New Roman:16")
for i : 0 .. maxcolour %usually, maxcolour will return 255
    Font.Draw ("Look, my colours are changing!", 10, 10, font1, i)
    delay (10)
end for


-----------------------------------
thaProfessor
Thu Jan 06, 2005 7:02 pm


-----------------------------------
thanks alot ...
