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 * @test
24 * @bug 8075942 8080932
25 * @summary test there is no exception rendering a dashed stroke
26 * @run main DashStrokeTest
27 * @run main/othervm -Dsun.java2d.renderer=sun.java2d.pisces.PiscesRenderingEngine DashStrokeTest
28 */
29
30 import java.awt.BasicStroke;
31 import java.awt.Color;
32 import java.awt.Graphics2D;
33 import java.awt.Stroke;
34 import java.awt.geom.GeneralPath;
35 import java.awt.image.BufferedImage;
36
37
38 public class DashStrokeTest {
39
40 public static void main(String[] args) {
41
42 GeneralPath shape = new GeneralPath();
43 int[] pointTypes = {0, 0, 1, 1, 0, 1, 1, 0};
44 double[] xpoints = {428, 420, 400, 400, 400, 400, 420, 733};
45 double[] ypoints = {180, 180, 180, 160, 30, 10, 10, 10};
46 shape.moveTo(xpoints[0], ypoints[0]);
47 for (int i = 1; i < pointTypes.length; i++) {
|
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 * @test
24 * @bug 8075942 8080932
25 * @summary test there is no exception rendering a dashed stroke
26 * @run main DashStrokeTest
27 */
28
29 import java.awt.BasicStroke;
30 import java.awt.Color;
31 import java.awt.Graphics2D;
32 import java.awt.Stroke;
33 import java.awt.geom.GeneralPath;
34 import java.awt.image.BufferedImage;
35
36
37 public class DashStrokeTest {
38
39 public static void main(String[] args) {
40
41 GeneralPath shape = new GeneralPath();
42 int[] pointTypes = {0, 0, 1, 1, 0, 1, 1, 0};
43 double[] xpoints = {428, 420, 400, 400, 400, 400, 420, 733};
44 double[] ypoints = {180, 180, 180, 160, 30, 10, 10, 10};
45 shape.moveTo(xpoints[0], ypoints[0]);
46 for (int i = 1; i < pointTypes.length; i++) {
|