6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6521533 6525997
27 * @summary Verifies that the OGL-accelerated codepaths for GradientPaint,
28 * LinearGradientPaint, and RadialGradientPaint produce results that are
29 * sufficiently close to those produced by the software codepaths.
30 * @run main/othervm -Dsun.java2d.opengl=True GradientPaints
31 * @author campbelc
32 */
33
34 import java.awt.*;
35 import java.awt.MultipleGradientPaint.ColorSpaceType;
36 import java.awt.MultipleGradientPaint.CycleMethod;
37 import java.awt.geom.*;
38 import java.awt.image.*;
39 import java.io.File;
40 import java.util.Arrays;
41 import javax.imageio.ImageIO;
42
43 public class GradientPaints extends Canvas {
44
45 private static final int TESTW = 600;
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @key headful
27 * @bug 6521533 6525997
28 * @summary Verifies that the OGL-accelerated codepaths for GradientPaint,
29 * LinearGradientPaint, and RadialGradientPaint produce results that are
30 * sufficiently close to those produced by the software codepaths.
31 * @run main/othervm -Dsun.java2d.opengl=True GradientPaints
32 * @author campbelc
33 */
34
35 import java.awt.*;
36 import java.awt.MultipleGradientPaint.ColorSpaceType;
37 import java.awt.MultipleGradientPaint.CycleMethod;
38 import java.awt.geom.*;
39 import java.awt.image.*;
40 import java.io.File;
41 import java.util.Arrays;
42 import javax.imageio.ImageIO;
43
44 public class GradientPaints extends Canvas {
45
46 private static final int TESTW = 600;
|