📜  创建空位图android - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:21.708000             🧑  作者: Mango

代码示例1
int w = WIDTH_PX, h = HEIGHT_PX;

Bitmap.Config conf = Bitmap.Config.ARGB_8888; // see other conf types
Bitmap bmp = Bitmap.createBitmap(w, h, conf); // this creates a MUTABLE bitmap
Canvas canvas = new Canvas(bmp);

// ready to draw on that bitmap through that canvas