/hg/gfx-test: Ten new tests added into CAGOperationsOnTwoOverlap...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Oct 2 07:33:54 UTC 2014
changeset f8df83840d12 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=f8df83840d12
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Oct 02 09:35:08 2014 +0200
Ten new tests added into CAGOperationsOnTwoOverlappingRectangles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java | 250 ++++++++++
2 files changed, 255 insertions(+), 0 deletions(-)
diffs (272 lines):
diff -r ebe990ae1127 -r f8df83840d12 ChangeLog
--- a/ChangeLog Wed Oct 01 10:48:38 2014 +0200
+++ b/ChangeLog Thu Oct 02 09:35:08 2014 +0200
@@ -1,3 +1,8 @@
+2014-10-02 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java:
+ Ten new tests added into CAGOperationsOnTwoOverlappingRectangles.
+
2014-10-01 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java:
diff -r ebe990ae1127 -r f8df83840d12 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Wed Oct 01 10:48:38 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Thu Oct 02 09:35:08 2014 +0200
@@ -2432,6 +2432,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 testUnionTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(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 testSubtractTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(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 testInverseSubtractTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(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 testIntersectTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics2d);
+ // create area using Intersect 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 testXorTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics2d);
+ // create area using Xor 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 testUnionTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(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 testSubtractTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(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 testInverseSubtractTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(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 testIntersectTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d);
+ // create area using Intersect 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 testXorTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d);
+ // create area using Xor 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
More information about the distro-pkg-dev
mailing list