CanvasView icon indicating copy to clipboard operation
CanvasView copied to clipboard

Clearing screen makes drawing laggy.

Open mohsin-sayyed opened this issue 10 years ago • 2 comments

After clearing screen drawing becomes laggy.. Also eraser is not clearing the drawing its changing stoke color to white. It doesn't works on other background color.

mohsin-sayyed avatar Feb 16 '15 07:02 mohsin-sayyed

I'm sorry to late reply. Thank you for posting issue.

  • I'm sorry to late reply. Thank you for posting issue.

-> I think that this issue requires time for resolution (I don't have Android... So, I checked this issue by emulator).

  • Also eraser is not clearing the drawing its changing stoke color to white. It doesn't works on other backgrounf color.

-> This issue can be resolved by method that sets background color ("setBaseColor" method).

Thank you !!

Korilakkuma avatar Mar 22 '15 07:03 Korilakkuma

Its solution Laggy clear Canvas....

create canvas

  • Create canvas and add in linear group canvas = new CanvasView(this); canvas.setPaintStrokeWidth(10); canvas.setPaintStyle(Paint.Style.STROKE); canvas.setDrawer(CanvasView.Drawer.PEN); viewGroupParent = new ViewGroupParent(); lincanvas.addView(canvas);

clear

  • Remove canvas and create again.

    lincanvas.removeView(canvas); canvas = new CanvasView(this); canvas.setPaintStrokeWidth(10); canvas.setPaintStyle(Paint.Style.STROKE); canvas.setDrawer(CanvasView.Drawer.PEN); viewGroupParent = new ViewGroupParent(); lincanvas.addView(canvas);

aerdy avatar Sep 01 '16 06:09 aerdy