/hg/gfx-test: New tests added into CAGOperationsOnTwoTouchingCir...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Mar 25 08:38:54 UTC 2014
changeset 72be1e400e82 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=72be1e400e82
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Mar 25 09:39:30 2014 +0100
New tests added into CAGOperationsOnTwoTouchingCircles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java | 125 ++++++++++
2 files changed, 130 insertions(+), 0 deletions(-)
diffs (147 lines):
diff -r 6c229eda647a -r 72be1e400e82 ChangeLog
--- a/ChangeLog Mon Mar 24 11:06:19 2014 +0100
+++ b/ChangeLog Tue Mar 25 09:39:30 2014 +0100
@@ -1,3 +1,8 @@
+2014-03-25 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java:
+ New tests added into CAGOperationsOnTwoTouchingCircles.
+
2014-03-24 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java:
diff -r 6c229eda647a -r 72be1e400e82 src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Mon Mar 24 11:06:19 2014 +0100
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Tue Mar 25 09:39:30 2014 +0100
@@ -433,6 +433,131 @@
/**
* Checks the process of creating and rendering new geometric shape
+ * constructed from two overlapping rectangles using union operator. The shape is rendered
+ * using zero 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 testUnionZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(image);
+ // draw the area
+ graphics2d.draw(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 zero 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 testSubtractZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(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 zero 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 testInverseSubtractZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(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 zero 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 testIntersectZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(image);
+ // draw the area
+ graphics2d.draw(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 zero 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 testXorZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
* constructed from two rectangles using union operator. The shape is
* rendered using color paint (fill).
*
More information about the distro-pkg-dev
mailing list