/hg/gfx-test: Ten new tests added into CAGOperationsOnTwoTouchin...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Apr 17 07:43:47 UTC 2014
changeset accc207c5985 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=accc207c5985
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Apr 17 09:44:26 2014 +0200
Ten new tests added into CAGOperationsOnTwoTouchingCircles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java | 252 +++++++++-
2 files changed, 256 insertions(+), 1 deletions(-)
diffs (279 lines):
diff -r 3f3aea48da06 -r accc207c5985 ChangeLog
--- a/ChangeLog Wed Apr 16 13:14:23 2014 +0200
+++ b/ChangeLog Thu Apr 17 09:44:26 2014 +0200
@@ -1,3 +1,8 @@
+2014-04-17 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java:
+ Ten new tests added into CAGOperationsOnTwoTouchingCircles.
+
2014-04-16 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
diff -r 3f3aea48da06 -r accc207c5985 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Wed Apr 16 13:14:23 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Thu Apr 17 09:44:26 2014 +0200
@@ -1182,6 +1182,256 @@
}
/**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using union operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testUnionTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using subtract operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testSubtractTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using inverse subtract operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testInverseSubtractTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using intersect operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testIntersectTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using Xor operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testXorTextureFillUsingCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using union operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testUnionTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using subtract operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testSubtractTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using inverse subtract operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testInverseSubtractTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using intersect operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testIntersectTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using Xor operator. The shape is rendered
+ * using texture paint (fill).
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testXorTextureFillUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args
@@ -1191,5 +1441,5 @@
{
new CAGOperationsOnTwoOverlappingRectangles().runTestSuite(args);
}
-
+
}
More information about the distro-pkg-dev
mailing list