缩小放大位图或画布



我是Android的新手,我想缩小和放大画布或位图。我制作了绘图应用程序,而不是我想缩小和放大我绘制的图片。谁能建议我?

我想缩放:

private Bitmap mBitmap;
private Canvas mCanvas;

如何制作"图层绘制"?

使用 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.

最新更新