/hg/gfx-test: Eight new tests added into CAGOperationsOnTwoTouch...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Mar 10 10:23:18 UTC 2014
changeset 6c11c8263a23 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=6c11c8263a23
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Mar 10 11:23:57 2014 +0100
Eight new tests added into CAGOperationsOnTwoTouchingCircles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java | 200 ++++++++++
2 files changed, 205 insertions(+), 0 deletions(-)
diffs (222 lines):
diff -r 154d24fa3f31 -r 6c11c8263a23 ChangeLog
--- a/ChangeLog Fri Mar 07 13:09:25 2014 +0100
+++ b/ChangeLog Mon Mar 10 11:23:57 2014 +0100
@@ -1,3 +1,8 @@
+2014-03-10 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
+ Eight new tests added into CAGOperationsOnTwoTouchingCircles.
+
2014-03-07 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltUsingBgColor.java:
diff -r 154d24fa3f31 -r 6c11c8263a23 src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java Fri Mar 07 13:09:25 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java Mon Mar 10 11:23:57 2014 +0100
@@ -1407,6 +1407,206 @@
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 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.createAreaFromTwoTouchingCirclesUsingXorOperator(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 touching circles 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 testUnionTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(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 touching circles 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 testSubtractTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingSubtractOperator(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 touching circles 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 testInverseSubtractTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingInverseSubtractOperator(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 touching circles 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 testIntersectTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingIntersectOperator(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 touching circles 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 testXorTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingXorOperator(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 touching circles 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 testUnionTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(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 touching circles 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 testSubtractTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
// create area using union operator
Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(image);
// draw the area
More information about the distro-pkg-dev
mailing list