sun.java2d.pipe.SpanIterator Java Examples

The following examples show how to use sun.java2d.pipe.SpanIterator. 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: GDIRenderer.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
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]);
    }
}
 
Example #2
Source File: GDIRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
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]);
    }
}
 
Example #3
Source File: XRRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
protected void fillSpans(SunGraphics2D sg2d, SpanIterator si,
                         int transx, int transy) {
    SunToolkit.awtLock();
    try {
        validateSurface(sg2d);
        int[] spanBox = new int[4];
        while (si.nextSpan(spanBox)) {
            rectBuffer.pushRectValues(spanBox[0] + transx,
                                spanBox[1] + transy,
                                spanBox[2] - spanBox[0],
                                spanBox[3] - spanBox[1]);
        }
        tileManager.fillMask(((XRSurfaceData) sg2d.surfaceData));
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #4
Source File: GDIRenderer.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
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]);
    }
}
 
Example #5
Source File: GDIRenderer.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
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]);
    }
}
 
Example #6
Source File: XRRenderer.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
protected void fillSpans(SunGraphics2D sg2d, SpanIterator si,
                         int transx, int transy) {
    SunToolkit.awtLock();
    try {
        validateSurface(sg2d);
        int[] spanBox = new int[4];
        while (si.nextSpan(spanBox)) {
            rectBuffer.pushRectValues(spanBox[0] + transx,
                                spanBox[1] + transy,
                                spanBox[2] - spanBox[0],
                                spanBox[3] - spanBox[1]);
        }
        tileManager.fillMask(((XRSurfaceData) sg2d.surfaceData));
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #7
Source File: GDIRenderer.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
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]);
    }
}
 
Example #8
Source File: GDIRenderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
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]);
    }
}
 
