/hg/gfx-test: Added six new tests into the test suite Paths.java.

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Jan 17 01:54:04 PST 2013


changeset 728d592fdd88 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=728d592fdd88
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Jan 17 10:57:08 2013 +0100

	Added six new tests into the test suite Paths.java.


diffstat:

 ChangeLog                             |    5 +
 src/org/gfxtest/testsuites/Paths.java |  134 ++++++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+), 0 deletions(-)

diffs (156 lines):

diff -r 8ecb9bbea821 -r 728d592fdd88 ChangeLog
--- a/ChangeLog	Wed Jan 16 13:48:21 2013 +0100
+++ b/ChangeLog	Thu Jan 17 10:57:08 2013 +0100
@@ -1,3 +1,8 @@
+2013-01-17  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/Paths.java:
+	Added six new tests into the test suite Paths.java.
+
 2013-01-16  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltBasicTests.java:
diff -r 8ecb9bbea821 -r 728d592fdd88 src/org/gfxtest/testsuites/Paths.java
--- a/src/org/gfxtest/testsuites/Paths.java	Wed Jan 16 13:48:21 2013 +0100
+++ b/src/org/gfxtest/testsuites/Paths.java	Thu Jan 17 10:57:08 2013 +0100
@@ -764,6 +764,140 @@
     }
 
     /**
+     * Check if line path could be clipped by an ellipse shape. Path is rendered
+     * using stroke paint with thick stroke width.
+     * Line path is constructed using new Path.Float()
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testLineFloatPathThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // draw the path
+        drawLinePathFloat(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if line path could be clipped by an ellipse shape. Path is rendered
+     * using stroke paint with thick stroke width.
+     * Line path is constructed using new Path.Double()
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testLineDoublePathThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // draw the path
+        drawLinePathDouble(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by an ellipse shape. Path
+     * is rendered using stroke paint with thick stroke width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testQuadraticPathFloatThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // draw the path
+        drawQuadraticPathFloat(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by an ellipse shape. Path
+     * is rendered using stroke paint with thick stroke width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testQuadraticPathDoubleThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // draw the path
+        drawQuadraticPathDouble(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by an ellipse shape. Path
+     * is rendered using stroke paint with thick stroke width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testCubicPathFloatThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // draw the path
+        drawCubicPathFloat(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by an ellipse shape. Path
+     * is rendered using stroke paint with thick stroke width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testCubicPathDoubleThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // draw the path
+        drawCubicPathDouble(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
      * Entry point to the test suite.
      * 
      * @param args



More information about the distro-pkg-dev mailing list