/hg/gfx-test: * src/org/gfxtest/testsuites/ClippingPathByRoundRe...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Apr 26 07:31:45 PDT 2012


changeset 42228d31389e in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=42228d31389e
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Apr 26 16:34:11 2012 +0200

	* src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java:
	  Added new tests to this test suite.


diffstat:

 ChangeLog                                                         |    5 +
 src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java |  262 +++++++++-
 2 files changed, 247 insertions(+), 20 deletions(-)

diffs (298 lines):

diff -r 905b20725f80 -r 42228d31389e ChangeLog
--- a/ChangeLog	Tue Apr 24 13:48:25 2012 +0200
+++ b/ChangeLog	Thu Apr 26 16:34:11 2012 +0200
@@ -1,3 +1,8 @@
+2012-04-26  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java:
+	Added new tests to this test suite.
+
 2012-04-24  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/PrintTestBasic.java:
diff -r 905b20725f80 -r 42228d31389e src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java
--- a/src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java	Tue Apr 24 13:48:25 2012 +0200
+++ b/src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java	Thu Apr 26 16:34:11 2012 +0200
@@ -74,6 +74,8 @@
 @Zoom(1)
 public class ClippingPathByRoundRectangleShape extends GfxTest
 {
+    private static final float[] DOTTED_PATTERN = new float[] {1,40};
+
     /**
      * Prepare canvas for the rendering.
      *
@@ -279,26 +281,6 @@
     }
 
     /**
-     * Check if crossed closed path could be clipped by a round rectangle shape.
-     * Path is rendered using stroke paint with default stroke width.
-     * 
-     * @param image
-     *            work image
-     * @param graphics2d
-     *            graphics canvas
-     * @return test result status - PASSED, FAILED or ERROR
-     */
-    public TestResult testClipCrossedClosedPathByRoundRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
-    {
-        // render clip round rectangle
-        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
-        // set clip region and draw the path
-        drawCrossedClosedPathClippedByRoundRectangleShape(image, graphics2d);
-        // test result
-        return TestResult.PASSED;
-    }
-
-    /**
      * Check if line path could be clipped by a round rectangle shape. Path is
      * rendered using stroke paint with zero stroke width.
      * 
@@ -419,6 +401,246 @@
     }
 
     /**
+     * Check if line path could be clippRounded by a round rectangle 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 testClipLinePathByRoundRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawLinePathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by a round rectangle 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 testClipQuadraticPathByRoundRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by a round rectangle 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 testClipCubicPathByRoundRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by a round rectangle 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 testClipClosedPathByRoundRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by a round rectangle 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 testClipCrossedClosedPathByRoundRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if line path could be clipped by a round rectangle shape. Path is rendered
+     * using stroke paint with extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipLinePathByRoundRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawLinePathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by a round rectangle shape. Path
+     * is rendered using stroke paint with extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipQuadraticPathByRoundRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by a round rectangle shape. Path
+     * is rendered using stroke paint with extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCubicPathByRoundRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by a round rectangle shape. Path
+     * is rendered using stroke paint with extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipClosedPathByRoundRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by a round rectangle shape. Path
+     * is rendered using stroke paint with extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCrossedClosedPathByRoundRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRoundRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRoundRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
      * Entry point to the test suite.
      * 
      * @param args



More information about the distro-pkg-dev mailing list