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? 
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
Post a Comment