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

Username:   Password: 
 RegisterRegister   
 Background help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
CSC




PostPosted: Wed Nov 26, 2008 4:17 pm   Post subject: Background help

Hey guys, this is the first time for me on this site and its pretty cool. Can anyone tell me how to put a normal picture background on my program for turing? thanks you.
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Wed Nov 26, 2008 4:32 pm   Post subject: RE:Background help

You mean how to load a picture from a file? Just make a variable of where you are going to store your picture and then make that variable equal Pic.FileNew (yourpicture). It would look like this:
Turing:
var picture : int := Pic.FileNew ("C:/Documents and Settings/blah blah blah where your picture is")


And whenever you want to draw your picture just put:
Turing:
Pic.Draw (picture, x, y, picCopy) % Replace x and y with the coordinates and you can change picCopy to other things for different effects. Look up Pic.Draw in Turing's help
Tony




PostPosted: Wed Nov 26, 2008 4:36 pm   Post subject: RE:Background help

you will then need Pic.Draw
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
CSC




PostPosted: Wed Nov 26, 2008 5:30 pm   Post subject: Re: Background help

well, upload a pic as a background for my program and the program should should work with the background. how do u do tht.
Pwah




PostPosted: Tue Dec 02, 2008 7:08 pm   Post subject: Re: Background help

code:

var picBackGround : int
picBackGround := Pic.FileNew ("yourimage.bmp")
Pic.Draw (picBackGround, 0, 0, picMerge)



note that yourimage.bmp for this code is located in the same folder as the .t program file.
Parker




PostPosted: Wed Dec 03, 2008 8:31 am   Post subject: Re: Background help

They seem to pretty much cover what you need but for any other help try this tutorial on pictures.

http://compsci.ca/v3/viewtopic.php?t=191
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  [ 6 Posts ]
Jump to:   


Style:  
Search: