/hg/gfx-test: Added five new tests into the test suite Paths.jav...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Jan 31 00:53:56 PST 2013
changeset 9c7ac29d5ebe in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=9c7ac29d5ebe
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Jan 31 09:56:58 2013 +0100
Added five new tests into the test suite Paths.java: testClosedPathDoubleExtraThickStrokePaint, testCrossedClosedPathFloatExtraThickStrokePaint, testCrossedClosedPathDoubleExtraThickStrokePaint, testLinePathFloatDashedStrokePaint and testLinePathDoubleDashedStrokePaint.
diffstat:
ChangeLog | 10 +++
src/org/gfxtest/testsuites/Paths.java | 108 ++++++++++++++++++++++++++++++++++
2 files changed, 118 insertions(+), 0 deletions(-)
diffs (135 lines):
diff -r f1dfde32c5a5 -r 9c7ac29d5ebe ChangeLog
--- a/ChangeLog Wed Jan 30 09:16:14 2013 +0100
+++ b/ChangeLog Thu Jan 31 09:56:58 2013 +0100
@@ -1,3 +1,13 @@
+2013-01-31 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/Paths.java:
+ Added five new tests into the test suite Paths.java:
+ testClosedPathDoubleExtraThickStrokePaint,
+ testCrossedClosedPathFloatExtraThickStrokePaint,
+ testCrossedClosedPathDoubleExtraThickStrokePaint,
+ testLinePathFloatDashedStrokePaint and
+ testLinePathDoubleDashedStrokePaint.
+
2013-01-30 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/Paths.java:
diff -r f1dfde32c5a5 -r 9c7ac29d5ebe src/org/gfxtest/testsuites/Paths.java
--- a/src/org/gfxtest/testsuites/Paths.java Wed Jan 30 09:16:14 2013 +0100
+++ b/src/org/gfxtest/testsuites/Paths.java Thu Jan 31 09:56:58 2013 +0100
@@ -1120,6 +1120,114 @@
}
/**
+ * Check if closed path could be clipped by an ellipse shape. Path
+ * is rendered using stroke paint with extra thick width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClosedPathDoubleExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawClosedPathDouble(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if crossed closed path could be clipped by an ellipse shape. Path
+ * is rendered using stroke paint with extra thick width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testCrossedClosedPathFloatExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawCrossedPathFloat(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if crossed closed path could be clipped by an ellipse shape. Path
+ * is rendered using stroke paint with extra thick width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testCrossedClosedPathDoubleExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawCrossedPathDouble(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if line path could be clipped by an ellipse shape. Path is
+ * rendered using stroke paint with default stroke width.
+ * Line path is constructed using new Path.Float()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testLinePathFloatDashedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d);
+ // draw the path
+ drawLinePathFloat(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if line path could be clipped by an ellipse shape. Path is
+ * rendered using stroke paint with default stroke width.
+ * Line path is constructed using new Path.Double()
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testLinePathDoubleDashedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d);
+ // draw the path
+ drawLinePathDouble(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args
More information about the distro-pkg-dev
mailing list