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

Username:   Password: 
 RegisterRegister   
 Turning pictures.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
david92ng




PostPosted: Thu Jan 31, 2008 1:47 pm   Post subject: Turning pictures.

Hey, while i use the draw.pic command, I use it as the sprite so i wonder how do you like turn a picture a certain degrees. For example, i have a plane that i use much like this:

code:


var left, right : int
left := Pic.FileNew ("Left2.JPG")
right := Pic.FileNew ("Right2.JPG")

    Input.KeyDown (chars)

    if chars (KEY_UP_ARROW) then
        Pic.Draw (right, x, y, picCopy)
        y := y + 7
        cls
    end if
    if chars (KEY_RIGHT_ARROW) then
        Pic.Draw (right, x, y, picCopy)
        chars2 := 1
        x := x + 7
        cls
    end if
    if chars (KEY_LEFT_ARROW) then
        Pic.Draw (left, x, y, picCopy)
        chars2 := 2
        x := x - 7
        cls
    end if
    if chars (KEY_DOWN_ARROW) then
        Pic.Draw (right, x, y, picCopy)
        y := y - 7
        cls
    end if
    if chars2 = 1 then
        Pic.Draw (right, x, y, picMerge)

        yy := Pic.Height (right) + y
        xx := Pic.Width (right) + x
    end if
    if chars2 = 2 then
        Pic.Draw (left, x, y, picMerge)

        yy := Pic.Height (left) + y
        xx := Pic.Width (left) + x
    end if


please ignore the tiny details, the point is that my plane can only go up, down, left, right and diagional. but the picture of the plane that is drawn can eather go left or right. so i want to know how to turn the picture that was drawn by a certain degree.

does anyone know a easy way? if so pls reply. i seen people with programs with this common thing but i cant seem to find that code... lol i got a feeling i have to adbandon the pic.draw >.< uhhh all the extra work
Sponsor
Sponsor
Sponsor
sponsor
Mackie




PostPosted: Thu Jan 31, 2008 6:31 pm   Post subject: Re: Turning pictures.

Look into Pic.Rotate.
david92ng




PostPosted: Thu Jan 31, 2008 6:55 pm   Post subject: Re: Turning pictures.

oh... darn i missed it -.- the turing manual should be more clear. thanks ^^
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  [ 3 Posts ]
Jump to:   


Style:  
Search: