/hg/gfx-test: Ten new tests added into CAGOperationsOnChordAndRe...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Apr 8 07:53:30 UTC 2014
changeset 415e13ece3f9 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=415e13ece3f9
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Apr 08 09:54:16 2014 +0200
Ten new tests added into CAGOperationsOnChordAndRectangle.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java | 244 ++++++++++
2 files changed, 249 insertions(+), 0 deletions(-)
diffs (266 lines):
diff -r 4e1cd7cd10a1 -r 415e13ece3f9 ChangeLog
--- a/ChangeLog Mon Apr 07 11:21:32 2014 +0200
+++ b/ChangeLog Tue Apr 08 09:54:16 2014 +0200
@@ -1,3 +1,8 @@
+2014-04-08 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+ Ten new tests added into CAGOperationsOnChordAndRectangle.
+
2014-04-07 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java:
diff -r 4e1cd7cd10a1 -r 415e13ece3f9 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Mon Apr 07 11:21:32 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Tue Apr 08 09:54:16 2014 +0200
@@ -1065,6 +1065,250 @@
}
/**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using inverse subtract operator.
+ * The shape is rendered using stroke paint.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testSmallChordInsideRectangleInverseSubtractStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using intersect operator. The shape
+ * is rendered using stroke paint.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testSmallChordInsideRectangleIntersectStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using XOR operator. The shape is
+ * rendered using stroke paint.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testSmallChordInsideRectangleXorStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using union operator. The shape is
+ * rendered using 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 testSmallChordInsideRectangleUnionWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using subtract operator. The shape
+ * is rendered using 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 testSmallChordInsideRectangleSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using inverse subtract operator.
+ * The shape is rendered using 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 testSmallChordInsideRectangleInverseSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using intersect operator. The shape
+ * is rendered using 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 testSmallChordInsideRectangleIntersectWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using XOR operator. The shape is
+ * rendered using 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 testSmallChordInsideRectangleXorWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using union operator. The shape is
+ * rendered using 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 testSmallChordInsideRectangleUnionExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set extra wide stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using subtract operator. The shape
+ * is rendered using 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 testSmallChordInsideRectangleSubtractExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set extra wide stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args not used in this case
More information about the distro-pkg-dev
mailing list