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

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Fri Dec 6 00:41:48 PST 2013


changeset 104dac766b85 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=104dac766b85
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Dec 06 09:45:44 2013 +0100

	Ten new tests added into CAGOperationsOnChordAndRectangle test suite.


diffstat:

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

diffs (268 lines):

diff -r 21838e17039a -r 104dac766b85 ChangeLog
--- a/ChangeLog	Thu Dec 05 09:36:18 2013 +0100
+++ b/ChangeLog	Fri Dec 06 09:45:44 2013 +0100
@@ -1,3 +1,8 @@
+2013-12-06  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+	Ten new tests added into CAGOperationsOnChordAndRectangle test suite.
+
 2013-12-05  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltUsingBgColorAlpha.java:
diff -r 21838e17039a -r 104dac766b85 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Thu Dec 05 09:36:18 2013 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java	Fri Dec 06 09:45:44 2013 +0100
@@ -244,6 +244,252 @@
     }
 
     /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and rectangle 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 testBigChordRectangleSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingSubtractOperator(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 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 testBigChordRectangleInverseSubtractWideStrokePaint(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.createAreaFromBiggerChordAndRectangleUsingInverseSubtractOperator(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 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 testBigChordRectangleXorWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set stroke width
+        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingXorOperator(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 union 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 testBigChordRectangleUnionExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set extra wide stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingUnionOperator(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 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 testBigChordRectangleIntersectExtraWideStrokePaint(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.createAreaFromBiggerChordAndRectangleUsingIntersectOperator(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 subtract 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 testBigChordRectangleSubtractExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set extra wide stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingSubtractOperator(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 inverse subtract 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 testBigChordRectangleInverseSubtractExtraWideStrokePaint(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.createAreaFromBiggerChordAndRectangleUsingInverseSubtractOperator(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 testBigChordRectangleXorExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set extra wide stroke width
+        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+        // create area using XOR operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingXorOperator(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 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 testBigChordRectangleUnionColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using union operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingUnionOperator(image);
+        // fill the area
+        graphics2d.fill(area);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Checks the process of creating and rendering new geometric shape
+     * constructed from chord and 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 testBigChordRectangleSubtractColorPaint(TestImage image, Graphics2D graphics2d)
+    {
+        // set fill color
+        CommonRenderingStyles.setFillColor(graphics2d);
+        // create area using subtract operator
+        Area area = CommonCAGOperations.createAreaFromBiggerChordAndRectangleUsingSubtractOperator(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