[java] Transforming Coordinate System in J2D

Started by
0 comments, last by MarcusLM 23 years, 3 months ago
I want to Transform the coordinate system in Java 2D to have the positive Y axis run up the screen rather than down. I want to leave the positive x-axis running to the right. I know you can do this using AffineTransform but I have had no luck thus far. I don''t see anything that let''s me flip an axis. Can someone please help me out on this?? Thanks. Marcus
Advertisement
Never mind. I figured it out. I just had to do the following:

g2d.scale(1,-1); //where g2d is the Graphics2D object

This flipped the y-axis for me.

Marcus

This topic is closed to new replies.

Advertisement