graphics - Java reverse clipping region? -


hi i'm making flash light game. make flashlight using arc2d , clip part of map part shows up, want part of map too.

is there anyway reverse clipped region , region not being clipped? enter image description here

how black region?

you can use area#subtract method obtain desired area:

rectangle2d screen =      new rectangle2d.double(0,0,screenwidth, screenheight); area result = new area(screen); area clippingarea = new area(yourarcclipshape); result.subtract(clippingarea); 

the result shape of full screen, except original "arc" clipping shape - is, black area in image.

related answers, showing light effects , image compositing:


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -