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

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




PostPosted: 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)
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Sat Jan 03, 2004 5:03 pm   Post subject: (No 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.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: