/hg/gfx-test: 2011-11-28 Pavel Tisnovsky <ptisnovs at redhat.com>

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Mon Nov 28 01:32:15 PST 2011


changeset 7b3a6a308d48 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=7b3a6a308d48
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Nov 28 10:34:25 2011 +0100

	2011-11-28 Pavel Tisnovsky <ptisnovs at redhat.com>

	 * src/org/gfxtest/framework/GfxTest.java: Changed
	method visibility in GfxTest API.
	        *  src/org/gfxtest/testsuites/ClippingCircleByRectangleArea.java:
	Added 15 new rendering tests.


diffstat:

 ChangeLog                                                     |    7 +
 src/org/gfxtest/framework/GfxTest.java                        |    2 +-
 src/org/gfxtest/testsuites/ClippingCircleByRectangleArea.java |  345 ++++++++++
 3 files changed, 353 insertions(+), 1 deletions(-)

diffs (388 lines):

diff -r 15cc4f8f742a -r 7b3a6a308d48 ChangeLog
--- a/ChangeLog	Wed Nov 23 13:19:16 2011 +0100
+++ b/ChangeLog	Mon Nov 28 10:34:25 2011 +0100
@@ -1,3 +1,10 @@
+2011-11-28  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	*  src/org/gfxtest/framework/GfxTest.java:
+	Changed method visibility in GfxTest API.
+	*  src/org/gfxtest/testsuites/ClippingCircleByRectangleArea.java:
+	Added 15 new rendering tests.
+
 2011-11-23  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/org/gfxtest/testsuites/ClippingCircleByRectangleShape.java:
diff -r 15cc4f8f742a -r 7b3a6a308d48 src/org/gfxtest/framework/GfxTest.java
--- a/src/org/gfxtest/framework/GfxTest.java	Wed Nov 23 13:19:16 2011 +0100
+++ b/src/org/gfxtest/framework/GfxTest.java	Mon Nov 28 10:34:25 2011 +0100
@@ -490,7 +490,7 @@
      *
      * @return actual zoom value
      */
-    private int getZoom()
+    protected int getZoom()
     {
         Zoom zoom = this.getClass().getAnnotation(Zoom.class);
         return zoom == null ? 1 : zoom.value();
diff -r 15cc4f8f742a -r 7b3a6a308d48 src/org/gfxtest/testsuites/ClippingCircleByRectangleArea.java
--- a/src/org/gfxtest/testsuites/ClippingCircleByRectangleArea.java	Wed Nov 23 13:19:16 2011 +0100
+++ b/src/org/gfxtest/testsuites/ClippingCircleByRectangleArea.java	Mon Nov 28 10:34:25 2011 +0100
@@ -119,6 +119,81 @@
     }
 
     /**
+    * Draw circle clipped by a rectangle area. Circle is drawn using alpha paint with
+     * red color and selected transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @param transparency
+     *            selected transparency (0..100 percent)
+     */
+    private void drawCircleClippedByRectangleAreaAlphaPaintRed(TestImage image, Graphics2D graphics2d, int transparency)
+    {
+        // render clip rectangle
+        CommonClippingOperations.renderClipRectangle(image, graphics2d);
+        // set stroke color
+        CommonRenderingStyles.setStrokeColor(graphics2d);
+        // set fill color
+        CommonRenderingStyles.setTransparentFillRedColor(graphics2d, transparency);
+        // create clip area
+        CommonClippingOperations.createClipUsingRectangleArea(image, graphics2d);
+        // fill the shape
+        CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+    }
+
+    /**
+     * Draw circle clipped by a rectangle area. Circle is drawn using alpha paint with
+      * green color and selected transparency.
+      * 
+      * @param image
+      *            work image
+      * @param graphics2d
+      *            graphics canvas
+      * @param transparency
+      *            selected transparency (0..100 percent)
+      */
+     private void drawCircleClippedByRectangleAreaAlphaPaintGreen(TestImage image, Graphics2D graphics2d, int transparency)
+     {
+         // render clip rectangle
+         CommonClippingOperations.renderClipRectangle(image, graphics2d);
+         // set stroke color
+         CommonRenderingStyles.setStrokeColor(graphics2d);
+         // set fill color
+         CommonRenderingStyles.setTransparentFillGreenColor(graphics2d, transparency);
+         // create clip area
+         CommonClippingOperations.createClipUsingRectangleArea(image, graphics2d);
+         // fill the shape
+         CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+     }
+
+     /**
+      * Draw circle clipped by a rectangle area. Circle is drawn using alpha paint with
+       * blue color and selected transparency.
+       * 
+       * @param image
+       *            work image
+       * @param graphics2d
+       *            graphics canvas
+       * @param transparency
+       *            selected transparency (0..100 percent)
+       */
+      private void drawCircleClippedByRectangleAreaAlphaPaintBlue(TestImage image, Graphics2D graphics2d, int transparency)
+      {
+          // render clip rectangle
+          CommonClippingOperations.renderClipRectangle(image, graphics2d);
+          // set stroke color
+          CommonRenderingStyles.setStrokeColor(graphics2d);
+          // set fill color
+          CommonRenderingStyles.setTransparentFillBlueColor(graphics2d, transparency);
+          // create clip area
+          CommonClippingOperations.createClipUsingRectangleArea(image, graphics2d);
+          // fill the shape
+          CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+      }
+
+    /**
      * Check if circle shape could be clipped by a rectangle area. Circle is
      * rendered using stroke paint.
      * 
@@ -209,6 +284,276 @@
     }
 
     /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with red color at 0% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintRed000(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 0% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintRed(image, graphics2d, 0);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with red color at 25% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintRed025(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 25% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintRed(image, graphics2d, 25);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with red color at 50% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintRed050(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 50% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintRed(image, graphics2d, 50);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with red color at 75% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintRed075(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 75% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintRed(image, graphics2d, 75);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with red color at 100% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintRed100(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 100% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintRed(image, graphics2d, 100);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with green color at 0% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintGreen000(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 0% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintGreen(image, graphics2d, 0);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with green color at 25% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintGreen025(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 25% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintGreen(image, graphics2d, 25);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with green color at 50% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintGreen050(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 50% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintGreen(image, graphics2d, 50);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with green color at 75% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintGreen075(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 75% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintGreen(image, graphics2d, 75);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with green color at 100% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintGreen100(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 100% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintGreen(image, graphics2d, 100);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with blue color at 0% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintBlue000(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 0% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintBlue(image, graphics2d, 0);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with blue color at 25% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintBlue025(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 25% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintBlue(image, graphics2d, 25);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with blue color at 50% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintBlue050(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 50% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintBlue(image, graphics2d, 50);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with blue color at 75% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintBlue075(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 75% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintBlue(image, graphics2d, 75);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
+     * Check if circle shape could be clipped by a rectangular area. Circle is
+     * rendered using alpha paint with blue color at 100% transparency.
+     * 
+     * @param image
+     *            work image
+     * @param graphics2d
+     *            graphics canvas
+     * @return test result status - PASSED, FAILED or ERROR
+     */
+    public TestResult testClipCircleByRectangleShapeAlphaPaintBlue100(TestImage image, Graphics2D graphics2d)
+    {
+        // draw circle clipped by rectangle area using alpha paint with 100% transparency
+        drawCircleClippedByRectangleAreaAlphaPaintBlue(image, graphics2d, 100);
+        // test result
+        return TestResult.PASSED;
+    }
+
+    /**
      * Check if circle shape could be clipped by a rectangle area. Circle is
      * rendered using horizontal gradient paint.
      * 



More information about the distro-pkg-dev mailing list