/hg/gfx-test: * src/org/gfxtest/testsuites/ClippingPathByRectang...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Thu Apr 19 08:37:20 PDT 2012
changeset a630b16209f8 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=a630b16209f8
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Apr 19 17:39:58 2012 +0200
* src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java:
Added new tests to this test suite.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java | 462 ++++++++++-
2 files changed, 465 insertions(+), 2 deletions(-)
diffs (truncated from 505 to 500 lines):
diff -r 7adf78a0fba2 -r a630b16209f8 ChangeLog
--- a/ChangeLog Wed Apr 18 15:10:50 2012 +0200
+++ b/ChangeLog Thu Apr 19 17:39:58 2012 +0200
@@ -1,3 +1,8 @@
+2012-04-19 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java:
+ Added new tests to this test suite.
+
2012-04-18 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java:
diff -r 7adf78a0fba2 -r a630b16209f8 src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java
--- a/src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java Wed Apr 18 15:10:50 2012 +0200
+++ b/src/org/gfxtest/testsuites/ClippingPathByRectangleShape.java Thu Apr 19 17:39:58 2012 +0200
@@ -74,6 +74,8 @@
@Zoom(1)
public class ClippingPathByRectangleShape extends GfxTest
{
+ private static final float[] DOTTED_PATTERN = new float[] {1,40};
+
/**
* Prepare canvas for the rendering.
*
@@ -1110,7 +1112,7 @@
/**
* Check if line path could be clipped by a rectangle shape. Path is rendered
- * using dotted stroke paint with normal stroke width and using round cap style.
+ * using dotted stroke paint with normal stroke width.
*
* @param image
* work image
@@ -1125,7 +1127,7 @@
// set stroke width
//CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
// set dashed pattern
- CommonRenderingStyles.setDashedStrokePattern(graphics2d, new float[] {1,20});
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
// set clip region and draw the path
drawLinePathClippedByRectangleShape(image, graphics2d);
// test result
@@ -1133,6 +1135,462 @@
}
/**
+ * Check if quadratic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with normal stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipQuadraticPathByRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if cubic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with normal stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCubicPathByRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCubicPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with normal stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if crossed closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with normal stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCrossedClosedPathByRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if line path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with zero stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipLinePathByRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawLinePathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if quadratic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with zero stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipQuadraticPathByRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if cubic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with zero stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCubicPathByRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCubicPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with zero stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if crossed closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with zero stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCrossedClosedPathByRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if line path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipLinePathByRectangleShapeDottedThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawLinePathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if quadratic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipQuadraticPathByRectangleShapeDottedThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if cubic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCubicPathByRectangleShapeDottedThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCubicPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleShapeDottedThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if crossed closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCrossedClosedPathByRectangleShapeDottedThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if line path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with extra thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipLinePathByRectangleShapeDottedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawLinePathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if quadratic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with extra thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipQuadraticPathByRectangleShapeDottedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawQuadraticPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if cubic path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with extra thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCubicPathByRectangleShapeDottedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCubicPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with extra thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleShapeDottedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if crossed closed path could be clipped by a rectangle shape. Path is rendered
+ * using dotted stroke paint with extra thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCrossedClosedPathByRectangleShapeDottedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d, BasicStroke.CAP_ROUND);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN);
+ // set clip region and draw the path
+ drawCrossedClosedPathClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
More information about the distro-pkg-dev
mailing list