Slick Forums

Discuss the Slick 2D Library
It is currently Wed Jun 19, 2013 11:20 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [Bug] Image.drawWarped
PostPosted: Sun Apr 29, 2012 1:58 pm 
Offline

Joined: Fri Apr 27, 2012 11:33 pm
Posts: 4
The paramters of the Image.drawWarped() method seem to be a little mixed up.
According to the javadoc files they should be like this:

x1 - The top left corner x coordinate
y1 - The top left corner y coordinate
x2 - The top right corner x coordinate
y2 - The top right corner y coordinate
x3 - The bottom right corner x coordinate
y3 - The bottom right corner y coordinate
x4 - The bottom left corner x coordinate
y4 - The bottom left corner y coordinate

When in fact they're used like this:

Parameters:
x1/y1 - The top left corner
x2/y2 - The bottom left corner
x3/y3 - The bottom right corner
x4/y4 - The top right corner

Also, rotation doesn't work correctly. Looks like the center of rotaion is displaced.

[edit] Mixed up the coordinates myself. Only x2/y2 and x4/y4 are swapped


Top
 Profile  
 
PostPosted: Sat May 12, 2012 5:46 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1477
Is this resolved then?


Top
 Profile  
 
PostPosted: Sun May 13, 2012 5:46 am 
Offline

Joined: Fri Apr 27, 2012 11:33 pm
Posts: 4
It's not resolved.
x2/y2 and x4/y4 are still swapped.

Rotation works fine though. Just hadn't read the line about that in the javadoc. :oops:


Top
 Profile  
 
PostPosted: Wed May 30, 2012 4:31 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1477
Fixed in dev branch.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group