1 /*
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
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 8024343
27 * @summary Test verifies that accelerated pipelines
28 * correctly draws primitives in XOR mode.
29 * @run main/othervm -Dsun.java2d.xrender=True AcceleratedXORModeTest
30 */
31
32 import java.awt.Color;
33 import java.awt.Graphics2D;
34 import java.awt.GraphicsConfiguration;
35 import java.awt.GraphicsEnvironment;
36 import java.awt.image.BufferedImage;
37 import java.awt.image.VolatileImage;
38 import java.io.File;
39 import java.io.IOException;
40 import javax.imageio.ImageIO;
41
42 public class AcceleratedXORModeTest {
43 public static void main(String argv[]) {
44 String fileName = argv.length > 0 ? argv[0] : null;
45 new AcceleratedXORModeTest(fileName).test();
46 }
47
48 static final Color backColor = Color.red;
49 static final Color color1 = Color.green;
50 static final Color color2 = Color.yellow;
|
1 /*
2 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
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 8024343 8042098
28 * @summary Test verifies that accelerated pipelines
29 * correctly draws primitives in XOR mode.
30 * @run main/othervm -Dsun.java2d.xrender=True AcceleratedXORModeTest
31 */
32
33 import java.awt.Color;
34 import java.awt.Graphics2D;
35 import java.awt.GraphicsConfiguration;
36 import java.awt.GraphicsEnvironment;
37 import java.awt.image.BufferedImage;
38 import java.awt.image.VolatileImage;
39 import java.io.File;
40 import java.io.IOException;
41 import javax.imageio.ImageIO;
42
43 public class AcceleratedXORModeTest {
44 public static void main(String argv[]) {
45 String fileName = argv.length > 0 ? argv[0] : null;
46 new AcceleratedXORModeTest(fileName).test();
47 }
48
49 static final Color backColor = Color.red;
50 static final Color color1 = Color.green;
51 static final Color color2 = Color.yellow;
|