view src/org/gfxtest/testsuites/ClippingPathByEllipseShape.java @ 764:8761683bd1c7 draft

Removed unused imports.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Mon, 05 Oct 2015 11:08:52 +0200
parents b6ab20d99bbc
children
line wrap: on
line source

/*
  Java gfx-test framework

   Copyright (C) 2010, 2011, 2012  Red Hat

This file is part of IcedTea.

IcedTea is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

IcedTea is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with IcedTea; see the file COPYING.  If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library.  Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module.  An independent module is a module which is not derived from
or based on this library.  If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so.  If you do not wish to do so, delete this
exception statement from your version.
 */

package org.gfxtest.testsuites;

import java.awt.Graphics2D;



import org.gfxtest.framework.CommonClippingOperations;
import org.gfxtest.framework.CommonPathsGenerator;
import org.gfxtest.framework.CommonRenderingStyles;
import org.gfxtest.framework.GfxTest;
import org.gfxtest.framework.TestImage;
import org.gfxtest.framework.TestResult;
import org.gfxtest.framework.annotations.GraphicsPrimitive;
import org.gfxtest.framework.annotations.GraphicsPrimitives;
import org.gfxtest.framework.annotations.TestType;
import org.gfxtest.framework.annotations.TestTypes;
import org.gfxtest.framework.annotations.Transformation;
import org.gfxtest.framework.annotations.Transformations;
import org.gfxtest.framework.annotations.Zoom;



/**
 * This test check if clipping is working correctly for a path which is clipped
 * by an ellipse shape. Various path and various rendering styles are used for
 * rendering.
 * 
 * @author Pavel Tisnovsky
 */
@TestType(TestTypes.RENDER_TEST)
@Transformation(Transformations.NONE)
@GraphicsPrimitive(GraphicsPrimitives.PATH)
@Zoom(1)
public class ClippingPathByEllipseShape extends GfxTest
{
    private static final float[] DOTTED_PATTERN = new float[] {1,40};

