/hg/gfx-test: 2012-01-03 Pavel Tisnovsky <ptisnovs at redhat.com>

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Tue Jan 3 03:27:25 PST 2012


changeset 4a93bf078e59 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=4a93bf078e59
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jan 03 12:29:49 2012 +0100

	2012-01-03 Pavel Tisnovsky <ptisnovs at redhat.com>

	 *
	src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java:
	Added 15 new tests.
	        * src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java:
	Fixed tests which renders various shapes using zero-wide stroke.


diffstat:

 ChangeLog                                                   |    7 +
 src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java  |  360 ++++++++++++
 src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java |   20 +
 3 files changed, 387 insertions(+), 0 deletions(-)

diffs (442 lines):

diff -r 26efcf025825 -r 4a93bf078e59 ChangeLog
--- a/ChangeLog	Mon Jan 02 14:27:23 2012 +0100
+++ b/ChangeLog	Tue Jan 03 12:29:49 2012 +0100
@@ -1,3 +1,10 @@
+2012-01-03  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java:
+	Added 15 new tests.
+	* src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java:
+	Fixed tests which renders various shapes using zero-wide stroke.
+
 2012-01-02  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java:
diff -r 26efcf025825 -r 4a93bf078e59 src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java
--- a/src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java	Mon Jan 02 14:27:23 2012 +0100
+++ b/src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java	Tue Jan 03 12:29:49 2012 +0100
@@ -278,6 +278,366 @@
     }
 
     /**
+     * Check if line 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 testClipLinePathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawLinePathClippedByEllipseShape(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 testClipQuadraticPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByEllipseShape(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 testClipCubicPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed 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 testClipClosedPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed 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 testClipCrossedClosedPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedPathClippedByEllipseShape(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 extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipLinePathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawLinePathClippedByEllipseShape(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 extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipQuadraticPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByEllipseShape(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 extra thick width.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCubicPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by an ellipse 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 testClipClosedPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by an ellipse 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 testClipCrossedClosedPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedPathClippedByEllipseShape(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 zero width stroke.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipLinePathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawLinePathClippedByEllipseShape(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 zero width stroke.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipQuadraticPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByEllipseShape(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 zero width stroke.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCubicPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by an ellipse shape. Path
+     * is rendered using stroke paint with zero width stroke.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipClosedPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by an ellipse shape. Path
+     * is rendered using stroke paint with zero width stroke.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCrossedClosedPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render ellipse which is used as a clip shape
+        CommonClippingOperations.renderClipEllipse(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawCrossedPathClippedByEllipseShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
      * Entry point to the test suite.
      * 
      * @param args
diff -r 26efcf025825 -r 4a93bf078e59 src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java
--- a/src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java	Mon Jan 02 14:27:23 2012 +0100
+++ b/src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java	Tue Jan 03 12:29:49 2012 +0100
@@ -292,6 +292,10 @@
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
         // set clip region and draw the path
         drawLinePathClippedByRectangleArea(image, graphics2d);
         // test result
@@ -312,6 +316,10 @@
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
         // set clip region and draw the path
         drawQuadraticPathClippedByRectangleArea(image, graphics2d);
         // test result
@@ -332,6 +340,10 @@
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
         // set clip region and draw the path
         drawCubicPathClippedByRectangleArea(image, graphics2d);
         // test result
@@ -352,6 +364,10 @@
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
         // set clip region and draw the path
         drawClosedPathClippedByRectangleArea(image, graphics2d);
         // test result
@@ -372,6 +388,10 @@
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
         // set clip region and draw the path
         drawCrossedClosedPathClippedByRectangleArea(image, graphics2d);
         // test result



More information about the distro-pkg-dev mailing list