/hg/gfx-test: Six tests added into CAGOperationsOnTwoOverlapping...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon May 26 09:25:02 UTC 2014


changeset ce5c532fd9da in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=ce5c532fd9da
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon May 26 11:25:48 2014 +0200

	Six tests added into CAGOperationsOnTwoOverlappingCircles.


diffstat:

 ChangeLog                                                            |     5 +
 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java |  2438 +++++----
 2 files changed, 1299 insertions(+), 1144 deletions(-)

diffs (truncated from 2518 to 500 lines):

diff -r e62c92a96c62 -r ce5c532fd9da ChangeLog
--- a/ChangeLog	Thu May 22 09:54:26 2014 +0200
+++ b/ChangeLog	Mon May 26 11:25:48 2014 +0200
@@ -1,3 +1,8 @@
+2014-05-26  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java:
+	Six tests added into CAGOperationsOnTwoOverlappingCircles.
+
 2014-05-22  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
diff -r e62c92a96c62 -r ce5c532fd9da src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java	Thu May 22 09:54:26 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java	Mon May 26 11:25:48 2014 +0200
@@ -1,1208 +1,1358 @@
-/*
-  Java gfx-test framework
+        /*
+          Java gfx-test framework
 
-   Copyright (C) 2010, 2011, 2012, 2013, 2014  Red Hat
+           Copyright (C) 2010, 2011, 2012, 2013, 2014  Red Hat
 
-This file is part of IcedTea.
+        This file is part of IcedTea.
 
-IcedTea is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
+        IcedTea is free software; you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation; either version 2, or (at your option)
+        any later version.
 
-IcedTea is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
+        IcedTea is distributed in the hope that it will be useful, but
+        WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+        General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with IcedTea; see the file COPYING.  If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
+        You should have received a copy of the GNU General Public License
+        along with IcedTea; see the file COPYING.  If not, write to the
+        Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+        02110-1301 USA.
 
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library.  Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
+        Linking this library statically or dynamically with other modules is
+        making a combined work based on this library.  Thus, the terms and
+        conditions of the GNU General Public License cover the whole
+        combination.
 
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module.  An independent module is a module which is not derived from
-or based on this library.  If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so.  If you do not wish to do so, delete this
-exception statement from your version.
-*/
+        As a special exception, the copyright holders of this library give you
+        permission to link this library with independent modules to produce an
+        executable, regardless of the license terms of these independent
+        modules, and to copy and distribute the resulting executable under
+        terms of your choice, provided that you also meet, for each linked
+        independent module, the terms and conditions of the license of that
+        module.  An independent module is a module which is not derived from
+        or based on this library.  If you modify this library, you may extend
+        this exception to your version of the library, but you are not
+        obligated to do so.  If you do not wish to do so, delete this
+        exception statement from your version.
+        */
 
-package org.gfxtest.testsuites;
+        package org.gfxtest.testsuites;
 
-import java.awt.Graphics2D;
-import java.awt.geom.Area;
+        import java.awt.Graphics2D;
+        import java.awt.geom.Area;
 
 
 
-import org.gfxtest.framework.*;
-import org.gfxtest.framework.annotations.*;
+        import org.gfxtest.framework.*;
+        import org.gfxtest.framework.annotations.*;
 
 
 
-/**
- * This test checks the process of creating and rendering new geometric shapes
- * by performing boolean operations on existing ones. This process is often
- * called Constructive area geometry (CAG). All CAG operations - union,
- * intersection, subtraction and XOR - is processed on two circular Areas.
- * Circles which are the basis of the areas are overlapping.
- * 
- * @author Pavel Tisnovsky
- */
- at TestType(TestTypes.RENDER_TEST)
- at GraphicsPrimitive(GraphicsPrimitives.AREA)
- at RenderStyle(RenderStyles.FILL)
- at Transformation(Transformations.NONE)
- at Zoom(1)
-public class CAGOperationsOnTwoOverlappingCircles extends GfxTest
-{
+        /**
+         * This test checks the process of creating and rendering new geometric shapes
+         * by performing boolean operations on existing ones. This process is often
+         * called Constructive area geometry (CAG). All CAG operations - union,
+         * intersection, subtraction and XOR - is processed on two circular Areas.
+         * Circles which are the basis of the areas are overlapping.
+         * 
+         * @author Pavel Tisnovsky
+         */
+        @TestType(TestTypes.RENDER_TEST)
+        @GraphicsPrimitive(GraphicsPrimitives.AREA)
+        @RenderStyle(RenderStyles.FILL)
+        @Transformation(Transformations.NONE)
+        @Zoom(1)
+        public class CAGOperationsOnTwoOverlappingCircles extends GfxTest
+        {
 
-    /**
-     * Checks the process of creating and rendering new geometric shape
-     * constructed from two overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingUnionOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingUnionOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(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 overlapping circles 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 subtract operator
-        Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingInverseSubtractOperator(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 overlapping circles 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 subtract operator
+                Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingInverseSubtractOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingIntersectOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingIntersectOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingXorOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingXorOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingUnionOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingUnionOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(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 overlapping circles 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.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(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 overlapping circles 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 subtract operator
-        Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingInverseSubtractOperator(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 overlapping circles 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);


More information about the distro-pkg-dev mailing list