/hg/gfx-test: 2011-11-07 Pavel Tisnovsky <ptisnovs at redhat.com>
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Nov 7 00:59:22 PST 2011
changeset 697bfde838ac in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=697bfde838ac
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Nov 07 10:01:14 2011 +0100
2011-11-07 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/TexturePaint.java:
Added 15 new tests - two for checking rendering of circles
with texture and the rest for checking arc rendering.
diffstat:
ChangeLog | 6 +
src/org/gfxtest/testsuites/TexturePaint.java | 352 ++++++++++++++++++++++++++-
2 files changed, 347 insertions(+), 11 deletions(-)
diffs (459 lines):
diff -r cecd2cd40c8b -r 697bfde838ac ChangeLog
--- a/ChangeLog Fri Nov 04 15:45:43 2011 +0100
+++ b/ChangeLog Mon Nov 07 10:01:14 2011 +0100
@@ -1,3 +1,9 @@
+2011-11-07 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/TexturePaint.java:
+ Added 15 new tests - two for checking rendering of circles
+ with texture and the rest for checking arc rendering.
+
2011-11-04 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/framework/CommonRenderingStyles.java:
diff -r cecd2cd40c8b -r 697bfde838ac src/org/gfxtest/testsuites/TexturePaint.java
--- a/src/org/gfxtest/testsuites/TexturePaint.java Fri Nov 04 15:45:43 2011 +0100
+++ b/src/org/gfxtest/testsuites/TexturePaint.java Mon Nov 07 10:01:14 2011 +0100
@@ -223,6 +223,50 @@
* graphics context for image
* @return test result status - PASSED, FAILED or ERROR
*/
+ public TestResult testCircleTexturePaintUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics);
+ // draw the circle
+ CommonShapesRenderer.drawFilledCircle(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled circle drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this circle.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testCircleTexturePaintUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics);
+ // draw the circle
+ CommonShapesRenderer.drawFilledCircle(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled circle drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this circle.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
public TestResult testCircleTexturePaintUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics)
{
// set stroke color (it could not be used during the shape rendering)
@@ -359,7 +403,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -381,7 +425,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -403,7 +447,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -425,7 +469,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -447,7 +491,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingHorizontalStripesTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -469,7 +513,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -491,7 +535,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -513,7 +557,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set texture
CommonRenderingStyles.setTextureFillUsingColorDotsTexture(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -535,7 +579,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set fill color
CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -557,7 +601,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set fill color
CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -579,7 +623,7 @@
CommonRenderingStyles.setStrokeColor(graphics);
// set fill color
CommonRenderingStyles.setTextureFillUsingRGBTexture3(image, graphics);
- // draw the circle
+ // draw the filled rectangle
CommonShapesRenderer.drawFilledRectangle(image, graphics);
// test return value
return TestResult.PASSED;
@@ -605,6 +649,292 @@
}
/**
+ * Test if arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingCheckerTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingDiagonalCheckerTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingGridTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingDiagonalGridTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingHorizontalStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingHorizontalStripesTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingVerticalStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingDotTexture(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color (it could not be used during the shape rendering)
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set texture
+ CommonRenderingStyles.setTextureFillUsingColorDotsTexture(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingRGBTexture1(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingRGBTexture2(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Test if filled arc drawn by graphics.fillOval() is rendered correctly.
+ * Texture paint is used for filling this arc.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testArcTexturePaintUsingRGBTexture3(TestImage image, Graphics2D graphics)
+ {
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics);
+ // set fill color
+ CommonRenderingStyles.setTextureFillUsingRGBTexture3(image, graphics);
+ // draw the filled arc
+ CommonShapesRenderer.drawFilledArc(image, graphics);
+ // test return value
+ return TestResult.PASSED;
+ }
+
+ /**
* Test if rounded rectangle drawn by graphics.drawRoundRect() is rendered correctly.
*
* @param image
More information about the distro-pkg-dev
mailing list