2017-08-12 117 views
0

旋转图像后,我有这样的问题。图像被部分剪切,不按预期显示。在Java中旋转图像

旋转前:

Enter image description here

转动后:

Enter image description here

我使用此代码为旋转:

AffineTransform tx = new AffineTransform(); 
tx.rotate(Math.toRadians(61), image.getWidth()/2, image.getHeight()/2); 

AffineTransformOp op = new AffineTransformOp(
         tx, AffineTransformOp.TYPE_BILINEAR); 
image = op.filter(image, null); 
+1

https://stackoverflow.com/questions/10685016/rotating-an-image-in-java –

+0

什么是错的,结果呢?你期望的结果是什么? –

+0

@TCPN您在翻译效果中使用CSS。 –

回答

0

我想你可以使用它作为你的风格:

App-logo { animation: App-logo-spin infinite 20s linear;} 
+0

好的Bhai sahi hai –