Computer Science Canada

What to use when I can't use Font.Draw

Author:  jasonlin6868 [ Mon May 26, 2008 3:42 pm ]
Post subject:  What to use when I can't use Font.Draw

Because of the fact that Font.Draw cannot read real and int numbers therefore I am looking for a command that is common to Font.Draw that can read both numbers and words.
Any suggestion?

Sad

Author:  Clayton [ Mon May 26, 2008 3:45 pm ]
Post subject:  RE:What to use when I can\'t use Font.Draw

Font.Draw (intstr (myInt),...)

Author:  jasonlin6868 [ Mon May 26, 2008 3:59 pm ]
Post subject:  RE:What to use when I can\'t use Font.Draw

Could you explain more specify?

Author:  Clayton [ Mon May 26, 2008 4:00 pm ]
Post subject:  RE:What to use when I can\'t use Font.Draw

Check out F10 for Font.Draw() and intstr() and realstr(). I think you'll figure it out.

Author:  jasonlin6868 [ Mon May 26, 2008 4:32 pm ]
Post subject:  RE:What to use when I can\'t use Font.Draw

Don't really get it. Do u have to do the realstr() thing outside or inside of the Font.Draw?

Author:  CodeMonkey2000 [ Mon May 26, 2008 4:33 pm ]
Post subject:  RE:What to use when I can\'t use Font.Draw

realstr() takes a real number, and converts it into a string. As Clayton already said, look up intsrt() and realstr() in the Turing help section.

Author:  Sean [ Mon May 26, 2008 5:34 pm ]
Post subject:  Re: What to use when I can't use Font.Draw

It's inside the Font.Draw where you have the text part which would be the beginning of your Font.Draw parameters.

Turing:


Font.Draw (intstr (variable name), ...)

Author:  I Smell Death [ Wed May 28, 2008 9:12 am ]
Post subject:  Re: What to use when I can't use Font.Draw

Here's an other sample

Turing:

var rNum:real:=3.14159
var iNum:int:=-2
var fn:int:=Font.New("serif")

Font.Draw("the real number is "+realstr(rNum,1)+" and the integer is "+intstr(iNum),5,5,fn,black)
Font.Free(fn)


: