fredsa / forplay

Automatically exported from code.google.com/p/forplay
Apache License 2.0
12 stars 4 forks source link

Disallow flipped source coordinates in Surface.drawImage() #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The sprite-rendering code in https://github.com/joelgwebber/xna-platformer 
takes advantage of flipping source coordinates in Surface.drawImage() to flip 
sprites horizontally. This works in Java2D and GL, but fails in <canvas>, where 
it's explicitly disallowed.

We should assert that source coordinates are in the correct order so that all 
platforms will be consistent. We also need a way to render flipped sprites, 
though the easiest thing to do there might simply be to invert the scale (see 
issue 32 for more on that).

Original issue reported on code.google.com by joelgwebber on 7 Jun 2011 at 1:29

GoogleCodeExporter commented 9 years ago

Original comment by jgw@google.com on 7 Jun 2011 at 1:33