have a problem to draw to com.serenegiant.widget.UVCCameraTextureView
Can you give me a tip to draw a line or circle or etc on MainActivity.
it is my code ... but fail to draw on that view.
final View view = findViewById(R.id.camera_view);
Bitmap imageBitmap = Bitmap.createBitmap(view.getWidth(),
view.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(imageBitmap);
float scale = getResources().getDisplayMetrics().density;
Paint p = new Paint();
p.setColor(Color.BLUE);
p.setTextSize(24*scale);
canvas.drawText("Hello", view.getWidth()/2,view.getHeight()/2, p);
canvas.save();
view.draw(canvas);
My issue is want to draw to cameraview (bitmapoverlay) . But I try all fail.
have a problem to draw to com.serenegiant.widget.UVCCameraTextureView
Can you give me a tip to draw a line or circle or etc on MainActivity. it is my code ... but fail to draw on that view.
final View view = findViewById(R.id.camera_view); Bitmap imageBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(imageBitmap); float scale = getResources().getDisplayMetrics().density; Paint p = new Paint(); p.setColor(Color.BLUE); p.setTextSize(24*scale); canvas.drawText("Hello", view.getWidth()/2,view.getHeight()/2, p); canvas.save(); view.draw(canvas); My issue is want to draw to cameraview (bitmapoverlay) . But I try all fail.
Thank you.
Rick