作者fake01 (ya da)
看板AndroidDev
标题[问题] 2D动画旋转
时间Mon Jul 4 05:53:14 2011
canvas.drawColor(Color.BLACK);//绘制黑色背景
Paint paint = new Paint();
paint.setColor(Color.RED);
canvas.drawRect(10, 10, 20, 20, paint);
canvas.drawRect(40, 40, 50, 50, paint);
画了两个方形
在XML中
<rotate
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:fromDegrees="0"
android:toDegrees="+350"
android:duration="1000"
/>
需要pivotXValue?pivotXType? 才能让图形 已x=30,y=30 做原地旋转?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.195.168.249