/hg/gfx-test: 2012-01-02 Pavel Tisnovsky <ptisnovs at redhat.com>
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Jan 2 05:26:21 PST 2012
changeset 26efcf025825 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=26efcf025825
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Jan 02 14:27:23 2012 +0100
2012-01-02 Pavel Tisnovsky <ptisnovs at redhat.com>
*
src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java:
Added five new tests to this test case.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java | 125 +++++++++++-
2 files changed, 127 insertions(+), 3 deletions(-)
diffs (189 lines):
diff -r e42aff9d3457 -r 26efcf025825 ChangeLog
--- a/ChangeLog Fri Dec 23 12:49:45 2011 +0100
+++ b/ChangeLog Mon Jan 02 14:27:23 2012 +0100
@@ -1,3 +1,8 @@
+2012-01-02 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java:
+ Added five new tests to this test case.
+
2011-12-23 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/framework/CommonRenderingStyles.java:
diff -r e42aff9d3457 -r 26efcf025825 src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java
--- a/src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java Fri Dec 23 12:49:45 2011 +0100
+++ b/src/org/gfxtest/testsuites/ClippingPathByRectangleArea.java Mon Jan 02 14:27:23 2012 +0100
@@ -40,6 +40,7 @@
package org.gfxtest.testsuites;
+import java.awt.BasicStroke;
import java.awt.Graphics2D;
@@ -627,7 +628,7 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipLinePathByRectangleAreaDashedStroke(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipLinePathByRectangleAreaDashedStrokePaint(TestImage image, Graphics2D graphics2d)
{
// render clip rectangle
CommonClippingOperations.renderClipRectangle(image, graphics2d);
@@ -640,6 +641,28 @@
}
/**
+ * Check if closed path could be clipped by a rectangle area. Path is
+ * rendered using stroke paint with default stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleAreaDashedStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleArea(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Check if line path could be clipped by a rectangle area. Path is
* rendered using stroke paint with thick stroke width.
*
@@ -649,7 +672,7 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipLinePathByRectangleAreaDashedThickStroke(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipLinePathByRectangleAreaDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
{
// render clip rectangle
CommonClippingOperations.renderClipRectangle(image, graphics2d);
@@ -664,6 +687,30 @@
}
/**
+ * Check if closed path could be clipped by a rectangle area. Path is
+ * rendered using stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleAreaDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeThickWidth(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePattern(graphics2d);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleArea(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Check if line path could be clipped by a rectangle area. Path is
* rendered using stroke paint with thick stroke width.
*
@@ -673,7 +720,7 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipLinePathByRectangleAreaDashedExtraThickStroke(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipLinePathByRectangleAreaDashedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
{
// render clip rectangle
CommonClippingOperations.renderClipRectangle(image, graphics2d);
@@ -688,6 +735,78 @@
}
/**
+ * Check if closed path could be clipped by a rectangle area. Path is
+ * rendered using stroke paint with thick stroke width.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleAreaDashedExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
+ // set dashed pattern
+ CommonRenderingStyles.setDashedStrokePatternForExtraThickPaths(graphics2d);
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleArea(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if line path could be clipped by a rectangle area. Path is rendered
+ * using stroke paint with thick stroke width and using round cap style.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipLinePathByRectangleAreaDottedStrokePaint(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, new float[] {1,20});
+ // set clip region and draw the path
+ drawLinePathClippedByRectangleArea(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if closed path could be clipped by a rectangle area. Path is rendered
+ * using stroke paint with thick stroke width and using round cap style.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipClosedPathByRectangleAreaDottedStrokePaint(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, new float[] {1,20});
+ // set clip region and draw the path
+ drawClosedPathClippedByRectangleArea(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
* Entry point to the test suite.
*
* @param args
More information about the distro-pkg-dev
mailing list