views:

135

answers:

1

I have created a a bufferedImage of 6 tiles of 2 rows and 3 columns and i want to rotate the last tile of the second row. This tile serves as a crossing for my animation.

My problems are :

How can i get access to that specifc tile alone and rotate it alone without affecting others.

I have googled for a while but no answer.

A: 

Read this sample code on how to rotate a WritableRaster using AffineTransform and AffineTransformOp. You should be able to figure out how to obtain a WritableRaster from a tile in a BufferedImage if you look at the javadoc.

Disclaimer: I haven't ever done this myself. This is purely a research based answer.

Tim Bender