Draw.Text
Author |
Message |
cinnamonhugs
|
Posted: Sun Apr 02, 2006 12:12 am Post subject: Draw.Text |
|
|
why doesnt this work?
var font : int
font := Font.New ("serif:12")
assert font1 > 0
var width : int:= Font.Width ("This is in a serif font", font)
var height, ascent, descent, internalLeading : int
Font.Sizes (font, height, ascent, descent, internalLeading)
Draw.Text ("This is in a serif font", 50, 30, font, red)
Draw.Box (50, 30 + descent, 50 + width, 30 + height, brightblue)
Font.Free (font) |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
Posted: Sun Apr 02, 2006 12:15 am Post subject: (No subject) |
|
|
You have been warned before to use [code] tags. Please start doing so you will face consequences for not following simple rules.
As for your question. Please be more specific. What part about it is not working? The fact that "font1" has not been declared? Or that the box does not draw correctly? Or the colours are wrong...? What is it. |
|
|
|
|
|
HellblazerX
|
Posted: Sun Apr 02, 2006 11:40 am Post subject: (No subject) |
|
|
you misspelled your variable. It should be just font. |
|
|
|
|
|
Clayton
|
Posted: Wed Apr 05, 2006 6:36 pm Post subject: (No subject) |
|
|
wut exactly does assert do anyway? |
|
|
|
|
|
Cervantes
|
Posted: Wed Apr 05, 2006 7:03 pm Post subject: (No subject) |
|
|
It asserts (makes sure) that a given condition is true (not false). If it isn't true (is false), it exits the program. |
|
|
|
|
|
|
|