Question

I just compute bounding box for my strokes while stroke deletion. I want to delete that stroke and update my bounding area i.e my invalidate(rect) in my canvas. But it is not working.

How to achieve this, Here below is my code

 //DrawView.java 
public void onDraw(Canvas canvas) {

            canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);

            canvas.drawPath(mPath,mPaint);
         } 

 // Stroke.java 
 // stroke compare and deletion part
DrawView dr = new DrawView(this);
while(itr.hasNext())
    {
        Stroke p = itr.next();
        Stroke strokes =p;
        ArrayList<Dpoint> points = strokes.stroke_points;
        if(is_hit_stroke(points))
        {                   
            dr.invalidate(strokes.bounding_box);
            itr.remove();
            return true;
        }

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top