Mercurial > hg > gfx-test
changeset 660:c0e8cdac2fe5 draft
Updated.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Tue, 09 Dec 2014 13:41:26 +0100 |
parents | 4cdc8abe0241 |
children | b8fb17c8f2a1 |
files | ChangeLog src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java |
diffstat | 2 files changed, 129 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Dec 08 11:45:33 2014 +0100 +++ b/ChangeLog Tue Dec 09 13:41:26 2014 +0100 @@ -1,3 +1,8 @@ +2014-12-09 Pavel Tisnovsky <ptisnovs@redhat.com> + + * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java: + Updated. + 2014-12-08 Pavel Tisnovsky <ptisnovs@redhat.com> * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java:
--- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java Mon Dec 08 11:45:33 2014 +0100 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRoundRectangles.java Tue Dec 09 13:41:26 2014 +0100 @@ -3056,6 +3056,130 @@ return TestResult.PASSED; } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping round rectangles 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 testUnionTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingUnionOperator(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 overlapping round rectangles 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 testSubtractTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingSubtractOperator(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 overlapping round rectangles 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 testInverseSubtractTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingInverseSubtractOperator(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 overlapping round rectangles 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 testIntersectTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingIntersectOperator(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 overlapping round rectangles 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 testXorTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRoundRectanglesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } /** * Entry point to the test suite.