2012-12-24 62 views

回答

0

我会看看android API中的canvas,paint和path类。

+0

谢谢。我已经使用android.graphics.matrix解决了这个问题。并使用RectF根据此矩阵(位图,圆形,线..等)绘制形状:RectF r = new RectF(); matrix.mapRect(r); –

+0

我只是在缩放时遇到一些问题。我可以缩放图像,但不能绘制其上的图形。这里是代码: 保护无效onDraw(画布画布){ \t \t \t Paint p = new Paint(); \t \t \t canvas.drawColor(Color.BLACK); \t \t \t RectF r = new RectF(); \t \t \t matrix.mapRect(r); \t \t \t System.out.println(r.width()); \t \t \t canvas.drawBitmap(mapImg,r.left,r.top,p); } –