/hg/gfx-test: 2011-11-02 Pavel Tisnovsky <ptisnovs at redhat.com>
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Nov 2 01:55:24 PDT 2011
changeset a05c6f5b49bf in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=a05c6f5b49bf
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Nov 02 09:57:29 2011 +0100
2011-11-02 Pavel Tisnovsky <ptisnovs at redhat.com>
* Makefile: added new class to compile
* src/org/gfxtest/testsuites/AlphaComposite.java: Created new
class which will contains tests for alpha compositing graphics
operation.
* src/org/gfxtest/testsuites/TexturePaint.java: Added another
tests for rendering shapes filled by a texture.
diffstat:
ChangeLog | 9 +++
Makefile | 2 +
src/org/gfxtest/testsuites/AlphaComposite.java | 65 ++++++++++++++++++++++
src/org/gfxtest/testsuites/TexturePaint.java | 76 ++++++++++++++++++++++++++
4 files changed, 152 insertions(+), 0 deletions(-)
diffs (190 lines):
diff -r 3d9ea42c564f -r a05c6f5b49bf ChangeLog
--- a/ChangeLog Thu Oct 27 17:23:04 2011 +0200
+++ b/ChangeLog Wed Nov 02 09:57:29 2011 +0100
@@ -1,3 +1,12 @@
+2011-11-02 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * Makefile: added new class to compile
+ * src/org/gfxtest/testsuites/AlphaComposite.java:
+ Created new class which will contains tests for alpha
+ compositing graphics operation.
+ * src/org/gfxtest/testsuites/TexturePaint.java:
+ Added another tests for rendering shapes filled by a texture.
+
2011-10-27 Pavel Tisnovsky <ptisnovs at redhat.com>
* Makefile: added new class to compile
diff -r 3d9ea42c564f -r a05c6f5b49bf Makefile
--- a/Makefile Thu Oct 27 17:23:04 2011 +0200
+++ b/Makefile Wed Nov 02 09:57:29 2011 +0100
@@ -101,6 +101,7 @@
TESTSUITE_CLASSES = \
$(CLASSES)/$(TESTSUITE_DIR)/Areas.class \
$(CLASSES)/$(TESTSUITE_DIR)/AALines.class \
+ $(CLASSES)/$(TESTSUITE_DIR)/AlphaComposite.class \
$(CLASSES)/$(TESTSUITE_DIR)/BlankImage.class \
$(CLASSES)/$(TESTSUITE_DIR)/ColorPaint.class \
$(CLASSES)/$(TESTSUITE_DIR)/NormalArcs.class \
@@ -149,6 +150,7 @@
COMPARE_RESULTS = \
$(RESULTS)/Areas \
$(RESULTS)/AALines \
+ $(RESULTS)/AlphaComposite \
$(RESULTS)/BlankImage \
$(RESULTS)/ColorPaint \
$(RESULTS)/NormalArcs \
diff -r 3d9ea42c564f -r a05c6f5b49bf src/org/gfxtest/testsuites/AlphaComposite.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/gfxtest/testsuites/AlphaComposite.java Wed Nov 02 09:57:29 2011 +0100
@@ -0,0 +1,65 @@
+/*
+ Java gfx-test framework
+
+ Copyright (C) 2010, 2011 Red Hat
+
+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 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.
+
+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.
+*/
+
+package org.gfxtest.testsuites;
+
+
+
+import org.gfxtest.framework.*;
+import org.gfxtest.framework.annotations.*;
+
+
+
+ at TestType(TestTypes.RENDER_TEST)
+ at Transformation(Transformations.NONE)
+ at Zoom(1)
+public class AlphaComposite extends GfxTest
+{
+ /**
+ * Entry point to the test suite.
+ *
+ * @param args graphics test configuration
+ */
+ public static void main(String[] args)
+ {
+ new AlphaComposite().runTestSuite(args);
+ }
+
+}
diff -r 3d9ea42c564f -r a05c6f5b49bf src/org/gfxtest/testsuites/TexturePaint.java
--- a/src/org/gfxtest/testsuites/TexturePaint.java Thu Oct 27 17:23:04 2011 +0200
+++ b/src/org/gfxtest/testsuites/TexturePaint.java Wed Nov 02 09:57:29 2011 +0100
@@ -586,6 +586,82 @@
}
/**
+ * Test if arc drawn by graphics.drawOval() is rendered correctly.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcEmptyFill(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // draw the arc
+ CommonShapesRenderer.drawArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if rounded rectangle drawn by graphics.drawRoundRect() is rendered correctly.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testRoundedRectangleEmptyFill(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // draw the rounded rectangle
+ CommonShapesRenderer.drawRoundedRectangle(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if polygon drawn by graphics.drawRoundRect() is rendered correctly.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testPolygonEmptyFill(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // draw the polygon
+ CommonShapesRenderer.drawPolygon(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if closed path drawn by graphics.drawPath() is rendered correctly.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClosedPathEmptyFill(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // draw the closed path
+ CommonShapesRenderer.drawClosedPath(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args graphics test configuration
More information about the distro-pkg-dev
mailing list