Example #9
Source File: XRRenderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected void fillSpans(SunGraphics2D sg2d, SpanIterator si,
                         int transx, int transy) {
    SunToolkit.awtLock();
    try {
        validateSurface(sg2d);
        int[] spanBox = new int[4];
        while (si.nextSpan(spanBox)) {
            rectBuffer.pushRectValues(spanBox[0] + transx,
                                spanBox[1] + transy,
                                spanBox[2] - spanBox[0],
                                spanBox[3] - spanBox[1]);
        }
        tileManager.fillMask(((XRSurfaceData) sg2d.surfaceData));
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #10
Source File: XRRenderer.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
protected void fillSpans(SunGraphics2D sg2d, SpanIterator si,
                         int transx, int transy) {
    SunToolkit.awtLock();
    try {
        validateSurface(sg2d);
        int[] spanBox = new int[4];
        while (si.nextSpan(spanBox)) {
            rectBuffer.pushRectValues(spanBox[0] + transx,
                                spanBox[1] + transy,
                                spanBox[2] - spanBox[0],
                                spanBox[3] - spanBox[1]);
        }
        tileManager.fillMask(((XRSurfaceData) sg2d.surfaceData));
    } finally {
        SunToolkit.awtUnlock();
    }
}
 
Example #11
Source File: GeneralRenderer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #12
Source File: Blit.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void Blit(SurfaceData srcData,
                 SurfaceData dstData,
                 Composite comp,
                 Region clip,
                 int srcx, int srcy,
                 int dstx, int dsty,
                 int width, int height)
{
    ColorModel srcCM = srcData.getColorModel();
    ColorModel dstCM = dstData.getColorModel();
    // REMIND: Should get RenderingHints from sg2d
    CompositeContext ctx = comp.createContext(srcCM, dstCM,
                                              new RenderingHints(null));
    Raster srcRas = srcData.getRaster(srcx, srcy, width, height);
    WritableRaster dstRas =
        (WritableRaster) dstData.getRaster(dstx, dsty, width, height);

    if (clip == null) {
        clip = Region.getInstanceXYWH(dstx, dsty, width, height);
    }
    int span[] = {dstx, dsty, dstx+width, dsty+height};
    SpanIterator si = clip.getSpanIterator(span);
    srcx -= dstx;
    srcy -= dsty;
    while (si.nextSpan(span)) {
        int w = span[2] - span[0];
        int h = span[3] - span[1];
        Raster tmpSrcRas = srcRas.createChild(srcx + span[0], srcy + span[1],
                                              w, h, 0, 0, null);
        WritableRaster tmpDstRas = dstRas.createWritableChild(span[0], span[1],
                                                              w, h, 0, 0, null);
        ctx.compose(tmpSrcRas, tmpDstRas, tmpDstRas);
    }
    ctx.dispose();
}
 
Example #13
Source File: GeneralRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #14
Source File: X11Renderer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void XFillSpans(long pXSData, long xgc,
                SpanIterator si, long iterator, int transx, int transy)
{
    GraphicsPrimitive.tracePrimitive("X11FillSpans");
    super.XFillSpans(pXSData, xgc,
                     si, iterator, transx, transy);
}
 
Example #15
Source File: GeneralRenderer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #16
Source File: X11Renderer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void XFillSpans(long pXSData, long xgc,
                SpanIterator si, long iterator, int transx, int transy)
{
    GraphicsPrimitive.tracePrimitive("X11FillSpans");
    super.XFillSpans(pXSData, xgc,
                     si, iterator, transx, transy);
}
 
Example #17
Source File: GeneralRenderer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #18
Source File: GeneralRenderer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #19
Source File: GeneralRenderer.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #20
Source File: X11Renderer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void XFillSpans(long pXSData, long xgc,
                SpanIterator si, long iterator, int transx, int transy)
{
    GraphicsPrimitive.tracePrimitive("X11FillSpans");
    super.XFillSpans(pXSData, xgc,
                     si, iterator, transx, transy);
}
 
Example #21
Source File: Blit.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void Blit(SurfaceData srcData,
                 SurfaceData dstData,
                 Composite comp,
                 Region clip,
                 int srcx, int srcy,
                 int dstx, int dsty,
                 int width, int height)
{
    ColorModel srcCM = srcData.getColorModel();
    ColorModel dstCM = dstData.getColorModel();
    // REMIND: Should get RenderingHints from sg2d
    CompositeContext ctx = comp.createContext(srcCM, dstCM,
                                              new RenderingHints(null));
    Raster srcRas = srcData.getRaster(srcx, srcy, width, height);
    WritableRaster dstRas =
        (WritableRaster) dstData.getRaster(dstx, dsty, width, height);

    if (clip == null) {
        clip = Region.getInstanceXYWH(dstx, dsty, width, height);
    }
    int span[] = {dstx, dsty, dstx+width, dsty+height};
    SpanIterator si = clip.getSpanIterator(span);
    srcx -= dstx;
    srcy -= dsty;
    while (si.nextSpan(span)) {
        int w = span[2] - span[0];
        int h = span[3] - span[1];
        Raster tmpSrcRas = srcRas.createChild(srcx + span[0], srcy + span[1],
                                              w, h, 0, 0, null);
        WritableRaster tmpDstRas = dstRas.createWritableChild(span[0], span[1],
                                                              w, h, 0, 0, null);
        ctx.compose(tmpSrcRas, tmpDstRas, tmpDstRas);
    }
    ctx.dispose();
}
 
Example #22
Source File: X11Renderer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void XFillSpans(long pXSData, long xgc,
                SpanIterator si, long iterator, int transx, int transy)
{
    GraphicsPrimitive.tracePrimitive("X11FillSpans");
    super.XFillSpans(pXSData, xgc,
                     si, iterator, transx, transy);
}
 
Example #23
Source File: GeneralRenderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #24
Source File: GeneralRenderer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #25
Source File: Blit.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void Blit(SurfaceData srcData,
                 SurfaceData dstData,
                 Composite comp,
                 Region clip,
                 int srcx, int srcy,
                 int dstx, int dsty,
                 int width, int height)
{
    ColorModel srcCM = srcData.getColorModel();
    ColorModel dstCM = dstData.getColorModel();
    // REMIND: Should get RenderingHints from sg2d
    CompositeContext ctx = comp.createContext(srcCM, dstCM,
                                              new RenderingHints(null));
    Raster srcRas = srcData.getRaster(srcx, srcy, width, height);
    WritableRaster dstRas =
        (WritableRaster) dstData.getRaster(dstx, dsty, width, height);

    if (clip == null) {
        clip = Region.getInstanceXYWH(dstx, dsty, width, height);
    }
    int span[] = {dstx, dsty, dstx+width, dsty+height};
    SpanIterator si = clip.getSpanIterator(span);
    srcx -= dstx;
    srcy -= dsty;
    while (si.nextSpan(span)) {
        int w = span[2] - span[0];
        int h = span[3] - span[1];
        Raster tmpSrcRas = srcRas.createChild(srcx + span[0], srcy + span[1],
                                              w, h, 0, 0, null);
        WritableRaster tmpDstRas = dstRas.createWritableChild(span[0], span[1],
                                                              w, h, 0, 0, null);
        ctx.compose(tmpSrcRas, tmpDstRas, tmpDstRas);
    }
    ctx.dispose();
}
 
Example #26
Source File: X11Renderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void XFillSpans(long pXSData, long xgc,
                SpanIterator si, long iterator, int transx, int transy)
{
    GraphicsPrimitive.tracePrimitive("X11FillSpans");
    super.XFillSpans(pXSData, xgc,
                     si, iterator, transx, transy);
}
 
Example #27
Source File: GeneralRenderer.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);

    int[] span = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #28
Source File: GeneralRenderer.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createXorPixelWriter(sg2d, sData);

    int[] span = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}
 
