src/share/classes/sun/java2d/pipe/BufferedRenderPipe.java

Print this page

        

*** 506,526 **** } } } public void draw(SunGraphics2D sg2d, Shape s) { ! if (sg2d.strokeState == sg2d.STROKE_THIN) { if (s instanceof Polygon) { ! if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon)s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } } Path2D.Float p2df; int transx, transy; ! if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { p2df = new Path2D.Float(s); } --- 506,526 ---- } } } public void draw(SunGraphics2D sg2d, Shape s) { ! if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { if (s instanceof Polygon) { ! if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon)s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; } } 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); }
*** 530,540 **** p2df = new Path2D.Float(s, sg2d.transform); transx = 0; transy = 0; } drawPath(sg2d, p2df, transx, transy); ! } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); } finally { si.dispose(); --- 530,540 ---- 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();
*** 545,559 **** } public void fill(SunGraphics2D sg2d, Shape s) { int transx, transy; ! if (sg2d.strokeState == sg2d.STROKE_THIN) { // Here we are able to use fillPath() for // high-quality fills. Path2D.Float p2df; ! if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { p2df = new Path2D.Float(s); } --- 545,559 ---- } public void fill(SunGraphics2D sg2d, Shape s) { int transx, transy; ! if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Here we are able to use fillPath() for // high-quality fills. Path2D.Float p2df; ! if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { p2df = new Path2D.Float(s); }
*** 567,577 **** fillPath(sg2d, p2df, transx, transy); return; } AffineTransform at; ! if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { // Transform (translation) will be done by FillSpans (we could // delegate to fillPolygon() here, but most hardware accelerated // libraries cannot handle non-convex polygons, so we will use // the FillSpans approach by default) at = null; --- 567,577 ---- fillPath(sg2d, p2df, transx, transy); return; } AffineTransform at; ! if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { // Transform (translation) will be done by FillSpans (we could // delegate to fillPolygon() here, but most hardware accelerated // libraries cannot handle non-convex polygons, so we will use // the FillSpans approach by default) at = null;