use of sun.java2d.InvalidPipeException in project jdk8u_jdk by JetBrains.
the class GDIRenderer method doFillSpans.
// REMIND: This is just a hack to get WIDE lines to honor the
// necessary hinted pixelization rules. This should be replaced
// by a native FillSpans method or a getHintedStrokeGeneralPath()
// method that could be filled by the doShape method more quickly.
public void doFillSpans(SunGraphics2D sg2d, SpanIterator si) {
int[] box = new int[4];
GDIWindowSurfaceData sd;
try {
sd = (GDIWindowSurfaceData) sg2d.surfaceData;
} catch (ClassCastException e) {
throw new InvalidPipeException("wrong surface data type: " + sg2d.surfaceData);
}
Region clip = sg2d.getCompClip();
Composite comp = sg2d.composite;
int eargb = sg2d.eargb;
while (si.nextSpan(box)) {
doFillRect(sd, clip, comp, eargb, box[0], box[1], box[2] - box[0], box[3] - box[1]);
}
}
Aggregations