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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri Jan 6 04:41:38 PST 2012


changeset 662a5e1dcbd5 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=662a5e1dcbd5
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Jan 06 13:44:05 2012 +0100

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

	 *
	src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java:
	New 15 tests added to this test suite.


diffstat:

 ChangeLog                                                    |    5 +
 src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java |  390 ++++++++++-
 2 files changed, 380 insertions(+), 15 deletions(-)

diffs (495 lines):

diff -r 1eb14355e32c -r 662a5e1dcbd5 ChangeLog
--- a/ChangeLog	Wed Jan 04 12:30:34 2012 +0100
+++ b/ChangeLog	Fri Jan 06 13:44:05 2012 +0100
@@ -1,3 +1,8 @@
+2012-01-06  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java:
+	New 15 tests added to this test suite.
+
 2012-01-04  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltBasicTests.java:
diff -r 1eb14355e32c -r 662a5e1dcbd5 src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java
--- a/src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java	Wed Jan 04 12:30:34 2012 +0100
+++ b/src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java	Fri Jan 06 13:44:05 2012 +0100
@@ -95,7 +95,7 @@
      * @param graphics2d
      *            graphics canvas
      */
-    private static void drawLinePathClippedByRectangleArea(TestImage image, Graphics2D graphics2d)
+    private static void drawLinePathClippedByRectangleShape(TestImage image, Graphics2D graphics2d)
     {
         // prepare canvas for the rendering
         basicSetupForRendering(image, graphics2d);
@@ -113,7 +113,7 @@
      * @param graphics2d
      *            graphics canvas
      */
-    private static void drawQuadraticPathClippedByRectangleArea(TestImage image, Graphics2D graphics2d)
+    private static void drawQuadraticPathClippedByRectangleShape(TestImage image, Graphics2D graphics2d)
     {
         // prepare canvas for the rendering
         basicSetupForRendering(image, graphics2d);
@@ -131,7 +131,7 @@
      * @param graphics2d
      *            graphics canvas
      */
-    private static void drawCubicPathClippedByRectangleArea(TestImage image, Graphics2D graphics2d)
+    private static void drawCubicPathClippedByRectangleShape(TestImage image, Graphics2D graphics2d)
     {
         // prepare canvas for the rendering
         basicSetupForRendering(image, graphics2d);
@@ -149,7 +149,7 @@
      * @param graphics2d
      *            graphics canvas
      */
-    private static void drawClosedPathClippedByRectangleArea(TestImage image, Graphics2D graphics2d)
+    private static void drawClosedPathClippedByRectangleShape(TestImage image, Graphics2D graphics2d)
     {
         // prepare canvas for the rendering
         basicSetupForRendering(image, graphics2d);
@@ -167,7 +167,7 @@
      * @param graphics2d
      *            graphics canvas
      */
-    private static void drawCrossedClosedPathClippedByRectangleArea(TestImage image, Graphics2D graphics2d)
+    private static void drawCrossedClosedPathClippedByRectangleShape(TestImage image, Graphics2D graphics2d)
     {
         // prepare canvas for the rendering
         basicSetupForRendering(image, graphics2d);
@@ -187,12 +187,12 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testClipLinePathByRectangleAreaStrokePaint(TestImage image, Graphics2D graphics2d)
+    public TestResult testClipLinePathByRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
         // set clip region and draw the path
-        drawLinePathClippedByRectangleArea(image, graphics2d);
+        drawLinePathClippedByRectangleShape(image, graphics2d);
         // test result
         return TestResult.PASSED;
     }
@@ -207,12 +207,12 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testClipQuadraticPathByRectangleAreaStrokePaint(TestImage image, Graphics2D graphics2d)
+    public TestResult testClipQuadraticPathByRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
         // set clip region and draw the path
-        drawQuadraticPathClippedByRectangleArea(image, graphics2d);
+        drawQuadraticPathClippedByRectangleShape(image, graphics2d);
         // test result
         return TestResult.PASSED;
     }
@@ -227,12 +227,12 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testClipCubicPathByRectangleAreaStrokePaint(TestImage image, Graphics2D graphics2d)
+    public TestResult testClipCubicPathByRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
         // set clip region and draw the path
-        drawCubicPathClippedByRectangleArea(image, graphics2d);
+        drawCubicPathClippedByRectangleShape(image, graphics2d);
         // test result
         return TestResult.PASSED;
     }
@@ -247,12 +247,12 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testClipClosedPathByRectangleAreaStrokePaint(TestImage image, Graphics2D graphics2d)
+    public TestResult testClipClosedPathByRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
         // set clip region and draw the path
-        drawClosedPathClippedByRectangleArea(image, graphics2d);
+        drawClosedPathClippedByRectangleShape(image, graphics2d);
         // test result
         return TestResult.PASSED;
     }
@@ -267,12 +267,372 @@
      *            graphics canvas
      * @return test result status - PASSED, FAILED or ERROR
      */
-    public TestResult testClipCrossedClosedPathByRectangleAreaStrokePaint(TestImage image, Graphics2D graphics2d)
+    public TestResult testClipCrossedClosedPathByRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
     {
         // render clip rectangle
         CommonClippingOperations.renderClipRectangle(image, graphics2d);
         // set clip region and draw the path
-        drawCrossedClosedPathClippedByRectangleArea(image, graphics2d);
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if line path could be clipped by a 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 testClipLinePathByRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by a 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 testClipQuadraticPathByRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by a 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 testClipCubicPathByRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by a 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 testClipClosedPathByRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by a 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 testClipCrossedClosedPathByRectangleShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if line path could be clipped by a 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 testClipLinePathByRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by a 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 testClipQuadraticPathByRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by a 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 testClipCubicPathByRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by a 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 testClipClosedPathByRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by a 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 testClipCrossedClosedPathByRectangleShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if line path could be clipped by a rectangle 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 testClipLinePathByRectangleShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if quadratic Bezier path could be clipped by a rectangle 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 testClipQuadraticPathByRectangleShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if cubic Bezier path could be clipped by a rectangle 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 testClipCubicPathByRectangleShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawCubicPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if closed path could be clipped by a rectangle 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 testClipClosedPathByRectangleShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawClosedPathClippedByRectangleShape(image, graphics2d);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if crossed closed path could be clipped by a rectangle 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 testClipCrossedClosedPathByRectangleShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // render rectangle which is used as a clip shape
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // set clip region and draw the path
+        drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
         // test result
         return TestResult.PASSED;
     }



More information about the distro-pkg-dev mailing list