/hg/gfx-test: Ten new helper methods added into CAGOperationsOnC...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Jun 11 10:03:02 UTC 2014
changeset 40ea0d6086af in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=40ea0d6086af
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Jun 11 12:03:52 2014 +0200
Ten new helper methods 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 263e258d06ee -r 40ea0d6086af ChangeLog
--- a/ChangeLog Tue Jun 10 12:51:29 2014 +0200
+++ b/ChangeLog Wed Jun 11 12:03:52 2014 +0200
@@ -1,3 +1,8 @@
+2014-06-11 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+ Ten new helper methods added into CAGOperationsOnChordAndRectangle.
+
2014-06-10 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
diff -r 263e258d06ee -r 40ea0d6086af src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Tue Jun 10 12:51:29 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Wed Jun 11 12:03:52 2014 +0200
@@ -2006,6 +2006,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 testOverlappingChordAndRectangleInverseSubtractStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingInverseSubtractOperator(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 testOverlappingChordAndRectangleIntersectStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingIntersectOperator(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 testOverlappingChordAndRectangleXorStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingXorOperator(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 testOverlappingChordAndRectangleUnionWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingUnionOperator(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 testOverlappingChordAndRectangleSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingSubtractOperator(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 testOverlappingChordAndRectangleInverseSubtractWideStrokePaint(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.createAreaFromOverlappingChordAndRectangleUsingInverseSubtractOperator(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 testOverlappingChordAndRectangleIntersectWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingIntersectOperator(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 testOverlappingChordAndRectangleXorWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingXorOperator(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 testOverlappingChordAndRectangleUnionExtraWideStrokePaint(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.createAreaFromOverlappingChordAndRectangleUsingUnionOperator(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 testOverlappingChordAndRectangleSubtractExtraWideStrokePaint(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.createAreaFromOverlappingChordAndRectangleUsingSubtractOperator(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