java - Android Canvas rendering -
i'm making game , want partially hide canvas of surfaceview this:
from this: 
 this: 
is there way canvas methods? in advance.
put code in method draws on canvas:
            path invertedcircle = new path();             int radius = (canvas.getwidth() < canvas.getheight()) ? canvas                     .getwidth() / 4 : canvas.getheight() / 2;             invertedcircle.addcircle(canvas.getwidth() / 2,                     canvas.getheight() / 2, radius, direction.cw);             invertedcircle.setfilltype(filltype.inverse_even_odd);             paint p = new paint();             p.setcolor(color.black);             canvas.drawpath(invertedcircle, p);   this fills except circle (at center) black. if have drawn rectangles , white background first should close.
Comments
Post a Comment