开发者

Rotating A Tile In A BufferedImage

开发者 https://www.devze.com 2022-12-30 01:47 出处:网络
I have created a a bufferedImage of 6 tiles of 2 rows and 3 columnsand i w开发者_JAVA百科ant to rotate the last tile of the second row. This tile serves as a crossing for my animation.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号