Computer Science Canada Problem with Fonts |
Author: | iop [ Thu May 20, 2004 1:33 pm ] |
Post subject: | Problem with Fonts |
I have this program Quote: var fontID : int
fontID := Font.New ("Times New Roman:18x12:Bold") var theDateTime : string theDateTime := Time.Date var l, u := 1 var h : int get h %how high it goes after completeing one row loop View.Update l := l + 1 if l >= maxx then u := u + h if u >= maxy then u := 0 end if l := 1 end if Font.Draw (Time.Date, l, u, fontID, black) delay (10) cls end loop How can I make it so that the User can choose the parameters in Quote: fontID := Font.New ("Times New Roman:18x12:Bold") |
Author: | SuperGenius [ Thu May 20, 2004 2:40 pm ] | ||||
Post subject: | |||||
have a string variable called font. Then ask the user to enter parameters seperately like:
then add them all together:
and then say fontID = (font) keep in mind that what i've just said is a concept, so you still have to work out the correct syntax and stuff on your own. |
Author: | iop [ Thu May 20, 2004 2:47 pm ] |
Post subject: | |
If you ment Quote: var fontID : int var size, ftype, font : string put "enter size" get size put "enter font type" get ftype font := "size" + "type" fontID := (font) Then it does not work |
Author: | SuperGenius [ Thu May 20, 2004 2:56 pm ] |
Post subject: | |
SuperGenius wrote: keep in mind that what i've just said is a concept, so you still have to work out the correct syntax and stuff on your own. This is not actual code. My idea of helping people is giving them advice and then they do it for themselves. Just collect the parameters and add them into one string and call font.new with your string. just make sure the syntax is right. |