/hg/gfx-test: Ten new helper methods added into CAGOperationsOnC...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Tue Jun 3 09:38:40 UTC 2014
changeset 71e36aecc981 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=71e36aecc981
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Tue Jun 03 11:39:32 2014 +0200
Ten new helper methods added into CAGOperationsOnChordAndRectangle.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java | 230 ++++++++++
2 files changed, 235 insertions(+), 0 deletions(-)
diffs (252 lines):
diff -r a7c9405ecdd8 -r 71e36aecc981 ChangeLog
--- a/ChangeLog Mon Jun 02 13:32:19 2014 +0200
+++ b/ChangeLog Tue Jun 03 11:39:32 2014 +0200
@@ -1,3 +1,8 @@
+2014-06-03 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
+ Ten new helper methods added into CAGOperationsOnChordAndRectangle.
+
2014-06-02 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
diff -r a7c9405ecdd8 -r 71e36aecc981 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java
--- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Mon Jun 02 13:32:19 2014 +0200
+++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Tue Jun 03 11:39:32 2014 +0200
@@ -1776,6 +1776,236 @@
}
/**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using inverse subtract operator.
+ * The shape is rendered using vertical gradient 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 testSmallChordInsideRectangleInverseSubtractVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set vertical gradient fill
+ CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using intersect operator. The shape is
+ * rendered using vertical gradient 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 testSmallChordInsideRectangleIntersectVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set vertical gradient fill
+ CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using XOR operator. The shape is
+ * rendered using vertical gradient 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 testSmallChordInsideRectangleXorVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set vertical gradient fill
+ CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using union operator. The shape is
+ * rendered using diagonal gradient 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 testSmallChordInsideRectangleUnionDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set diagonal gradient fill
+ CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using subtract operator. The shape is
+ * rendered using diagonal gradient 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 testSmallChordInsideRectangleSubtractDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set diagonal gradient fill
+ CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+ // create area using subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using inverse subtract operator.
+ * The shape is rendered using diagonal gradient 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 testSmallChordInsideRectangleInverseSubtractDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set diagonal gradient fill
+ CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+ // create area using inverse subtract operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using intersect operator. The shape is
+ * rendered using diagonal gradient 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 testSmallChordInsideRectangleIntersectDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set diagonal gradient fill
+ CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+ // create area using intersect operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from a chord inside a rectangle using XOR operator. The shape is
+ * rendered using diagonal gradient 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 testSmallChordInsideRectangleXorDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set diagonal gradient fill
+ CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
+ // create area using XOR operator
+ Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image);
+ // fill the area
+ graphics2d.fill(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using union operator. The shape is
+ * rendered using stroke paint.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testOverlappingChordAndRectangleUnionStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingUnionOperator(image);
+ // draw the area
+ graphics2d.draw(area);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Checks the process of creating and rendering new geometric shape
+ * constructed from chord and rectangle using subtract operator. The shape is
+ * rendered using stroke paint.
+ *
+ * @param image
+ * image to which area is to be drawn
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testOverlappingChordAndRectangleSubtractStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // create area using union operator
+ Area area = CommonCAGOperations.createAreaFromOverlappingChordAndRectangleUsingSubtractOperator(image);
+ // draw the area
+ graphics2d.draw(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