/hg/gfx-test: More tests added into CAGOperationsOnTwoConcentric...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Apr 23 09:33:20 UTC 2014
changeset e73acc266f26 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=e73acc266f26
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Apr 23 11:33:57 2014 +0200
More tests added into CAGOperationsOnTwoConcentricCircles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java | 250 ++++++++++
2 files changed, 255 insertions(+), 0 deletions(-)
diffs (279 lines):
diff -r 7b2d8eaf6827 -r e73acc266f26 ChangeLog
--- a/ChangeLog Tue Apr 22 10:54:07 2014 +0200
+++ b/ChangeLog Wed Apr 23 11:33:57 2014 +0200
@@ -1,3 +1,8 @@
+2014-04-23 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java:
+ More tests added into CAGOperationsOnTwoConcentricCircles.
+
2014-04-22 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltUsingBgColor.java:
diff -r 7b2d8eaf6827 -r e73acc266f26 src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java Tue Apr 22 10:54:07 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java Wed Apr 23 11:33:57 2014 +0200
@@ -1260,6 +1260,56 @@
/**
* Checks the process of creating and rendering new geometric shape
+ * constructed from two concentric 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 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.createAreaFromTwoConcentricCirclesUsingIntersectOperator(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 concentric 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 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.createAreaFromTwoConcentricCirclesUsingXorOperator(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 concentric circles using union operator. The shape is rendered
* using texture paint (fill).
*
@@ -1409,6 +1459,206 @@
}
/**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from two concentric 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.createAreaFromTwoConcentricCirclesUsingSubtractOperator(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 concentric 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.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(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 concentric 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.createAreaFromTwoConcentricCirclesUsingIntersectOperator(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 concentric 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.createAreaFromTwoConcentricCirclesUsingXorOperator(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 concentric 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.createAreaFromTwoConcentricCirclesUsingUnionOperator(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 concentric 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.createAreaFromTwoConcentricCirclesUsingSubtractOperator(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 concentric 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 testInverseSubtractTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(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 concentric 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 testIntersectTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d);
+ // create area using Intersect operator
+ Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.fill(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