/hg/gfx-test: Ten new tests added into the test suite Paths.java.
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Jan 30 00:13:18 PST 2013
changeset f1dfde32c5a5 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=f1dfde32c5a5
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Jan 30 09:16:14 2013 +0100
Ten new tests added into the test suite Paths.java.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/Paths.java | 222 ++++++++++++++++++++++++++++++++++
2 files changed, 227 insertions(+), 0 deletions(-)
diffs (244 lines):
diff -r a631f9ef36fb -r f1dfde32c5a5 ChangeLog
--- a/ChangeLog Tue Jan 29 09:58:37 2013 +0100
+++ b/ChangeLog Wed Jan 30 09:16:14 2013 +0100
@@ -1,3 +1,8 @@
+2013-01-30 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/Paths.java:
+ Ten new tests added into the test suite Paths.java.
+
2013-01-29 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltBasicTests.java:
diff -r a631f9ef36fb -r f1dfde32c5a5 src/org/gfxtest/testsuites/Paths.java
--- a/src/org/gfxtest/testsuites/Paths.java Tue Jan 29 09:58:37 2013 +0100
+++ b/src/org/gfxtest/testsuites/Paths.java Wed Jan 30 09:16:14 2013 +0100
@@ -898,6 +898,228 @@
}
/**
+ * Check if closed path could be clipped by an ellipse shape. Path
+ * is rendered using stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClosedPathDoubleThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(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 thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testCrossedClosedPathFloatThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(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 thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testCrossedClosedPathDoubleThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(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 extra thick 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 testLinePathFloatExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(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 extra thick 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 testLinePathDoubleExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawLinePathDouble(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if quadratic Bezier 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 testQuadraticPathFloatExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawQuadraticPathFloat(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if quadratic Bezier 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 testQuadraticPathDoubleExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawQuadraticPathDouble(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if cubic Bezier 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 testCubicPathFloatExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawCubicPathFloat(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if cubic Bezier 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 testCubicPathDoubleExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawCubicPathDouble(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * 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 testClosedPathFloatExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // draw the path
+ drawClosedPathFloat(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args
More information about the distro-pkg-dev
mailing list