/hg/gfx-test: Added five new tests into the testsuite CAGOperati...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Jan 28 01:15:19 PST 2014
changeset 2da99235dc05 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=2da99235dc05
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jan 28 10:19:36 2014 +0100
Added five new tests into the testsuite CAGOperationsOnTwoTouchingCircles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java | 127 +++++++++-
2 files changed, 131 insertions(+), 1 deletions(-)
diffs (156 lines):
diff -r 115b6ea402f8 -r 2da99235dc05 ChangeLog
--- a/ChangeLog Mon Jan 27 12:49:11 2014 +0100
+++ b/ChangeLog Tue Jan 28 10:19:36 2014 +0100
@@ -1,3 +1,8 @@
+2014-01-28 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
+ Added five new tests into the testsuite CAGOperationsOnTwoTouchingCircles.
+
2014-01-27 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/CAGOperationsOnRoundRectangleAndRectangle.java:
diff -r 115b6ea402f8 -r 2da99235dc05 src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java Mon Jan 27 12:49:11 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java Tue Jan 28 10:19:36 2014 +0100
@@ -1,7 +1,7 @@
/*
Java gfx-test framework
- Copyright (C) 2010, 2011 Red Hat
+ Copyright (C) 2010, 2011, 2012, 2013, 2014 Red Hat
This file is part of IcedTea.
@@ -435,6 +435,131 @@
/**
* Checks the process of creating and rendering new geometric shape
* constructed from two touching circles using union operator. The shape is rendered
+ * using zero wide stroke.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testUnionZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two touching circles using subtract operator. The shape is
+ * rendered using zero stroke.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testSubtractZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two touching circles using inverse subtract operator. The shape
+ * is rendered using zero stroke.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testInverseSubtractZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingInverseSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two touching circles using intersect operator. The shape is
+ * rendered using zero stroke.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testIntersectZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two touching circles using XOR operator. The shape is rendered
+ * using zero stroke.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testXorZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingXorOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two touching circles using union operator. The shape is rendered
* using color paint (fill).
*
* @param image
More information about the distro-pkg-dev
mailing list