@@ -25,8 +25,8 @@ public void initialize(int width, int height, int parentWidth, int parentHeight)
2525 super .initialize (width , height , parentWidth , parentHeight );
2626 this .mWidth = width ;
2727 this .mHeight = height ;
28- /* setFillAfter(true);
29- setDuration(15000);*/
28+ // setFillAfter(true);
29+ // setDuration(15000);
3030 }
3131
3232 @ Override
@@ -43,10 +43,11 @@ protected void applyTransformation(float interpolatedTime, Transformation t) {
4343 matrix.getValues(data);
4444 data[Matrix.MPERSP_1] = interpolatedTime * 1;
4545 matrix.setValues(data);*/
46- matrix .preScale (interpolatedTime , interpolatedTime , mWidth / 2 , mHeight / 2 );
47- matrix .preRotate (interpolatedTime * 360 , mWidth / 2 , mHeight / 2 );
48- matrix .preTranslate (-mWidth / 3 , -mHeight / 2 );
49- matrix .postTranslate (mWidth , mHeight );
46+ matrix .preScale (interpolatedTime , interpolatedTime );
47+ matrix .preRotate (interpolatedTime * 360 );
48+ //matrix.preTranslate(-mWidth / 2, -mHeight / 2);
49+ matrix .postTranslate (mWidth / 2 , mHeight / 2 );
50+ //t.setAlpha(interpolatedTime);
5051 Log .i (TAG , "-------------applyTransformation-------------" );
5152 Log .i (TAG , "interpolatedTime:" + interpolatedTime );//动画持续的时间,时间比例系数(0.0 到 1.0)之间
5253 Log .i (TAG , "transformation:" + t );//控制动画效果,Transformation包含两个信息,一个Alpha值,一个Matrix矩阵,这里的Matrix默认是一个单位矩阵
0 commit comments