src/share/classes/sun/java2d/loops/MaskFill.java

Print this page

        

@@ -34,10 +34,11 @@
 import java.awt.image.WritableRaster;
 import sun.awt.image.BufImgSurfaceData;
 import sun.java2d.loops.GraphicsPrimitive;
 import sun.java2d.SunGraphics2D;
 import sun.java2d.SurfaceData;
+import sun.java2d.pipe.Region;
 
 /**
  * MaskFill
  * 1) fills rectangles of pixels on a surface
  * 2) performs compositing of colors based upon a Composite

@@ -192,14 +193,17 @@
             SurfaceData tmpData = BufImgSurfaceData.createData(dstBI);
 
             // REMIND: This is not pretty.  It would be nicer if we
             // passed a "FillData" object to the Pixel loops, instead
             // of a SunGraphics2D parameter...
+            Region clip = sg2d.clipRegion;
+            sg2d.clipRegion = null;
             int pixel = sg2d.pixel;
             sg2d.pixel = tmpData.pixelFor(sg2d.getColor());
             fillop.FillRect(sg2d, tmpData, 0, 0, w, h);
             sg2d.pixel = pixel;
+            sg2d.clipRegion = clip;
 
             maskop.MaskBlit(tmpData, sData, comp, null,
                             0, 0, x, y, w, h,
                             mask, offset, scan);
         }