Mercurial > hg > gfx-test
changeset 512:5a9cc7bba621 draft
Six new tests added into CAGOperationsOnPieAndRectangle test suite.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Tue, 14 Jan 2014 13:20:15 +0100 |
parents | d63560be2750 |
children | 121696444efb |
files | ChangeLog src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java |
diffstat | 2 files changed, 156 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 13 12:56:16 2014 +0100 +++ b/ChangeLog Tue Jan 14 13:20:15 2014 +0100 @@ -1,3 +1,8 @@ +2014-01-14 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java: + Six new tests added into CAGOperationsOnPieAndRectangle test suite. + 2014-01-13 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java:
--- a/src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java Mon Jan 13 12:56:16 2014 +0100 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnPieAndRectangle.java Tue Jan 14 13:20:15 2014 +0100 @@ -1,7 +1,7 @@ /* Java gfx-test framework - Copyright (C) 2013 Red Hat + Copyright (C) 2013, 2014 Red Hat This file is part of IcedTea. @@ -194,6 +194,156 @@ } /** + * Checks the process of creating and rendering new geometric shape + * constructed from pie and rectangle using union operator. The shape is + * rendered using wide 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 testBigPieRectangleUnionWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingUnionOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from pie and rectangle using intersect operator. The shape is + * rendered using wide 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 testBigPieRectangleIntersectWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingIntersectOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from pie and rectangle using subtract operator. The shape + * is rendered using wide 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 testBigPieRectangleSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingSubtractOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from pie and rectangle using inverse subtract operator. + * The shape is rendered using wide 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 testBigPieRectangleInverseSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingInverseSubtractOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from pie and rectangle using Xor operator. + * The shape is rendered using wide 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 testBigPieRectangleXorWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using XOR operator + Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingXorOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from pie and rectangle using union operator. The shape is + * rendered using extra wide 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 testBigPieRectangleUnionExtraWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromBiggerPieAndRectangleUsingUnionOperator(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