/hg/gfx-test: Eight new tests added into CAGOperationsOnChordAnd...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri Feb 28 02:06:20 PST 2014


changeset 830c798b8e25 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=830c798b8e25
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Feb 28 11:07:00 2014 +0100

	Eight new tests added into CAGOperationsOnChordAndRectangle test suite.


diffstat:

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

diffs (206 lines):

diff -r a9b87ea665e8 -r 830c798b8e25 ChangeLog
--- a/ChangeLog	Thu Feb 27 10:11:00 2014 +0100
+++ b/ChangeLog	Fri Feb 28 11:07:00 2014 +0100
@@ -1,3 +1,8 @@
+2014-02-28  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+	Eight new tests added into CAGOperationsOnChordAndRectangle test suite.
+
 2014-02-27  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
diff -r a9b87ea665e8 -r 830c798b8e25 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Thu Feb 27 10:11:00 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Fri Feb 28 11:07:00 2014 +0100
@@ -881,6 +881,190 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using XOR 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 testBigChordRectangleXorVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set vertical gradient fill
+        CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingXorOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using union operator. The shape is
+     * rendered using diagonal 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 testBigChordRectangleUnionDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set diagonal gradient fill
+        CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingUnionOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using subtract operator. The shape is
+     * rendered using diagonal 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 testBigChordRectangleSubtractDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set diagonal gradient fill
+        CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using inverse subtract operator.
+     * The shape is rendered using diagonal 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 testBigChordRectangleInverseSubtractDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set diagonal gradient fill
+        CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingInverseSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using intersect operator. The shape is
+     * rendered using diagonal 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 testBigChordRectangleIntersectDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set diagonal gradient fill
+        CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingIntersectOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using XOR operator. The shape is
+     * rendered using diagonal 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 testBigChordRectangleXorDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set diagonal gradient fill
+        CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingXorOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using union operator. The shape is
+     * rendered using stroke 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 testSmallChordInsideRectangleUnionStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using subtract operator. The shape
+     * is rendered using stroke 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 testSmallChordInsideRectangleSubtractStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(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