/hg/gfx-test: Ten new tests added into CAGOperationsOnChordAndRe...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Wed Oct 8 09:21:30 UTC 2014


changeset 8a84449fc9b4 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=8a84449fc9b4
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Oct 08 11:22:44 2014 +0200

	Ten new tests added into CAGOperationsOnChordAndRectangle.


diffstat:

 ChangeLog                                                        |    5 +
 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java |  230 ++++++++++
 2 files changed, 235 insertions(+), 0 deletions(-)

diffs (252 lines):

diff -r 378b0815b19e -r 8a84449fc9b4 ChangeLog
--- a/ChangeLog	Tue Oct 07 11:09:56 2014 +0200
+++ b/ChangeLog	Wed Oct 08 11:22:44 2014 +0200
@@ -1,3 +1,8 @@
+2014-10-08  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+	Ten new tests added into CAGOperationsOnChordAndRectangle.
+
 2014-10-07  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java:
diff -r 378b0815b19e -r 8a84449fc9b4 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Tue Oct 07 11:09:56 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Wed Oct 08 11:22:44 2014 +0200
@@ -2486,6 +2486,236 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using inverse subtract operator.
+     * The shape is rendered using radial gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleInverseSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingInverseSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using intersect operator. The shape is
+     * rendered using radial gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleIntersectRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingIntersectOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using XOR operator. The shape is
+     * rendered using radial gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleXorRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingXorOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using union operator. The shape is
+     * rendered using horizontal gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleUnionHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingUnionOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using subtract operator. The shape is
+     * rendered using horizontal gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleSubtractHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using inverse subtract operator.
+     * The shape is rendered using horizontal gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleInverseSubtractHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingInverseSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using intersect operator. The shape is
+     * rendered using horizontal gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleIntersectHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingIntersectOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using XOR operator. The shape is
+     * rendered using horizontal gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleXorHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingXorOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using union operator. The shape is
+     * rendered using vertical gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleUnionVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set vertical gradient fill
+        CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingUnionOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using subtract operator. The shape is
+     * rendered using vertical gradient fill.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testOverlappingChordAndRectangleSubtractVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set vertical gradient fill
+        CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(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