< prev index next >

src/java.desktop/macosx/classes/sun/java2d/CompositeCRenderer.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 82,96 **** arc.setArc(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN); draw(sg2d, arc); } ! public synchronized void drawPolyline(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) { doPolygon(sg2d, xpoints, ypoints, npoints, false, false); } ! public synchronized void drawPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) { doPolygon(sg2d, xpoints, ypoints, npoints, true, false); } public synchronized void fillRect(SunGraphics2D sg2d, int x, int y, int width, int height) { // create shape corresponding to this primitive --- 82,96 ---- arc.setArc(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN); draw(sg2d, arc); } ! public synchronized void drawPolyline(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) { doPolygon(sg2d, xpoints, ypoints, npoints, false, false); } ! public synchronized void drawPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) { doPolygon(sg2d, xpoints, ypoints, npoints, true, false); } public synchronized void fillRect(SunGraphics2D sg2d, int x, int y, int width, int height) { // create shape corresponding to this primitive
*** 118,132 **** arc.setArc(x, y, width, height, startAngle, arcAngle, Arc2D.PIE); fill(sg2d, arc); } ! public synchronized void fillPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) { doPolygon(sg2d, xpoints, ypoints, npoints, true, true); } ! public synchronized void doPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints, boolean ispolygon, boolean isfill) { GeneralPath gp = new GeneralPath(Path2D.WIND_NON_ZERO, npoints); gp.moveTo(xpoints[0], ypoints[0]); for (int i = 1; i < npoints; i++) { gp.lineTo(xpoints[i], ypoints[i]); } --- 118,132 ---- arc.setArc(x, y, width, height, startAngle, arcAngle, Arc2D.PIE); fill(sg2d, arc); } ! public synchronized void fillPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints) { doPolygon(sg2d, xpoints, ypoints, npoints, true, true); } ! public synchronized void doPolygon(SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill) { GeneralPath gp = new GeneralPath(Path2D.WIND_NON_ZERO, npoints); gp.moveTo(xpoints[0], ypoints[0]); for (int i = 1; i < npoints; i++) { gp.lineTo(xpoints[i], ypoints[i]); }
*** 194,204 **** public synchronized void drawString(SunGraphics2D sg2d, String str, double x, double y) { drawGlyphVector(sg2d, sg2d.getFont().createGlyphVector(sg2d.getFontRenderContext(), str), x, y); } ! public synchronized void drawChars(SunGraphics2D sg2d, char data[], int offset, int length, int x, int y) { drawString(sg2d, new String(data, offset, length), x, y); } public synchronized void drawGlyphVector(SunGraphics2D sg2d, GlyphVector glyphVector, double x, double y) { drawGlyphVector(sg2d, glyphVector, (float) x, (float) y); --- 194,204 ---- public synchronized void drawString(SunGraphics2D sg2d, String str, double x, double y) { drawGlyphVector(sg2d, sg2d.getFont().createGlyphVector(sg2d.getFontRenderContext(), str), x, y); } ! public synchronized void drawChars(SunGraphics2D sg2d, char[] data, int offset, int length, int x, int y) { drawString(sg2d, new String(data, offset, length), x, y); } public synchronized void drawGlyphVector(SunGraphics2D sg2d, GlyphVector glyphVector, double x, double y) { drawGlyphVector(sg2d, glyphVector, (float) x, (float) y);
< prev index next >