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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Tue Feb 11 01:11:13 PST 2014


changeset 60562be5f5b5 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=60562be5f5b5
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Feb 11 10:15:30 2014 +0100

	Ten new tests added into CAGOperationsOnPieAndRectangle test suite.


diffstat:

 ChangeLog                                                      |    5 +
 src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java |  238 ++++++++++
 2 files changed, 243 insertions(+), 0 deletions(-)

diffs (260 lines):

diff -r 8ec5f431f7ef -r 60562be5f5b5 ChangeLog
--- a/ChangeLog	Mon Feb 10 11:53:39 2014 +0100
+++ b/ChangeLog	Tue Feb 11 10:15:30 2014 +0100
@@ -1,3 +1,8 @@
+2014-02-11  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java:
+	Ten new tests added into CAGOperationsOnPieAndRectangle test suite.
+
 2014-02-10  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
diff -r 8ec5f431f7ef -r 60562be5f5b5 src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java	Mon Feb 10 11:53:39 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java	Tue Feb 11 10:15:30 2014 +0100
@@ -344,6 +344,244 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from pie and rectangle using intersect operator. The shape is
+     * rendered using extra wide 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 testBigPieRectangleIntersectExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(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 extra wide 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 testBigPieRectangleSubtractExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(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 extra wide 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 testBigPieRectangleInverseSubtractExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(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 extra wide 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 testBigPieRectangleXorExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingXorOperator(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 union operator. The shape is
+     * rendered using color 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 testBigPieRectangleUnionColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingUnionOperator(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 intersect operator. The shape is
+     * rendered using color 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 testBigPieRectangleIntersectColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(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 color 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 testBigPieRectangleSubtractColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(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 color 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 testBigPieRectangleInverseSubtractColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(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 color 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 testBigPieRectangleXorColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingXorOperator(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 union 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 testBigPieRectangleUnionRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingUnionOperator(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