CanvasEditor icon indicating copy to clipboard operation
CanvasEditor copied to clipboard

Is there any way to make the canvas background transparent?

Open ghost opened this issue 5 years ago • 1 comments

Please provide a way to edit or change the Paintview class's init method: fun initCanvas() { extraBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) extraCanvas = Canvas(extraBitmap) extraCanvas.drawColor(ContextCompat.getColor(context, android.R.color.white)) invalidate() }

ghost avatar Aug 16 '20 18:08 ghost

set canvas background color transparent in your fragment class.

canvas.setBackgroundColor(
            ContextCompat.getColor(
                requireContext(),
                android.R.color.transparent
            )
        )

The also set PaintView background color in CanvasEditorView class: mPaintView.setBackgroundColor(ContextCompat.getColor(context, android.R.color.transparent))

ZUCheema avatar Nov 16 '24 17:11 ZUCheema