    /**
     * Prepare canvas for the rendering.
     *
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void basicSetupForRendering(TestImage image, Graphics2D graphics2d)
    {
        // create clip area
        CommonClippingOperations.createClipUsingEllipseShape(image, graphics2d);
    }

    /**
     * Draw path consisting of one line only clipped by an ellipse shape.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawLinePathFloatClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the line path
        graphics2d.draw(CommonPathsGenerator.createLinePathFloat(image));
    }

    /**
     * Draw path consisting of one line only clipped by an ellipse shape.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawLinePathDoubleClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the line path
        graphics2d.draw(CommonPathsGenerator.createLinePathDouble(image));
    }

    /**
     * Draw quadratic path clipped by an ellipse shape.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawQuadraticPathClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the quadratic path
        graphics2d.draw(CommonPathsGenerator.createQuadraticPathFloat(image));
    }

    /**
     * Draw cubic path clipped by an ellipse shape.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawCubicPathClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the cubic path
        graphics2d.draw(CommonPathsGenerator.createCubicPathFloat(image));
    }

    /**
     * Draw closed path clipped by an ellipse shape.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawClosedPathClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the closed path
        graphics2d.draw(CommonPathsGenerator.createClosedPathFloat(image));
    }

    /**
     * Draw crossed path clipped by an ellipse shape.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawCrossedPathClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the crossed path
        graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathFloat(image));
    }

    /**
     * Draw crossed path containing quadratic segment clipped by an ellipse shape.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawCrossedPathContainingQuadraticSegmentClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the crossed path
        graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathContainingQuadraticSegmentFloat(image));
    }

    /**
     * Draw crossed path containing quadratic segment clipped by an ellipse shape.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     */
    private static void drawCrossedPathContainingCubicSegmentClippedByEllipseShape(TestImage image, Graphics2D graphics2d)
    {
        // prepare canvas for the rendering
        basicSetupForRendering(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // draw the crossed path
        graphics2d.draw(CommonPathsGenerator.createCrossedClosedPathContainingCubicSegmentFloat(image));
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is rendered
     * using stroke paint with default stroke width.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathFloatByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawLinePathFloatClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is rendered
     * using stroke paint with default stroke width.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathDoubleByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawLinePathDoubleClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if quadratic Bezier path could be clipped by an ellipse shape. 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 testClipQuadraticPathByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawQuadraticPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if cubic Bezier path could be clipped by an ellipse shape. 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 testClipCubicPathByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawCubicPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed path could be clipped by an ellipse shape. 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 testClipClosedPathByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawClosedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if crossed closed path could be clipped by an ellipse shape. 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 testClipCrossedClosedPathByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawCrossedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if crossed closed path could be clipped by an ellipse shape. 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 testClipCrossedClosedPathContainingQuadraticSegmentByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawCrossedPathContainingQuadraticSegmentClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if crossed closed path could be clipped by an ellipse shape. 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 testClipCrossedClosedPathContainingCubicSegmentByEllipseShapeStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set clip region and draw the path
        drawCrossedPathContainingCubicSegmentClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with zero stroke width.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathFloatByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
        // set clip region and draw the path
        drawLinePathFloatClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with zero stroke width.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathDoubleByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
        // set clip region and draw the path
        drawLinePathDoubleClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if quadratic path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with zero stroke width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipQuadraticPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
        // set clip region and draw the path
        drawQuadraticPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if cubic path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with zero stroke width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipCubicPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
        // set clip region and draw the path
        drawCubicPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with zero stroke width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipClosedPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
        // set clip region and draw the path
        drawClosedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if crossed closed path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with zero stroke width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipCrossedClosedPathByEllipseShapeZeroStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeZeroThick(graphics2d);
        // set clip region and draw the path
        drawCrossedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is rendered
     * using stroke paint with thick stroke width.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLineFloatPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set clip region and draw the path
        drawLinePathFloatClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is rendered
     * using stroke paint with thick stroke width.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLineDoublePathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set clip region and draw the path
        drawLinePathDoubleClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if quadratic Bezier path could be clipped by an ellipse shape. 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 testClipQuadraticPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set clip region and draw the path
        drawQuadraticPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if cubic Bezier path could be clipped by an ellipse shape. 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 testClipCubicPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set clip region and draw the path
        drawCubicPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed path could be clipped by an ellipse shape. 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 testClipClosedPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set clip region and draw the path
        drawClosedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if crossed closed path could be clipped by an ellipse shape. 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 testClipCrossedClosedPathByEllipseShapeThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set clip region and draw the path
        drawCrossedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is rendered
     * using stroke paint with extra thick width.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathFloatByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
        // set clip region and draw the path
        drawLinePathFloatClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is rendered
     * using stroke paint with extra thick width.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathDoubleByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
        // set clip region and draw the path
        drawLinePathDoubleClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if quadratic Bezier path could be clipped by an ellipse shape. Path
     * is rendered using stroke paint with extra thick width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipQuadraticPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
        // set clip region and draw the path
        drawQuadraticPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if cubic Bezier path could be clipped by an ellipse shape. Path
     * is rendered using stroke paint with extra thick width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipCubicPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
        // set clip region and draw the path
        drawCubicPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed path could be clipped by an ellipse shape. Path
     * is rendered using stroke paint with extra thick width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipClosedPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
        // set clip region and draw the path
        drawClosedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if crossed closed path could be clipped by an ellipse shape. Path
     * is rendered using stroke paint with extra thick width.
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipCrossedClosedPathByEllipseShapeExtraThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render ellipse which is used as a clip shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke color
        CommonRenderingStyles.setStrokeColor(graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
        // set clip region and draw the path
        drawCrossedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with default stroke width.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathFloatByEllipseShapeDashedStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawLinePathFloatClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with default stroke width.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathDoubleByEllipseShapeDashedStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawLinePathDoubleClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if cubic path could be clipped by an ellipse shape. 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 testClipCubicPathByEllipseShapeDashedStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawCubicPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if quadratic path could be clipped by an ellipse shape. 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 testClipQuadraticPathByEllipseShapeDashedStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawQuadraticPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed crossed path could be clipped by an ellipse shape. 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 testClipCrossedClosedPathByEllipseShapeDashedStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawCrossedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed path could be clipped by an ellipse shape. 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 testClipClosedPathByEllipseShapeDashedStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawClosedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with thick stroke width.
     * Line path is constructed using new Path.Float()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathFloatByEllipseShapeDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawLinePathFloatClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if line path could be clipped by an ellipse shape. Path is
     * rendered using stroke paint with thick stroke width.
     * Line path is constructed using new Path.Double()
     * 
     * @param image
     *            work image
     * @param graphics2d
     *            graphics canvas
     * @return test result status - PASSED, FAILED or ERROR
     */
    public TestResult testClipLinePathDoubleByEllipseShapeDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawLinePathDoubleClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if cubic path could be clipped by an ellipse shape. 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 testClipCubicPathByEllipseShapeDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawCubicPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if quadratic path could be clipped by an ellipse shape. 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 testClipQuadraticPathByEllipseShapeDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawQuadraticPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed crossed path could be clipped by an ellipse shape. 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 testClipCrossedClosedPathByEllipseShapeDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse shape
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawCrossedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Check if closed path could be clipped by an ellipse shape. 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 testClipClosedPathByEllipseShapeDashedThickStrokePaint(TestImage image, Graphics2D graphics2d)
    {
        // render clip ellipse
        CommonClippingOperations.renderClipEllipse(image, graphics2d);
        // set stroke width
        CommonRenderingStyles.setStrokeThickWidth(graphics2d);
        // set dashed pattern
        CommonRenderingStyles.setDashedStrokePattern(graphics2d);
        // set clip region and draw the path
        drawClosedPathClippedByEllipseShape(image, graphics2d);
        // test result
        return TestResult.PASSED;
    }

    /**
     * Entry point to the test suite.
     * 
     * @param args
     *            graphics test configuration
     */
    public static void main(String[] args)
    {
        new ClippingPathByEllipseShape().runTestSuite(args);
    }
}