/hg/gfx-test: New tests added into CAGOperationsOnTwoConcentricC...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri Apr 4 09:39:38 UTC 2014


changeset 38063a592112 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=38063a592112
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Apr 04 11:40:21 2014 +0200

	New tests added into CAGOperationsOnTwoConcentricCircles test suite.


diffstat:

 ChangeLog                                                           |    5 +
 src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java |  175 ++++++++++
 2 files changed, 180 insertions(+), 0 deletions(-)

diffs (204 lines):

diff -r 5ce321a188a7 -r 38063a592112 ChangeLog
--- a/ChangeLog	Thu Apr 03 09:51:51 2014 +0200
+++ b/ChangeLog	Fri Apr 04 11:40:21 2014 +0200
@@ -1,3 +1,8 @@
+2014-04-04  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java:
+	New tests added into CAGOperationsOnTwoConcentricCircles test suite.
+
 2014-04-03  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
diff -r 5ce321a188a7 -r 38063a592112 src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java	Thu Apr 03 09:51:51 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java	Fri Apr 04 11:40:21 2014 +0200
@@ -436,6 +436,131 @@
     /**
      * Checks the process of creating and rendering new geometric shape
      * constructed from two concentric circles using union operator. The shape is rendered
+     * using zero wide stroke.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testUnionZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingUnionOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using subtract operator. The shape is
+     * rendered using zero stroke.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testSubtractZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingSubtractOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using inverse subtract operator. The shape
+     * is rendered using zero stroke.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testInverseSubtractZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using intersect operator. The shape is
+     * rendered using zero stroke.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testIntersectZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingIntersectOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using XOR operator. The shape is rendered
+     * using zero stroke.
+     * 
+     * @param image
+     *            image to which area is to be drawn
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testXorZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingXorOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using union operator. The shape is rendered
      * using color paint (fill).
      * 
      * @param image
@@ -1085,6 +1210,56 @@
 
     /**
      * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using subtract operator. The shape is rendered
+     * using texture paint (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 testSubtractTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingSubtractOperator(image);
+        // draw the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two concentric circles using inverse subtract operator. The shape is rendered
+     * using texture paint (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 testInverseSubtractTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(image);
+        // draw the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
      * constructed from two concentric circles using union operator. The shape is rendered
      * using texture paint (fill).
      * 


More information about the distro-pkg-dev mailing list