I want to get the current bitmap associated with my canvas so that I can perform operations on it. I canβt figure out how to do this.
I saw some examples where you create a bitmap and set the canvas to use this bitmap, so obviously you can access it later, but I use the canvas returned from SurfaceHolder, so there is no constructor.
For example, examples often show such things:
Bitmap bmp = Bitmap.createBitmap(xxx, yyy, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(bmp);
- so at this moment i see bmp.
In my case, the canvas is:
final SurfaceHolder holder = getSurfaceHolder();
Canvas c = null;
try {
c = holder.lockCanvas();
So how can I get a bitmap for c?
@Reuben - , , . , , , "", , , . . , , , , - , . , , !