我是Android新手,我希望缩小并放大画布或位图。我做了绘制应用程序,而不是我想缩小和放大我绘制的图片。任何人都可以建议我吗?
我想缩放:
private Bitmap mBitmap;
private Canvas mCanvas;
如何进行“图层绘制”?
答案 0 :(得分:0)
使用Canvas api
scale(float sx, float sy)
Preconcat the current matrix with the specified scale.
drawBitmap(int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, Paint paint)
Treat the specified array of colors as a bitmap, and draw it.