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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon Aug 25 10:46:18 UTC 2014


changeset c8a6321b2869 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=c8a6321b2869
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Aug 25 12:47:19 2014 +0200

	Ten new tests added into CAGOperationsOnTwoOverlappingRoundRectangles.


diffstat:

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

diffs (262 lines):

diff -r 62dc9087c0cb -r c8a6321b2869 ChangeLog
--- a/ChangeLog	Thu Aug 14 09:53:20 2014 +0200
+++ b/ChangeLog	Mon Aug 25 12:47:19 2014 +0200
@@ -1,3 +1,8 @@
+2014-08-25  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java:
+	Ten new tests added into CAGOperationsOnTwoOverlappingRoundRectangles.
+
 2014-08-14  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
diff -r 62dc9087c0cb -r c8a6321b2869 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java	Thu Aug 14 09:53:20 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java	Mon Aug 25 12:47:19 2014 +0200
@@ -66,6 +66,246 @@
 public class CAGOperationsOnTwoOverlappingRoundRectangles extends GfxTest
 {
 
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from two round rectangles using union operator. The shape is
+     * rendered using 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 testUnionStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingUnionOperator(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 rectangles using subtract operator. The shape is
+     * rendered using 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 testSubtractStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingSubtractOperator(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 rectangles using inverse subtract operator. The
+     * shape is rendered using 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 testInverseSubtractStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingInverseSubtractOperator(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 rectangles using intersect operator. The
+     * shape is rendered using 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 testIntersectStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingIntersectOperator(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 rectangles using XOR operator. The
+     * shape is rendered using 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 testXorStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingXorOperator(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 rectangles using union operator. The shape is
+     * rendered using 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 testUnionWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingUnionOperator(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 rectangles using subtract operator. The shape is
+     * rendered using 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 testSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingSubtractOperator(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 rectangles using inverse subtract operator. The
+     * shape is rendered using 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 testInverseSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingInverseSubtractOperator(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 rectangles using intersect operator. The
+     * shape is rendered using 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 testIntersectWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingIntersectOperator(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 rectangles using XOR operator. The
+     * shape is rendered using 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 testXorWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingXorOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
 
     /**
      * Entry point to the test suite.


More information about the distro-pkg-dev mailing list