/hg/gfx-test: Added new helper methods into src/org/gfxtest/test...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Dec 4 00:47:04 PST 2012
changeset 1f29a0e79a5f in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=1f29a0e79a5f
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Dec 04 09:50:03 2012 +0100
Added new helper methods into src/org/gfxtest/testsuites/Paths.java which will be used by the new tests.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/Paths.java | 234 ++++++++++++++++++++++++++++++++++
2 files changed, 239 insertions(+), 0 deletions(-)
diffs (256 lines):
diff -r b6ab20d99bbc -r 1f29a0e79a5f ChangeLog
--- a/ChangeLog Mon Dec 03 09:33:36 2012 +0100
+++ b/ChangeLog Tue Dec 04 09:50:03 2012 +0100
@@ -1,3 +1,8 @@
+2012-12-04 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/Paths.java:
+ New helper methods which will be used by the new tests.
+
2012-12-03 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java:
diff -r b6ab20d99bbc -r 1f29a0e79a5f src/org/gfxtest/testsuites/Paths.java
--- a/src/org/gfxtest/testsuites/Paths.java Mon Dec 03 09:33:36 2012 +0100
+++ b/src/org/gfxtest/testsuites/Paths.java Tue Dec 04 09:50:03 2012 +0100
@@ -72,6 +72,240 @@
{
/**
+ * Draw path consisting of one line only.
+ * Line path is constructed using new Path.Float()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawLinePathFloat(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the line path
+ graphics2d.draw(CommonPathsGenerator.createLinePathFloat(image));
+ }
+
+ /**
+ * Draw path consisting of one line only.
+ * Line path is constructed using new Path.Double()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawLinePathDouble(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the line path
+ graphics2d.draw(CommonPathsGenerator.createLinePathDouble(image));
+ }
+
+ /**
+ * Draw quadratic path.
+ * Path is constructed using new Path.Float()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawQuadraticPathFloat(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the quadratic path
+ graphics2d.draw(CommonPathsGenerator.createQuadraticPathFloat(image));
+ }
+
+ /**
+ * Draw quadratic path.
+ * Path is constructed using new Path.Double()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawQuadraticPathDouble(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the quadratic path
+ graphics2d.draw(CommonPathsGenerator.createQuadraticPathDouble(image));
+ }
+
+ /**
+ * Draw cubic path.
+ * Path is constructed using new Path.Float()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCubicPathFloat(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the cubic path
+ graphics2d.draw(CommonPathsGenerator.createCubicPathFloat(image));
+ }
+
+ /**
+ * Draw cubic path.
+ * Path is constructed using new Path.Double()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCubicPathDouble(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the cubic path
+ graphics2d.draw(CommonPathsGenerator.createCubicPathDouble(image));
+ }
+
+ /**
+ * Draw closed path.
+ * Path is constructed using new Path.Float()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawClosedPathFloat(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the closed path
+ graphics2d.draw(CommonPathsGenerator.createClosedPathFloat(image));
+ }
+
+ /**
+ * Draw closed path.
+ * Path is constructed using new Path.Double()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawClosedPathDouble(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the closed path
+ graphics2d.draw(CommonPathsGenerator.createClosedPathDouble(image));
+ }
+
+ /**
+ * Draw crossed path.
+ * Path is constructed using new Path.Float()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCrossedPathFloat(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the crossed path
+ graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathFloat(image));
+ }
+
+ /**
+ * Draw crossed path.
+ * Path is constructed using new Path.Double()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCrossedPathDouble(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the crossed path
+ graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathDouble(image));
+ }
+
+ /**
+ * Draw crossed path containing quadratic segment.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCrossedPathFloatContainingQuadraticSegment(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the crossed path
+ graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathContainingQuadraticSegmentFloat(image));
+ }
+
+ /**
+ * Draw crossed path containing quadratic segment.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCrossedPathDoubleContainingQuadraticSegment(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the crossed path
+ graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathContainingQuadraticSegmentDouble(image));
+ }
+
+ /**
+ * Draw crossed path containing cubic segment.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCrossedPathFloatContainingCubicSegment(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the crossed path
+ graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathContainingCubicSegmentFloat(image));
+ }
+
+ /**
+ * Draw crossed path containing cubic segment.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ */
+ private static void drawCrossedPathDoubleContainingCubicSegment(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // draw the crossed path
+ graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathContainingCubicSegmentDouble(image));
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args
More information about the distro-pkg-dev
mailing list