android - How to draw overlapping circles with radial gradient on the edge in a rectangular? -


i wish draw transparent circles within black rectangular , circles overlap partially. did using porterduffxfermode(mode.src_out) crop off 2 transparent circles black rectangular want add radial gradient (from transparent black) on edge can tell me how ? note not 1 circle. have @ least 2 circles overlapping

many thanks!

what code : https://www.dropbox.com/s/xbr2abgb4esorrj/img1.jpg?dl=0

what desire : https://www.dropbox.com/s/7ihsz77ukbsj1wf/img2.jpg?dl=0

bitmap bitmap = bitmap.createbitmap(mdimension, mdimension, bitmap.config.argb_8888);         canvas canvas = new canvas(bitmap);         canvas.setmatrix(matrix);         paint paint = new paint();         paint.setcolor(color.black);         paint.setalpha(200);          paint.setcolorfilter(createdimfilter());         canvas.drawrect(0, 0, canvas.getwidth(), canvas.getheight(), paint);          (point p : mpoints) {             paint transparentpaint = new paint();             transparentpaint.setcolor(color.transparent);             transparentpaint.setxfermode(new porterduffxfermode(mode.src_out));              transparentpaint.setantialias(true);             canvas.drawcircle((float) p.x, (float) p.y, radius, transparentpaint);//             transparentpaint.setxfermode(null);          } 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -