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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Tue Jun 17 09:25:15 UTC 2014


changeset 7a3bd5bcb072 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=7a3bd5bcb072
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jun 17 11:26:06 2014 +0200

	Ten new tests added into CAGOperationsOnTwoOverlappingRectangles.


diffstat:

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

diffs (272 lines):

diff -r d6466ab27d74 -r 7a3bd5bcb072 ChangeLog
--- a/ChangeLog	Mon Jun 16 13:33:35 2014 +0200
+++ b/ChangeLog	Tue Jun 17 11:26:06 2014 +0200
@@ -1,3 +1,8 @@
+2014-06-17  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java:
+	Ten new tests added into CAGOperationsOnTwoOverlappingRectangles.
+
 2014-06-16  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java:
diff -r d6466ab27d74 -r 7a3bd5bcb072 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java	Mon Jun 16 13:33:35 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java	Tue Jun 17 11:26:06 2014 +0200
@@ -1932,6 +1932,256 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two overlapping 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 testUnionTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(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 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 testSubtractTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(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 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 testInverseSubtractTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(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 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 testIntersectTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d);
+        // create area using Intersect operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(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 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 testXorTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d);
+        // create area using Xor operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(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 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 testUnionTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(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 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 testSubtractTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(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 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 testInverseSubtractTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(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 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 testIntersectTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d);
+        // create area using Intersect operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(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 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 testXorTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d);
+        // create area using Xor operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(image);
+        // draw the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
      * Entry point to the test suite.
      * 
      * @param args


More information about the distro-pkg-dev mailing list