
-----------------------------------
enchanted_bloom
Sun Jun 07, 2009 4:31 pm

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



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




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

-----------------------------------
ecookman
Sun Jun 07, 2009 5:03 pm

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
Sun Jun 07, 2009 5:08 pm

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
Sun Jun 07, 2009 5:08 pm

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
Sun Jun 07, 2009 5:09 pm

Re: 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)

The whole row x col will mess you up so uhmm, when you get that error it means your off screen ;)

-----------------------------------
ecookman
Sun Jun 07, 2009 5:09 pm

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
Sun Jun 07, 2009 5:10 pm

RE:How do I put text inside a picture.
-----------------------------------
 
locatexy (10,20) 
put "X = 10 and Y = 20" 
 

 
locate (maxrow,50) 
put "hi" 
 

 
var FONT : int := Font.New ("Tahoma:8") 
assert FONT > 0 
Font.Draw ("STRING HERE!", 480, 22, FONT, black) 


-----------------------------------
enchanted_bloom
Sun Jun 07, 2009 5:12 pm

RE:How do I put text inside a picture.
-----------------------------------
I got it
Thankyou very much!!

-----------------------------------
ecookman
Sun Jun 07, 2009 5:13 pm

RE:How do I put text inside a picture.
-----------------------------------
no problem :) happy codding!

-----------------------------------
tjmoore1993
Sun Jun 07, 2009 5:14 pm

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

[url=http://compsci.ca/holtsoft/doc/]LOCATED HERE
