Rotating A Tile In A BufferedImage
I have created a a bufferedImage of 6 tiles of 2 rows and 3 columns and i w开发者_JAVA百科ant 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.
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.
精彩评论