Example #29
Source File: Blit.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public void Blit(SurfaceData srcData,
                 SurfaceData dstData,
                 Composite comp,
                 Region clip,
                 int srcx, int srcy,
                 int dstx, int dsty,
                 int width, int height)
{
    ColorModel srcCM = srcData.getColorModel();
    ColorModel dstCM = dstData.getColorModel();
    // REMIND: Should get RenderingHints from sg2d
    CompositeContext ctx = comp.createContext(srcCM, dstCM,
                                              new RenderingHints(null));
    Raster srcRas = srcData.getRaster(srcx, srcy, width, height);
    WritableRaster dstRas =
        (WritableRaster) dstData.getRaster(dstx, dsty, width, height);

    if (clip == null) {
        clip = Region.getInstanceXYWH(dstx, dsty, width, height);
    }
    int[] span = {dstx, dsty, dstx+width, dsty+height};
    SpanIterator si = clip.getSpanIterator(span);
    srcx -= dstx;
    srcy -= dsty;
    while (si.nextSpan(span)) {
        int w = span[2] - span[0];
        int h = span[3] - span[1];
        Raster tmpSrcRas = srcRas.createChild(srcx + span[0], srcy + span[1],
                                              w, h, 0, 0, null);
        WritableRaster tmpDstRas = dstRas.createWritableChild(span[0], span[1],
                                                              w, h, 0, 0, null);
        ctx.compose(tmpSrcRas, tmpDstRas, tmpDstRas);
    }
    ctx.dispose();
}
 
Example #30
Source File: GeneralRenderer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void FillSpans(SunGraphics2D sg2d, SurfaceData sData,
                      SpanIterator si)
{
    PixelWriter pw = GeneralRenderer.createSolidPixelWriter(sg2d, sData);

    int span[] = new int[4];
    while (si.nextSpan(span)) {
        GeneralRenderer.doSetRect(sData, pw,
                                  span[0], span[1], span[2], span[3]);
    }
}