Answer the question
In order to leave comments, you need to log in
How to draw on SurfaceView while showing a picture from the camera?
Interested in how I can get the Surfaceview canvas and draw on it.
It is required to draw while the camera is running (apply effects to the camera).
Like this, just on SurfaceView :
Canvas canvas = new Canvas(drawingBitmap);
Paint paint = new Paint();
canvas.drawBitmap(sourceBitmap, 0, 0, paint);
paint.setXfermode(new PorterDuffXfermode (android.graphics.PorterDuff.Mode.SCREEN)); // способ смешивания
canvas.drawBitmap(destinationBitmap, 0, 0, paint);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question