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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri May 2 07:46:14 UTC 2014


changeset 32c273c0ef64 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=32c273c0ef64
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri May 02 09:46:53 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 83144bf7e807 -r 32c273c0ef64 ChangeLog
--- a/ChangeLog	Mon Apr 28 10:01:11 2014 +0200
+++ b/ChangeLog	Fri May 02 09:46:53 2014 +0200
@@ -1,3 +1,8 @@
+2014-05-01  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+	Ten new tests added into CAGOperationsOnChordAndRectangle.
+
 2014-04-28  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
diff -r 83144bf7e807 -r 32c273c0ef64 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Mon Apr 28 10:01:11 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Fri May 02 09:46:53 2014 +0200
@@ -1546,6 +1546,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 testSmallChordInsideRectangleInverseSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(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 testSmallChordInsideRectangleIntersectRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(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 testSmallChordInsideRectangleXorRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(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 testSmallChordInsideRectangleUnionHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(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 testSmallChordInsideRectangleSubtractHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(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 testSmallChordInsideRectangleInverseSubtractHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(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 testSmallChordInsideRectangleIntersectHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(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 testSmallChordInsideRectangleXorHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set horizontal gradient fill
+        CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(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 testSmallChordInsideRectangleUnionVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set vertical gradient fill
+        CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(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 testSmallChordInsideRectangleSubtractVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set vertical gradient fill
+        CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(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