/hg/gfx-test: Added new tests - drawing quadratic curves using e...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Aug 4 02:59:39 PDT 2011


changeset 98d8ac4bd4cb in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=98d8ac4bd4cb
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Aug 04 12:01:15 2011 +0200

	Added new tests - drawing quadratic curves using extra width stroke.


diffstat:

 ChangeLog                                             |   5 +
 src/org/gfxtest/testsuites/NormalQuadraticCurves.java |  71 ++++++++++++++++++-
 2 files changed, 75 insertions(+), 1 deletions(-)

diffs (100 lines):

diff -r 41fa7137721d -r 98d8ac4bd4cb ChangeLog
--- a/ChangeLog	Wed Aug 03 18:07:00 2011 +0200
+++ b/ChangeLog	Thu Aug 04 12:01:15 2011 +0200
@@ -1,3 +1,8 @@
+2011-08-04  Pavel Tisnovsky  <ptisnovs at redhat.com>
+	* diff.diff: removed as it's just a garbage.
+	* src/org/gfxtest/testsuites/NormalQuadraticCurves.java:
+	Added new tests - drawing curves using extra width stroke.
+
 2011-08-03  Pavel Tisnovsky  <ptisnovs at redhat.com>
 	* diff.diff: removed as it's just a garbage.
 	* src/org/gfxtest/testsuites/NormalQuadraticCurves.java:
diff -r 41fa7137721d -r 98d8ac4bd4cb src/org/gfxtest/testsuites/NormalQuadraticCurves.java
--- a/src/org/gfxtest/testsuites/NormalQuadraticCurves.java	Wed Aug 03 18:07:00 2011 +0200
+++ b/src/org/gfxtest/testsuites/NormalQuadraticCurves.java	Thu Aug 04 12:01:15 2011 +0200
@@ -234,7 +234,7 @@
 
     /**
      * Test if quadratic curve created by QuadCurve2D.Float() is rendered
-     * correctly. Curve is to be drawn with 10 pixels wide stroke and default
+     * correctly. Curve is to be drawn with 30 pixels wide stroke and default
      * caps.
      * 
      * @param image
@@ -326,6 +326,75 @@
 
     /**
      * Test if quadratic curve created by QuadCurve2D.Float() is rendered
+     * correctly. Curve is to be drawn with 30 pixels wide stroke and default
+     * CAP_BUTT.
+     * 
+     * @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 testExtraThickStrokeCapsButt(TestImage image, Graphics2D graphics)
+    {
+        // set 30 pixels wide stroke and CAP_BUTT
+        graphics.setStroke(new BasicStroke(STROKE_WIDTH_EXTRA_THICK, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));
+
+        // create new QuadCurve2D.Float
+        QuadCurve2D quadCurve = new QuadCurve2D.Float();
+
+        // draw quadratic curve
+        return drawQuadraticCurve(image, graphics, quadCurve);
+    }
+
+    /**
+     * Test if quadratic curve created by QuadCurve2D.Float() is rendered
+     * correctly. Curve is to be drawn with 30 pixels wide stroke and default
+     * CAP_ROUND.
+     * 
+     * @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 testExtraThickStrokeCapsRound(TestImage image, Graphics2D graphics)
+    {
+        // set 30 pixels wide stroke and CAP_ROUND
+        graphics.setStroke(new BasicStroke(STROKE_WIDTH_EXTRA_THICK, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
+
+        // create new QuadCurve2D.Float
+        QuadCurve2D quadCurve = new QuadCurve2D.Float();
+
+        // draw quadratic curve
+        return drawQuadraticCurve(image, graphics, quadCurve);
+    }
+
+    /**
+     * Test if quadratic curve created by QuadCurve2D.Float() is rendered
+     * correctly. Curve is to be drawn with 30 pixels wide stroke and default
+     * CAP_SQUARE.
+     * 
+     * @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 testExtraThickStrokeCapsSquare(TestImage image, Graphics2D graphics)
+    {
+        // set 30 pixels wide stroke and CAP_SQUARE
+        graphics.setStroke(new BasicStroke(STROKE_WIDTH_EXTRA_THICK, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL));
+
+        // create new QuadCurve2D.Float
+        QuadCurve2D quadCurve = new QuadCurve2D.Float();
+
+        // draw quadratic curve
+        return drawQuadraticCurve(image, graphics, quadCurve);
+    }
+
+    /**
+     * Test if quadratic curve created by QuadCurve2D.Float() is rendered
      * correctly. Curve is drawn using different colors.
      * 
      * @param image



More information about the distro-pkg-dev mailing list