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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Tue Apr 15 10:59:13 UTC 2014


changeset 0b4d4357871d in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=0b4d4357871d
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Apr 15 12:59:53 2014 +0200

	Ten new tests added into CAGOperationsOnChordAndRectangle.


diffstat:

 ChangeLog                                                        |    5 +
 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java |  237 ++++++++++
 2 files changed, 242 insertions(+), 0 deletions(-)

diffs (259 lines):

diff -r b5d1d02925ea -r 0b4d4357871d ChangeLog
--- a/ChangeLog	Mon Apr 14 10:01:07 2014 +0200
+++ b/ChangeLog	Tue Apr 15 12:59:53 2014 +0200
@@ -1,3 +1,8 @@
+2014-04-15  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+	Ten new tests added into CAGOperationsOnChordAndRectangle.
+
 2014-04-14  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
diff -r b5d1d02925ea -r 0b4d4357871d src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Mon Apr 14 10:01:07 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Tue Apr 15 12:59:53 2014 +0200
@@ -1309,6 +1309,243 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle 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 testSmallChordInsideRectangleInverseSubtractExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set extra wide stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle 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 testSmallChordInsideRectangleIntersectExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set extra wide stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle using XOR operator. The shape is
+     * rendered using extra 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 testSmallChordInsideRectangleXorExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke extra width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image);
+        // draw the area
+        graphics2d.draw(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using union operator. The shape is
+     * rendered using color 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 testSmallChordInsideRectangleUnionColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using subtract operator. The shape is
+     * rendered using color 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 testSmallChordInsideRectangleSubtractColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using inverse subtract operator.
+     * The shape is rendered using color 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 testSmallChordInsideRectangleInverseSubtractColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using inverse subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using intersect operator.
+     * The shape is rendered using color 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 testSmallChordInsideRectangleIntersectColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using intersect operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using XOR operator.
+     * The shape is rendered using color 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 testSmallChordInsideRectangleXorColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using Xor operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using union operator. The shape is
+     * rendered using radial gradient 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 testSmallChordInsideRectangleUnionRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from a chord inside a rectangle using subtract operator. The shape is
+     * rendered using radial gradient 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 testSmallChordInsideRectangleSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set radial gradient fill
+        CommonRenderingStyles.setRadialGradientFill(image, graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image);
+        // fill 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