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

Username:   Password: 
 RegisterRegister   
 How do I put text inside a picture.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
enchanted_bloom




PostPosted: Sun Jun 07, 2009 4:31 pm   Post subject: How do I put text inside a picture.

What is it you are trying to achieve?
I am trying to put text inside this chart I drew, I don't want to draw the letters, instead I want to write them


What is the problem you are having?
I'm having a little game at the top and a chart at the bottom, how do I put words inside the rows and columns of the chart?


Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)


Turing:


setscreen ("graphics:700;600")
    drawbox (0, 200, 700, 0, 5)
    drawline (0, 100, 700, 100, 5)
    drawline (140, 200, 140, 0, 5)
    drawline (280, 200, 280, 0, 5)
    drawline (420, 200, 420, 0, 5)
    drawline (560, 200, 560, 0, 5)


I want to add words in this chart
Please specify what version of Turing you are using
Turing 4.0.1
Sponsor
Sponsor
Sponsor
sponsor
ecookman




PostPosted: Sun Jun 07, 2009 5:03 pm   Post subject: RE:How do I put text inside a picture.

Oh thats not too hard, simply use the Locate () function

for example

locate (5 , 10)
put "Located text"

for a explanation on how it works use the help (F10) and search locate ()
tjmoore1993




PostPosted: Sun Jun 07, 2009 5:08 pm   Post subject: RE:How do I put text inside a picture.

Well, you could use a bunch of commands to fulfill your needs.

[syntax=Turing]
locatexy (10,20)
put "X = 10 and Y = 20"
[/syntax]

[syntax=Turing]
locate (maxrow,50)
put "hi"
[/syntax]

[syntax=Turing]
var FONT : int := Font.New ("Tahoma:8")
assert FONT > 0
Font.Draw ("STRING HERE!", 480, 22, FONT, black)
[/syntax]
enchanted_bloom




PostPosted: Sun Jun 07, 2009 5:08 pm   Post subject: RE:How do I put text inside a picture.

how come when I try that it says
Row of 50 is greater than maxrox(37)
tjmoore1993




PostPosted: Sun Jun 07, 2009 5:09 pm   Post subject: Re: RE:How do I put text inside a picture.

enchanted_bloom @ Sun Jun 07, 2009 5:08 pm wrote:
how come when I try that it says
Row of 50 is greater than maxrox(37)


The whole row x col will mess you up so uhmm, when you get that error it means your off screen Wink
ecookman




PostPosted: Sun Jun 07, 2009 5:09 pm   Post subject: RE:How do I put text inside a picture.

the locate function doesn't locate by pixles it does it by rows and columns
tjmoore1993




PostPosted: Sun Jun 07, 2009 5:10 pm   Post subject: RE:How do I put text inside a picture.

Turing:

locatexy (10,20)
put "X = 10 and Y = 20"


Turing:

locate (maxrow,50)
put "hi"


Turing:

var FONT : int := Font.New ("Tahoma:8")
assert FONT > 0
Font.Draw ("STRING HERE!", 480, 22, FONT, black)
enchanted_bloom




PostPosted: Sun Jun 07, 2009 5:12 pm   Post subject: RE:How do I put text inside a picture.

I got it
Thankyou very much!!
Sponsor
Sponsor
Sponsor
sponsor
ecookman




PostPosted: Sun Jun 07, 2009 5:13 pm   Post subject: RE:How do I put text inside a picture.

no problem Smile happy codding!
tjmoore1993




PostPosted: Sun Jun 07, 2009 5:14 pm   Post subject: RE:How do I put text inside a picture.

No problem, if you are unsure of things don't be scared to skim through Turing's Documentation

LOCATED HERE
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: