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

Username:   Password: 
 RegisterRegister   
 Put statements.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Michael Hasson




PostPosted: Mon Jun 08, 2009 3:53 pm   Post subject: Put statements.

What is it you are trying to achieve?
How do i place a put statement on top of a drawfill box?
Sponsor
Sponsor
Sponsor
sponsor
wallc++




PostPosted: Mon Jun 08, 2009 3:59 pm   Post subject: Re: Put statements.

do you mean like putting text above a box?
Michael Hasson




PostPosted: Mon Jun 08, 2009 4:00 pm   Post subject: Re: Put statements.

I mean right on top of it.
BigBear




PostPosted: Mon Jun 08, 2009 4:23 pm   Post subject: RE:Put statements.

look into locatexy
Tony




PostPosted: Mon Jun 08, 2009 4:27 pm   Post subject: RE:Put statements.

put will draw a box of background colour behind itself. You might be looking for Font.Draw
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
BigBear




PostPosted: Mon Jun 08, 2009 4:30 pm   Post subject: RE:Put statements.

or colorback
Kharybdis




PostPosted: Mon Jun 08, 2009 4:41 pm   Post subject: RE:Put statements.

Turing:

procedure DrawFont (name : string, input : string, locationx, locationy : int)
    var font : int %font name
    %Example for description of name : "Papyrus:10:Bold"
    font := Font.New (name) %font is assigned to the name given in the parameters
    assert font > 0 %checks if the font exists
    Font.Draw (input, locationx, locationy, font, green) %draws what i want, in position locationx, locationy, with my desired font, also in green.
    Font.Free (font) %frees the font
end DrawFont



example of how to call the procedure:
Turing:
DrawFont("Papyrus:10:Bold","i am drawing this onto the screen!",300,300


this is just an example of how one would utlize Font.Draw ...
BigBear




PostPosted: Mon Jun 08, 2009 4:55 pm   Post subject: RE:Put statements.

You wouldn't need an assert statement because if the font doesn't exist turing will use arial
Sponsor
Sponsor
Sponsor
sponsor
Kharybdis




PostPosted: Mon Jun 08, 2009 7:37 pm   Post subject: Re: RE:Put statements.

BigBear @ Mon Jun 08, 2009 4:55 pm wrote:
You wouldn't need an assert statement because if the font doesn't exist turing will use arial


and what if the computer that the program is being run on doesn't have arial installed? picky, but ... hey Razz
Dusk Eagle




PostPosted: Mon Jun 08, 2009 10:40 pm   Post subject: Re: Put statements.

I don't have the Arial font yet it still works for me Razz ... I believe Turing will just default to whatever font you are using in its text window if a specified font is not installed.
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  [ 10 Posts ]
Jump to:   


Style:  
Search: