< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2015, 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
*** 603,620 **** if (color.getCycleMethod() == LinearGradientPaint.CycleMethod.NO_CYCLE) { if ((this.fGraphicsStatesInt.get(kColorStateIndex) != kColorLinearGradient) || (lastPaint != sg2d.paint)) { this.fGraphicsStatesInt.put(kColorStateIndex, kColorLinearGradient); int numColor = color.getColors().length; ! int colorArray[] = new int[numColor]; for (int i = 0; i < numColor; i++) { colorArray[i] = color.getColors()[i].getRGB(); } this.fGraphicsStatesObject[kColorArrayIndex] = colorArray; int numFractions = color.getFractions().length; ! float fractionArray[] = new float[numFractions]; for (int i = 0; i < numFractions; i++) { fractionArray[i] = color.getFractions()[i]; } this.fGraphicsStatesObject[kFractionsArrayIndex] = color.getFractions(); --- 603,620 ---- if (color.getCycleMethod() == LinearGradientPaint.CycleMethod.NO_CYCLE) { if ((this.fGraphicsStatesInt.get(kColorStateIndex) != kColorLinearGradient) || (lastPaint != sg2d.paint)) { this.fGraphicsStatesInt.put(kColorStateIndex, kColorLinearGradient); int numColor = color.getColors().length; ! int[] colorArray = new int[numColor]; for (int i = 0; i < numColor; i++) { colorArray[i] = color.getColors()[i].getRGB(); } this.fGraphicsStatesObject[kColorArrayIndex] = colorArray; int numFractions = color.getFractions().length; ! float[] fractionArray = new float[numFractions]; for (int i = 0; i < numFractions; i++) { fractionArray[i] = color.getFractions()[i]; } this.fGraphicsStatesObject[kFractionsArrayIndex] = color.getFractions();
*** 637,654 **** if (color.getCycleMethod() == RadialGradientPaint.CycleMethod.NO_CYCLE) { if ((this.fGraphicsStatesInt.get(kColorStateIndex) != kColorRadialGradient) || (lastPaint != sg2d.paint)) { this.fGraphicsStatesInt.put(kColorStateIndex, kColorRadialGradient); int numColor = color.getColors().length; ! int colorArray[] = new int[numColor]; for (int i = 0; i < numColor; i++) { colorArray[i] = color.getColors()[i].getRGB(); } this.fGraphicsStatesObject[kColorArrayIndex] = colorArray; int numStops = color.getFractions().length; ! float stopsArray[] = new float[numStops]; for (int i = 0; i < numStops; i++) { stopsArray[i] = color.getFractions()[i]; } this.fGraphicsStatesObject[kFractionsArrayIndex] = color.getFractions(); --- 637,654 ---- if (color.getCycleMethod() == RadialGradientPaint.CycleMethod.NO_CYCLE) { if ((this.fGraphicsStatesInt.get(kColorStateIndex) != kColorRadialGradient) || (lastPaint != sg2d.paint)) { this.fGraphicsStatesInt.put(kColorStateIndex, kColorRadialGradient); int numColor = color.getColors().length; ! int[] colorArray = new int[numColor]; for (int i = 0; i < numColor; i++) { colorArray[i] = color.getColors()[i].getRGB(); } this.fGraphicsStatesObject[kColorArrayIndex] = colorArray; int numStops = color.getFractions().length; ! float[] stopsArray = new float[numStops]; for (int i = 0; i < numStops; i++) { stopsArray[i] = color.getFractions()[i]; } this.fGraphicsStatesObject[kFractionsArrayIndex] = color.getFractions();
*** 1029,1039 **** } renderer.doArc(this, x, y, width, height, startAngle, arcAngle, type, isfill); } ! public void doPolygon(CRenderer renderer, SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints, boolean ispolygon, boolean isfill) { // System.err.println("--- doPolygon"); if ((isfill) && (isCustomPaint(sg2d))) { int minx = xpoints[0]; int miny = ypoints[0]; --- 1029,1039 ---- } renderer.doArc(this, x, y, width, height, startAngle, arcAngle, type, isfill); } ! public void doPolygon(CRenderer renderer, SunGraphics2D sg2d, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill) { // System.err.println("--- doPolygon"); if ((isfill) && (isCustomPaint(sg2d))) { int minx = xpoints[0]; int miny = ypoints[0];
*** 1125,1135 **** // System.err.println("--- drawGlyphs"); setupGraphicsState(sg2d, kGlyphs, gv.getFont(), 0, 0, fBounds.width, fBounds.height); renderer.doDrawGlyphs(this, nativeStrikePtr, gv, x, y); } ! public void drawUnicodes(CTextPipe renderer, SunGraphics2D sg2d, long nativeStrikePtr, char unicodes[], int offset, int length, float x, float y) { // System.err.println("--- drawUnicodes "+(new String(unicodes, offset, length))); setupGraphicsState(sg2d, kUnicodes, sg2d.font, 0, 0, fBounds.width, fBounds.height); if (length == 1) { renderer.doOneUnicode(this, nativeStrikePtr, unicodes[offset], x, y); } else { --- 1125,1135 ---- // System.err.println("--- drawGlyphs"); setupGraphicsState(sg2d, kGlyphs, gv.getFont(), 0, 0, fBounds.width, fBounds.height); renderer.doDrawGlyphs(this, nativeStrikePtr, gv, x, y); } ! public void drawUnicodes(CTextPipe renderer, SunGraphics2D sg2d, long nativeStrikePtr, char[] unicodes, int offset, int length, float x, float y) { // System.err.println("--- drawUnicodes "+(new String(unicodes, offset, length))); setupGraphicsState(sg2d, kUnicodes, sg2d.font, 0, 0, fBounds.width, fBounds.height); if (length == 1) { renderer.doOneUnicode(this, nativeStrikePtr, unicodes[offset], x, y); } else {
< prev index next >