Android 倒影实现算法
2010-12-18 08:03:58 来源:WEB开发网核心提示://xxxxcanvas.save();mMatrix.setPolyToPoly(src, 0, dst, 0, src.length >> 1);canvas.concat(mMatrix);//draw mirror imagecanvas.save(Canvas.MATRIX_SAVE_FLAG);
//xxxx
canvas.save();
mMatrix.setPolyToPoly(src, 0, dst, 0, src.length >> 1);
canvas.concat(mMatrix);
//draw mirror image
canvas.save(Canvas.MATRIX_SAVE_FLAG);
canvas.scale(1.0f, -1.0f);
canvas.translate(nX, -(nY + nH * 2));
canvas.clipRect(0, nH, nW, nH - m_nShadowH);
m_dw.draw(canvas);
canvas.restore();
//draw mask
canvas.save();
canvas.translate(nX, nY + nH);
canvas.drawRect(0, 0, nW, m_nShadowH, m_paint);
canvas.restore();
//xxxx
canvas.restore();
}
}
[]
更多精彩
赞助商链接