Computer Science Canada

flipping pictures horizontally

Author:  omni [ Sat Jan 03, 2004 4:48 pm ]
Post subject:  flipping pictures horizontally

I know that you can flip pictures vertically, but how would you do them horizontally?
I've tried rotating my picture 90 then flipped it then flipped it again 270, but it doesn't appear right. There are white patches on my margin.

This is my code:
(my drawing canvas is (100,75,maxx-100,maxy-75))
setscreen ("graphics:787;541,nobuttonbar")
var picture,x,y,count,count2,picture:int

picture:=Pic.New(101,76,maxx-101,maxy-76)
x:=Pic.Width(picture) div 2
y:=Pic.Height(picture) div 2
count2:=Pic.Rotate(picture,90,x,y)
count:=Pic.Flip(count2)
picture:=Pic.Rotate(count,270,x,y)

Pic.Draw(picture,100,75,picCopy)
Pic.Free(picture)

Author:  AsianSensation [ Sat Jan 03, 2004 5:03 pm ]
Post subject: 

Turing doesn't resize your canvas for you when you rotate the picture. So if you have a rectangular shaped pic, and you rotated it 90 degrees, then you would have part of the picture cut off. A solution is make your picture a square, with the rest of the space being white space, so when you picMerge it, it doesn't show up anyways.


: