/hg/gfx-test: Added fourteen new test cases to the test Clipping...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Fri Feb 24 08:04:34 PST 2012
changeset f05b4d988289 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=f05b4d988289
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Feb 24 17:06:23 2012 +0100
Added fourteen new test cases to the test
ClippingCircleByRectangleShape.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/testsuites/ClippingCircleByRectangleShape.java | 333 +++++++++-
2 files changed, 325 insertions(+), 13 deletions(-)
diffs (435 lines):
diff -r eb50c2a4fceb -r f05b4d988289 ChangeLog
--- a/ChangeLog Fri Feb 24 12:32:37 2012 +0100
+++ b/ChangeLog Fri Feb 24 17:06:23 2012 +0100
@@ -1,3 +1,8 @@
+2012-02-24 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/ClippingCircleByRectangleShape.java:
+ Added fourteen new test cases.
+
2012-02-24 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/ClippingCircleByEllipseShape.java:
diff -r eb50c2a4fceb -r f05b4d988289 src/org/gfxtest/testsuites/ClippingCircleByRectangleShape.java
--- a/src/org/gfxtest/testsuites/ClippingCircleByRectangleShape.java Fri Feb 24 12:32:37 2012 +0100
+++ b/src/org/gfxtest/testsuites/ClippingCircleByRectangleShape.java Fri Feb 24 17:06:23 2012 +0100
@@ -156,7 +156,7 @@
*/
private void drawCircleClippedByRectangleAlphaPaintGreen(TestImage image, Graphics2D graphics2d, int transparency)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set stroke color
CommonRenderingStyles.setStrokeColor(graphics2d);
@@ -181,7 +181,7 @@
*/
private void drawCircleClippedByRectangleAlphaPaintBlue(TestImage image, Graphics2D graphics2d, int transparency)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set stroke color
CommonRenderingStyles.setStrokeColor(graphics2d);
@@ -205,7 +205,7 @@
*/
public TestResult testClipCircleByRectangleShapeStrokePaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set clip region and draw the circle
drawEmptyCircleClippedByRectangleShape(image, graphics2d);
@@ -225,7 +225,7 @@
*/
public TestResult testClipCircleByRectangleShapeWideStrokePaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set stroke width
CommonRenderingStyles.setStrokeThickWidth(graphics2d);
@@ -247,7 +247,7 @@
*/
public TestResult testClipCircleByRectangleShapeExtraWideStrokePaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set stroke width
CommonRenderingStyles.setStrokeExtraThickWidth(graphics2d);
@@ -259,6 +259,28 @@
/**
* Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using zero wide stroke paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeZeroWideStrokePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set stroke width
+ CommonRenderingStyles.setStrokeZeroThick(graphics2d);
+ // set clip region and draw the circle
+ drawEmptyCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
* rendered using color paint.
*
* @param image
@@ -269,7 +291,7 @@
*/
public TestResult testClipCircleByRectangleShapeColorPaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set stroke color
CommonRenderingStyles.setStrokeColor(graphics2d);
@@ -578,9 +600,9 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipCircleByRectangleAreaHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipCircleByRectangleShapeHorizontalGradientPaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set horizontal gradient paint
CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d);
@@ -600,9 +622,9 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipCircleByRectangleAreaVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipCircleByRectangleShapeVerticalGradientPaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set vertical gradient paint
CommonRenderingStyles.setVerticalGradientFill(image, graphics2d);
@@ -622,9 +644,9 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipCircleByRectangleAreaDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipCircleByRectangleShapeDiagonalGradientPaint(TestImage image, Graphics2D graphics2d)
{
- // render clip rectangle
+ // render clip rectangle which is used as a base for clip shape
CommonClippingOperations.renderClipRectangle(image, graphics2d);
// set diagonal gradient paint
CommonRenderingStyles.setDiagonalGradientFill(image, graphics2d);
@@ -644,7 +666,7 @@
* graphics canvas
* @return test result status - PASSED, FAILED or ERROR
*/
- public TestResult testClipCircleByRectangleAreaRadialGradientPaint(TestImage image, Graphics2D graphics2d)
+ public TestResult testClipCircleByRectangleShapeRadialGradientPaint(TestImage image, Graphics2D graphics2d)
{
// render clip rectangle
CommonClippingOperations.renderClipRectangle(image, graphics2d);
@@ -657,6 +679,291 @@
}
/**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeCheckerTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingCheckerTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeDiagonalCheckerTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingDiagonalCheckerTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeGridTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeDiagonalGridTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeColorDotsTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingColorDotsTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeHorizontalStripesTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingHorizontalStripesTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeVerticalStripesTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeDiagonalStripesTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeHorizontalColorStripesTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeVerticalColorStripesTexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeRGB1TexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeRGB2TexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+
+ /**
+ * Check if circle shape could be clipped by a rectangle shape. Circle is
+ * rendered using texture paint.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @return test result status - PASSED, FAILED or ERROR
+ */
+ public TestResult testClipCircleByRectangleShapeRGB3TexturePaint(TestImage image, Graphics2D graphics2d)
+ {
+ // render clip rectangle which is used as a base for clip shape
+ CommonClippingOperations.renderClipRectangle(image, graphics2d);
+ // set the texture
+ CommonRenderingStyles.setTextureFillUsingRGBTexture3(image, graphics2d);
+ // set clip region and render filled circle
+ drawFilledCircleClippedByRectangleShape(image, graphics2d);
+ // test result
+ return TestResult.PASSED;
+ }
+ /**
* Entry point to the test suite.
*
* @param args
More information about the distro-pkg-dev
mailing list