
-----------------------------------
ali300211
Mon May 11, 2009 8:30 pm

need help turing wont draw a pic
-----------------------------------
What is it you are trying to achieve?
to make the program show the pic aswell as the words


What is the problem you are having?
the pic won't show


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)




% Here we select commands by number from a menu
var command,pic1,pic2,pic3,pic4,pic5 : int
loop
    put "Choose from 1-sing, 2-cry, 3-laugh, 4-???, 5-stop : " ..
    get command
    case command of
        label 1 :
            put "la la la" 
        pic1:=Pic.FileNew("C:ali/pictures/song.jpg")
Pic.Draw (pic1,25,50,picCopy)
delay(500)
cls
        label 2 :
            put "boo hoo"
        label 3 :
            put "ha ha ha"
        label 4 :
            put "nooooo"
        label 5:
             exit 
        label : 
          put "I don't understand"
  end case   
end loop
put "That's all folks"




Please specify what version of Turing you are using
Turing 4.1.1

-----------------------------------
DtY
Mon May 11, 2009 8:36 pm

RE:need help turing wont draw a pic
-----------------------------------
You should load the image once, outside of your main loop. It will run much faster.

You might need to tell Turing you want to run in graphics mode, try adding setscreen("Graphics: width,height") at the beginning.

-----------------------------------
OneTwo
Mon May 11, 2009 8:52 pm

RE:need help turing wont draw a pic
-----------------------------------
The code is fine, as I have just tested it except with a different picture and it shows both text and picture. 

pic1:=Pic.FileNew("C:ali/pictures/song.jpg") 

If your getting an error when you try to run it. Make sure the file path is correct. For example, the current filepath of your file is incorrect in syntax. 

It should read "C:/ali/...".

Try to describe more of your problem, like do you just see a blank picture? If so, your filepath might not be right.

-----------------------------------
DanTheMan
Thu May 14, 2009 8:30 am

RE:need help turing wont draw a pic
-----------------------------------
Don't put the file path in turing. You just have to put the name of the picture and put the picture in the same folder as your file. It's really anal.

-----------------------------------
Dusk Eagle
Thu May 14, 2009 1:35 pm

Re: need help turing wont draw a pic
-----------------------------------
Umm... putting the file path can be quite useful if the program is located in a different directory than the main program. For instance, if you're creating a tarball for your code, you don't store all your files in the default directory. You arrange them, putting pictures in a child directory. On small projects though, it really doesn't matter whether the pictures are saved in the same directory as the source or not.

-----------------------------------
DanTheMan
Fri May 15, 2009 8:37 am

Re: need help turing wont draw a pic
-----------------------------------
Umm... putting the file path can be quite useful if the program is located in a different directory than the main program. For instance, if you're creating a tarball for your code, you don't store all your files in the default directory. You arrange them, putting pictures in a child directory. On small projects though, it really doesn't matter whether the pictures are saved in the same directory as the source or not.

Okay, thanks for that correction.
