
-----------------------------------
david92ng
Thu Jan 31, 2008 1:47 pm

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:



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

-----------------------------------
Mackie
Thu Jan 31, 2008 6:31 pm

Re: Turning pictures.
-----------------------------------
Look into Pic.Rotate.

-----------------------------------
david92ng
Thu Jan 31, 2008 6:55 pm

Re: Turning pictures.
-----------------------------------
oh... darn i missed it -.- the turing manual should be more clear. thanks ^^
