Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Draw.Text
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cinnamonhugs




PostPosted: 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
Sponsor
sponsor
Delos




PostPosted: 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




PostPosted: Sun Apr 02, 2006 11:40 am   Post subject: (No subject)

code:
assert font1 > 0


you misspelled your variable. It should be just font.
Clayton




PostPosted: Wed Apr 05, 2006 6:36 pm   Post subject: (No subject)

wut exactly does assert do anyway?
Cervantes




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: