sun.java2d.pipe.LoopPipe Java Examples
The following examples show how to use
sun.java2d.pipe.LoopPipe.
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: X11Renderer.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #2
Source File: X11Renderer.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #3
Source File: XRRenderer.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #4
Source File: X11Renderer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #5
Source File: XRRenderer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #6
Source File: GDIRenderer.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == sg2d.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #7
Source File: SunGraphics2D.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
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 #8
Source File: GDIRenderer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == sg2d.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #9
Source File: XRRenderer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #10
Source File: X11Renderer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #11
Source File: SunGraphics2D.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
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: GDIRenderer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == sg2d.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #13
Source File: XRRenderer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #14
Source File: X11Renderer.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #15
Source File: SunGraphics2D.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
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 #16
Source File: SunGraphics2D.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
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 #17
Source File: XRRenderer.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #18
Source File: GDIRenderer.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == sg2d.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #19
Source File: SunGraphics2D.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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 #20
Source File: X11Renderer.java From hottub with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #21
Source File: XRRenderer.java From hottub with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #22
Source File: GDIRenderer.java From hottub with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == sg2d.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #23
Source File: SunGraphics2D.java From hottub with GNU General Public License v2.0 | 5 votes |
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 #24
Source File: X11Renderer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #25
Source File: XRRenderer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #26
Source File: GDIRenderer.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == sg2d.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #27
Source File: SunGraphics2D.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
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 #28
Source File: GDIRenderer.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { doShape(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { doFillSpans(sg2d, si); } finally { si.dispose(); } } else { doShape(sg2d, sg2d.stroke.createStrokedShape(s), true); } }
Example #29
Source File: X11Renderer.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { SunToolkit.awtLock(); try { long xgc = validate(sg2d); XFillSpans(sg2d.surfaceData.getNativeOps(), xgc, si, si.getNativeIterator(), 0, 0); } finally { SunToolkit.awtUnlock(); } } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }
Example #30
Source File: XRRenderer.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void draw(SunGraphics2D sg2d, Shape s) { if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transx, transy; if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float) s; } else { p2df = new Path2D.Float(s); } transx = sg2d.transX; transy = sg2d.transY; } else { p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); } } else { fill(sg2d, sg2d.stroke.createStrokedShape(s)); } }