嗨,伙计们,我已经通过遵循 android 翻转动画教程来为图像设置动画,但是我遇到了这个问题,我尝试像在应用程序中那样为蝴蝶设置动画,ibutterfly
并且我正在使用这种方法来应用转换
protected void applyTransformation(float interpolatedTime, Transformation t) {
final float fromDegrees = mFromDegrees;
float degrees = fromDegrees
+ ((mToDegrees - fromDegrees) * interpolatedTime);
final float centerX = mCenterX;
final float centerY = mCenterY;
final Camera camera = mCamera;
final Matrix matrix = t.getMatrix();
camera.save();
camera.rotateY(degrees);
camera.getMatrix(matrix);
camera.restore();
matrix.preTranslate(-centerX, -centerY);
matrix.postTranslate(centerX, centerY);
matrix.preScale(scaleType.getScale(scale, interpolatedTime),
scaleType.getScale(scale, interpolatedTime), centerX, centerY);
}
我遇到的问题是图像从中间点旋转,但我需要将旋转轴更改为左角有没有办法做到这一点,我尝试了我所知道的一切,但我无法做到,如果有人可以帮助我我将非常感谢
这是我在Google Code上遵循的教程。