Search in sources :

Example 21 with InvalidPipeException

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]);
    }
}
Also used : InvalidPipeException(sun.java2d.InvalidPipeException) Composite(java.awt.Composite) Region(sun.java2d.pipe.Region)

Aggregations

InvalidPipeException (sun.java2d.InvalidPipeException)21 SurfaceData (sun.java2d.SurfaceData)3 Color (java.awt.Color)2 SurfaceType (sun.java2d.loops.SurfaceType)2 Component (java.awt.Component)1 Composite (java.awt.Composite)1 Paint (java.awt.Paint)1 InvocationEvent (java.awt.event.InvocationEvent)1 AffineTransform (java.awt.geom.AffineTransform)1 Path2D (java.awt.geom.Path2D)1 ColorModel (java.awt.image.ColorModel)1 Win32GraphicsConfig (sun.awt.Win32GraphicsConfig)1 WComponentPeer (sun.awt.windows.WComponentPeer)1 SunGraphics2D (sun.java2d.SunGraphics2D)1 Region (sun.java2d.pipe.Region)1 AccelSurface (sun.java2d.pipe.hw.AccelSurface)1 GDIWindowSurfaceData (sun.java2d.windows.GDIWindowSurfaceData)1