Get specific region of canvas in android -


i using canvas in android , have drew circle 4 partitions in center of screen , radius 300

i blocked how first potion of arc in circle , fill or manipulate progratically , dont want redraw above instead user has drew in first arc want region , repaint in other area

i tried getting computebounds gives me region out of first arc

i need closed boundry region of first arc in circle has 4 arcs means 4 partitions

any or hints appreciated

public class circleview extends view {      paint paint,paint1,paint2,paint3;      public circleview(context context) {         super(context);     }      public circleview(context context, @nullable attributeset attrs) {         super(context, attrs);         paint = new paint();         paint.setcolor(color.green);         paint1 = new paint();         paint1.setcolor(color.black);         paint2 = new paint();         paint2.setcolor(color.cyan);         paint3 = new paint();         paint3.setcolor(color.magenta);       }      public circleview(context context, @nullable attributeset attrs, int defstyleattr) {         super(context, attrs, defstyleattr);     }      public circleview(context context, @nullable attributeset attrs, int defstyleattr, int defstyleres) {         super(context, attrs, defstyleattr, defstyleres);     }      @override     protected void ondraw(canvas canvas) {         super.ondraw(canvas);          rectf rectf = new rectf();         rectf.set(50,20,900,480);        // canvas.drawarc (rectf, 90, 45, true, paint);        // canvas.drawarc (rectf, 180, 90, true, paint1);           canvas.drawarc(rectf, 135, 180, false, paint);         canvas.drawarc(rectf, 135, 180 - 1, false,paint1);         canvas.drawarc(rectf, 90, 180+ 1, false,paint2);         canvas.drawarc(rectf, 90, 180, false, paint3);         canvas.drawarc(rectf, 45, 180, false, paint);       }   } 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -