/hg/gfx-test: Seven new tests added into CAGOperationsOnTwoTouch...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon Feb 10 02:49:22 PST 2014


changeset 8ec5f431f7ef in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=8ec5f431f7ef
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Feb 10 11:53:39 2014 +0100

	Seven new tests added into CAGOperationsOnTwoTouchingCircles.


diffstat:

 ChangeLog                                                         |    5 +
 src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java |  183 ++++++++-
 2 files changed, 163 insertions(+), 25 deletions(-)

diffs (212 lines):

diff -r 3ce2d9cfb859 -r 8ec5f431f7ef ChangeLog
--- a/ChangeLog	Fri Feb 07 11:36:19 2014 +0100
+++ b/ChangeLog	Mon Feb 10 11:53:39 2014 +0100
@@ -1,3 +1,8 @@
+2014-02-10  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
+	Seven new tests added into CAGOperationsOnTwoTouchingCircles.
+
 2014-02-07  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltAffineScaleTransformOp.java:
diff -r 3ce2d9cfb859 -r 8ec5f431f7ef src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java	Fri Feb 07 11:36:19 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java	Mon Feb 10 11:53:39 2014 +0100
@@ -1060,31 +1060,6 @@
     /**
      * Checks the process of creating and rendering new geometric shape
      * constructed from two touching circles using union operator. The shape is rendered
-     * using diagonal gradient 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 testUnionDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
-    {
-        // set stroke color
-        CommonRenderingStyles.setStrokeColor(graphics2d);
-        // set fill color
-        CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
-        // create area using union operator
-        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(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 touching circles using union operator. The shape is rendered
      * using radial gradient paint (fill).
      * 
      * @param image
@@ -1208,6 +1183,164 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two touching circles using union 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 testUnionTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(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 touching 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.createAreaFromTwoTouchingCirclesUsingSubtractOperator(image);
+        // draw the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(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 touching circles using union operator. The shape is rendered
+     * using radial gradient 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 testSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingSubtractOperator(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 touching circles using inverse subtract operator. The shape
+     * is rendered using radial gradient 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 testInverseSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingInverseSubtractOperator(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 touching circles using intersect operator. The shape is
+     * rendered using radial gradient 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 testIntersectRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingIntersectOperator(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 touching circles using XOR operator. The shape is rendered
+     * using radial gradient 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 testXorRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingXorOperator(image);
+        // draw 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