Java Code Examples for sun.java2d.pipe.ShapeSpanIterator#getPathBox()

The following examples show how to use sun.java2d.pipe.ShapeSpanIterator#getPathBox() . 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: SunGraphics2D.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 2
Source File: SunGraphics2D.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 3
Source File: SunGraphics2D.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 4
Source File: SunGraphics2D.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 5
Source File: SunGraphics2D.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 6
Source File: SunGraphics2D.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int[] box = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box, sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 7
Source File: SunGraphics2D.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box, sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 8
Source File: SunGraphics2D.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 9
Source File: SunGraphics2D.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 10
Source File: SunGraphics2D.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 11
Source File: SunGraphics2D.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 12
Source File: SunGraphics2D.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 13
Source File: SunGraphics2D.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}
 
Example 14
Source File: SunGraphics2D.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void validateCompClip() {
    int origClipState = clipState;
    if (usrClip == null) {
        clipState = CLIP_DEVICE;
        clipRegion = devClip;
    } else if (usrClip instanceof Rectangle2D) {
        clipState = CLIP_RECTANGULAR;
        if (usrClip instanceof Rectangle) {
            clipRegion = devClip.getIntersection((Rectangle)usrClip);
        } else {
            clipRegion = devClip.getIntersection(usrClip.getBounds());
        }
    } else {
        PathIterator cpi = usrClip.getPathIterator(null);
        int box[] = new int[4];
        ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
        try {
            sr.setOutputArea(devClip);
            sr.appendPath(cpi);
            sr.getPathBox(box);
            Region r = Region.getInstance(box);
            r.appendSpans(sr);
            clipRegion = r;
            clipState =
                r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
        } finally {
            sr.dispose();
        }
    }
    if (origClipState != clipState &&
        (clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
    {
        validFontInfo = false;
        invalidatePipe();
    }
}