2 つの画像がある場合 (サイズは同じかどうかは自由です)、1 つの画像を別の画像に上書きするには、次のようにします。
// 2 bitmap images are : Bitmap image1, image2. You know how to get it right?
image1 = image1.copy(Config.ARGB_8888, true);
image2 = image2.copy(config.ARGB_8888, true);
//Get color at the pixel (0,0)
int color = image2.getPixel(0,0);
//Set the color of pixel (0,0) of image2 to same color with pixel (0,0) of image 1
image2.setPixel(0,0,color);
2 つのイメージは同じ構成でなければならないことに注意してください!!
マップに描画する場合:
//Your Bitmap map must config like above
Canvas canvas = new Canvas(map);
Paint paint = new Paint();
paint.setColor(Color.RED);
paint.setAntiAlias(true);
// Draw yourMakerBitmap from pixel(0,0) of your map
canvas.drawBitmap(yourMakerBitmap, 0, 0, paint);
あなたが電話した後canvas.drawBitmap(...)
、あなたmap
はそれをmaker
乗り越えます。map
new with で好きなことをできるようになりましたmaker
。