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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Oct 23 07:43:38 UTC 2014


changeset fa3e2ad3e047 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=fa3e2ad3e047
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Oct 23 09:44:51 2014 +0200

	Ten new tests added into CAGOperationsOnTwoOverlappingRoundRectangles.


diffstat:

 ChangeLog                                                                    |    5 +
 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java |  250 ++++++++++
 2 files changed, 255 insertions(+), 0 deletions(-)

diffs (272 lines):

diff -r 761f47479deb -r fa3e2ad3e047 ChangeLog
--- a/ChangeLog	Wed Oct 22 10:27:26 2014 +0200
+++ b/ChangeLog	Thu Oct 23 09:44:51 2014 +0200
@@ -1,3 +1,8 @@
+2014-10-23  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java:
+	Ten new tests added into CAGOperationsOnTwoOverlappingRoundRectangles.
+
 2014-10-22  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java:
diff -r 761f47479deb -r fa3e2ad3e047 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java	Wed Oct 22 10:27:26 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java	Thu Oct 23 09:44:51 2014 +0200
@@ -1306,6 +1306,256 @@
         return TestResult.PASSED;
     }
 
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two overlapping round rectangles 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 testUnionTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingUnionOperator(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 overlapping round rectangles 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 testSubtractTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingSubtractOperator(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 overlapping round rectangles 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 testInverseSubtractTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingInverseSubtractOperator(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 overlapping round rectangles using intersect 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 testIntersectTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingIntersectOperator(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 overlapping round rectangles using Xor 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 testXorTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingXorOperator(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 overlapping round rectangles 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 testUnionTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingUnionOperator(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 overlapping round rectangles 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 testSubtractTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingSubtractOperator(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 overlapping round rectangles 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 testInverseSubtractTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingInverseSubtractOperator(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 overlapping round rectangles using intersect 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 testIntersectTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingIntersectOperator(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 overlapping round rectangles using Xor 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 testXorTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingXorOperator(image);
+        // draw the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
 
     /**
      * Entry point to the test suite.


More information about the distro-pkg-dev mailing list