Possible Duplicate:
square to trapezoid
Here is what i want to do. I'm currently drawing with Awt librairy and use the paintComponent method to draw (a grid for example). I draw colors, lines, images, etc. What i want to do is to take the Graphics g parameter of paintComponent and apply a trapezoid-like transformation after all my draw methods. My result will simulate a grid in space in 3D:
--------
- - - - -
- - - - -
- - - - -
----------------
like this.
Note: I don't want to draw a trapeze, or draw a rectangle into a trapeze. This won't work for me. And i'm open to change librairy (swing or whatever). I'v been searching for quite a while and i haven't found any example about this, clear enough at least for me to understand. Any tips, links? Thanks.
edit: I'm drawing in a JPanel