Java Code Examples for sun.java2d.SunGraphics2D#getSurfaceData()

The following examples show how to use sun.java2d.SunGraphics2D#getSurfaceData() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoopPipe.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int spanbox[] = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 2
Source File: LoopPipe.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int spanbox[] = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 3
Source File: LoopPipe.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int[] spanbox = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 4
Source File: LoopPipe.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int spanbox[] = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 5
Source File: LoopPipe.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int spanbox[] = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 6
Source File: LoopPipe.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int spanbox[] = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 7
Source File: LoopPipe.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
    // REMIND: Eventually, the plan is that it will not be possible for
    // fs to be null since the FillSpans loop will be the fundamental
    // loop implemented for any destination type...
    if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
        si = sg2d.clipRegion.filter(si);
        // REMIND: Region.filter produces a Java-only iterator
        // with no native counterpart...
    } else {
        sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
        if (fs != null) {
            fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
            return;
        }
    }
    int spanbox[] = new int[4];
    SurfaceData sd = sg2d.getSurfaceData();
    while (si.nextSpan(spanbox)) {
        int x = spanbox[0];
        int y = spanbox[1];
        int w = spanbox[2] - x;
        int h = spanbox[3] - y;
        sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
    }
}
 
Example 8
Source File: AlphaPaintPipe.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 9
Source File: AlphaPaintPipe.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 10
Source File: AlphaPaintPipe.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 11
Source File: AlphaPaintPipe.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 12
Source File: AlphaPaintPipe.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 13
Source File: AlphaPaintPipe.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 14
Source File: AlphaPaintPipe.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public TileContext(SunGraphics2D sg, PaintContext pc) {
    sunG2D = sg;
    paintCtxt = pc;
    paintModel = pc.getColorModel();
    dstData = sg.getSurfaceData();
    synchronized (AlphaPaintPipe.class) {
        if (cachedLastColorModel != null &&
            cachedLastColorModel.get() == paintModel)
        {
            this.lastRaster = cachedLastRaster;
            this.lastData = cachedLastData;
        }
    }
}
 
Example 15
Source File: SpanShapeRenderer.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public void renderBox(Object ctx, int x, int y, int w, int h) {
    SunGraphics2D sg2d = (SunGraphics2D) ctx;
    SurfaceData sd = sg2d.getSurfaceData();
    sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}
 
Example 16
Source File: SpanShapeRenderer.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public void renderBox(Object ctx, int x, int y, int w, int h) {
    SunGraphics2D sg2d = (SunGraphics2D) ctx;
    SurfaceData sd = sg2d.getSurfaceData();
    sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}
 
Example 17
Source File: SpanShapeRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public void renderBox(Object ctx, int x, int y, int w, int h) {
    SunGraphics2D sg2d = (SunGraphics2D) ctx;
    SurfaceData sd = sg2d.getSurfaceData();
    sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}
 
Example 18
Source File: SpanShapeRenderer.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void renderBox(Object ctx, int x, int y, int w, int h) {
    SunGraphics2D sg2d = (SunGraphics2D) ctx;
    SurfaceData sd = sg2d.getSurfaceData();
    sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}
 
Example 19
Source File: SpanShapeRenderer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public void renderBox(Object ctx, int x, int y, int w, int h) {
    SunGraphics2D sg2d = (SunGraphics2D) ctx;
    SurfaceData sd = sg2d.getSurfaceData();
    sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}
 
Example 20
Source File: SpanShapeRenderer.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public void renderBox(Object ctx, int x, int y, int w, int h) {
    SunGraphics2D sg2d = (SunGraphics2D) ctx;
    SurfaceData sd = sg2d.getSurfaceData();
    sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}