/hg/gfx-test: * src/org/gfxtest/callbacks/CommonCircleDrawCallba...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Jul 12 05:03:39 PDT 2012
changeset 83c95c58b0c2 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=83c95c58b0c2
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Jul 12 14:05:47 2012 +0200
* src/org/gfxtest/callbacks/CommonCircleDrawCallbacks.java:
Fixed improper JavaDoc.
* src/org/gfxtest/callbacks/CommonEllipseDrawCallbacks.java:
Added class containing callback methods used during rendering
ellipses (ovals).
* src/org/gfxtest/framework/PrintTest.java:
Added new constant used by the tests.
* Makefile: Updated according to previous changes.
diffstat:
ChangeLog | 11 +
Makefile | 1 +
src/org/gfxtest/callbacks/CommonCircleDrawCallbacks.java | 2 +-
src/org/gfxtest/callbacks/CommonEllipseDrawCallbacks.java | 111 ++++++++++++++
src/org/gfxtest/framework/PrintTest.java | 5 +
5 files changed, 129 insertions(+), 1 deletions(-)
diffs (171 lines):
diff -r bdb992726715 -r 83c95c58b0c2 ChangeLog
--- a/ChangeLog Tue Jul 10 11:44:43 2012 +0200
+++ b/ChangeLog Thu Jul 12 14:05:47 2012 +0200
@@ -1,3 +1,14 @@
+2012-07-12 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/callbacks/CommonCircleDrawCallbacks.java:
+ Fixed improper JavaDoc.
+ * src/org/gfxtest/callbacks/CommonEllipseDrawCallbacks.java:
+ Added class containing callback methods used during rendering
+ ellipses (ovals).
+ * src/org/gfxtest/framework/PrintTest.java:
+ Added new constant used by the tests.
+ * Makefile: Updated according to previous changes.
+
2012-07-10 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/PrintTestRoundRectangles.java:
diff -r bdb992726715 -r 83c95c58b0c2 Makefile
--- a/Makefile Tue Jul 10 11:44:43 2012 +0200
+++ b/Makefile Thu Jul 12 14:05:47 2012 +0200
@@ -97,6 +97,7 @@
$(CLASSES)/$(FRAMEWORK_DIR)/PostScriptToPngConverter.class \
$(CLASSES)/$(FRAMEWORK_DIR)/PrintJobWatcher.class \
$(CLASSES)/$(CALLBACKS_DIR)/CommonCircleDrawCallbacks.class \
+ $(CLASSES)/$(CALLBACKS_DIR)/CommonEllipseDrawCallbacks.class \
$(CLASSES)/$(CALLBACKS_DIR)/CommonLineDrawCallbacks.class \
$(CLASSES)/$(CALLBACKS_DIR)/HorizontalLineDrawCallbacks.class \
$(CLASSES)/$(CALLBACKS_DIR)/VerticalLineDrawCallbacks.class \
diff -r bdb992726715 -r 83c95c58b0c2 src/org/gfxtest/callbacks/CommonCircleDrawCallbacks.java
--- a/src/org/gfxtest/callbacks/CommonCircleDrawCallbacks.java Tue Jul 10 11:44:43 2012 +0200
+++ b/src/org/gfxtest/callbacks/CommonCircleDrawCallbacks.java Thu Jul 12 14:05:47 2012 +0200
@@ -85,7 +85,7 @@
}
/**
- * This method is called for each rendered horizontal circle.
+ * This method is called for each rendered circle.
*
* @param x
* horizontal coordinate of a circle center
diff -r bdb992726715 -r 83c95c58b0c2 src/org/gfxtest/callbacks/CommonEllipseDrawCallbacks.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/gfxtest/callbacks/CommonEllipseDrawCallbacks.java Thu Jul 12 14:05:47 2012 +0200
@@ -0,0 +1,111 @@
+/*
+ Java gfx-test framework
+
+ Copyright (C) 2012 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.callbacks;
+
+
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+
+
+
+import org.gfxtest.framework.TestImage;
+
+
+
+/**
+ * Class representing set of callback methods called for each rendered ellipse.
+ *
+ * @author Pavel Tisnovsky
+ */
+public abstract class CommonEllipseDrawCallbacks
+{
+ /**
+ * Image to which ellipses are to be drawn.
+ */
+ protected TestImage image;
+
+ /**
+ * Graphics canvas.
+ */
+ protected Graphics2D graphics;
+
+ /**
+ * Setup phase.
+ *
+ * @param image
+ * image to which ellipse are to be drawn
+ * @param graphics2d
+ * graphics canvas
+ */
+ public void setup(TestImage image, Graphics2D graphics)
+ {
+ this.image = image;
+ this.graphics = graphics;
+ // set drawing color
+ graphics.setColor(Color.BLACK);
+ }
+
+ /**
+ * This method is called for each rendered ellipse.
+ *
+ * @param x
+ * horizontal coordinate of an ellipse center
+ * @param y
+ * vertical coordinate of an ellipse center
+ * @param radius
+ * ellipse radius
+ * @param maxRadius
+ * maximum allowable ellipse radius (radius of major axe)
+ * @param colorIndex
+ * color index
+ */
+ public abstract void iterationCallBack(int x, int y, int radius, int maxRadius, int colorIndex);
+
+ /**
+ * Cleanup phase.
+ */
+ public void cleanup()
+ {
+ return;
+ }
+
+}
diff -r bdb992726715 -r 83c95c58b0c2 src/org/gfxtest/framework/PrintTest.java
--- a/src/org/gfxtest/framework/PrintTest.java Tue Jul 10 11:44:43 2012 +0200
+++ b/src/org/gfxtest/framework/PrintTest.java Thu Jul 12 14:05:47 2012 +0200
@@ -82,6 +82,11 @@
protected static final int CIRCLE_RADIUS_STEP = 10;
/**
+ * Offset between two ellipses in each test iteration.
+ */
+ protected static final int ELLIPSE_RADIUS_STEP = 10;
+
+ /**
* Offset between two arcs in each test iteration.
*/
protected static final int ARC_RADIUS_STEP = 10;
More information about the distro-pkg-dev
mailing list