/hg/gfx-test: Added new tests.

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Feb 13 00:29:01 PST 2014


changeset 2caa5270e52f in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=2caa5270e52f
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Feb 13 09:33:16 2014 +0100

	Added new tests.


diffstat:

 ChangeLog                                                         |   6 +
 src/org/gfxtest/testsuites/CAGOperationsOnCircleAndRectangle.java |   2 +-
 src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java    |  92 ++++++++++
 3 files changed, 99 insertions(+), 1 deletions(-)

diffs (127 lines):

diff -r 4a15144c8469 -r 2caa5270e52f ChangeLog
--- a/ChangeLog	Wed Feb 12 13:25:26 2014 +0100
+++ b/ChangeLog	Thu Feb 13 09:33:16 2014 +0100
@@ -1,3 +1,9 @@
+2014-02-13  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnCircleAndRectangle.java:
+	* src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java:
+	Added new tests.
+
 2014-02-12  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
diff -r 4a15144c8469 -r 2caa5270e52f src/org/gfxtest/testsuites/CAGOperationsOnCircleAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnCircleAndRectangle.java	Wed Feb 12 13:25:26 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnCircleAndRectangle.java	Thu Feb 13 09:33:16 2014 +0100
@@ -1,7 +1,7 @@
 /*
   Java gfx-test framework
 
-   Copyright (C) 2010, 2011  Red Hat
+   Copyright (C) 2010, 2011, 2012, 2013, 2014  Red Hat
 
 This file is part of IcedTea.
 
diff -r 4a15144c8469 -r 2caa5270e52f src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java	Wed Feb 12 13:25:26 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java	Thu Feb 13 09:33:16 2014 +0100
@@ -582,6 +582,98 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from pie and rectangle using intersect operator. The shape is
+     * rendered using radial gradient paint.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBigPieRectangleIntersectRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingIntersectOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from pie and rectangle using subtract operator. The shape
+     * is rendered using radial gradient paint.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBigPieRectangleSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingSubtractOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from pie and rectangle using inverse subtract operator.
+     * The shape is rendered using radial gradient paint.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBigPieRectangleInverseSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingInverseSubtractOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from pie and rectangle using Xor operator.
+     * The shape is rendered using radial gradient paint.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testBigPieRectangleXorRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingXorOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
      * Entry point to the test suite.
      *
      * @param args not used in this case


More information about the distro-pkg-dev mailing list