Search code examples
javaswingtransformationgraphics2d

Other than Affine Transformations using Graphics2D


Using Graphics2D object affine transformations can be done. But other than that, can we implement transformations like perspective transformations in a Graphics object so that we can use them in swing components..

There are ways that perspective transformations can be done, but I don't know a way to use them in swing components. Actually what I need here is to use perspective transformations in swing components..

If there is a way to get all the points that Graphics object is going to paint on screen and a way to feed points into a Graphics object, this can be done easily. Any suggestions or better methods..??

Thanks all..


Solution

  • First, note how affine and perspective transformations differ. In Swing, you can use either of these: