源码下载,点击这里

private void transformImageBitmap(ImageView child, Transformation t,
int rotationAngle) {
mCamera.save();
final Matrix imageMatrix = t.getMatrix();
imageHeight = child.getLayoutParams().height;
imageWidth = child.getLayoutParams().width;
final int rotation = Math.abs(rotationAngle);
Log.i("msg", imageHeight+ ","+imageWidth);
mCamera.translate(0.0f, 0.0f, 60.0f);
// As the angle of the view gets less, zoom in
if (rotation < mMaxRotationAngle) {
float zoomAmount = (float) (mMaxZoom + (rotation * 1.5));
mCamera.translate(0.0f, 0.0f, zoomAmount);
}
mCamera.rotateY(-rotationAngle);
mCamera.getMatrix(imageMatrix);
imageMatrix.preTranslate(-(imageWidth

本文介绍了如何使用matrix、transformation、float和shader技术,结合path路径创建类似旋转木马的3D视觉效果。虽然源码无法直接展示,但通过解析关键概念和步骤,读者可以理解并实现这一独特视觉效果。
最低0.47元/天 解锁文章

175





