/hg/gfx-test: Added five helper methods into ClippingCircleByCon...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Mon Apr 29 01:10:18 PDT 2013
changeset 9051b1fb2fa2 in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=9051b1fb2fa2
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Mon Apr 29 10:13:34 2013 +0200
Added five helper methods into ClippingCircleByConvexPolygonalShape
test suite.
diffstat:
ChangeLog | 6 +
src/org/gfxtest/testsuites/ClippingCircleByConvexPolygonalShape.java | 125 ++++++++++
2 files changed, 131 insertions(+), 0 deletions(-)
diffs (155 lines):
diff -r 8e663e0cfd11 -r 9051b1fb2fa2 ChangeLog
--- a/ChangeLog Fri Apr 26 09:34:20 2013 +0200
+++ b/ChangeLog Mon Apr 29 10:13:34 2013 +0200
@@ -1,3 +1,9 @@
+2013-04-29 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/testsuites/ClippingCircleByConvexPolygonalShape.java:
+ Added five helper methods into ClippingCircleByConvexPolygonalShape
+ test suite.
+
2013-04-26 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/testsuites/BitBltConvolveOp.java:
diff -r 8e663e0cfd11 -r 9051b1fb2fa2 src/org/gfxtest/testsuites/ClippingCircleByConvexPolygonalShape.java
--- a/src/org/gfxtest/testsuites/ClippingCircleByConvexPolygonalShape.java Fri Apr 26 09:34:20 2013 +0200
+++ b/src/org/gfxtest/testsuites/ClippingCircleByConvexPolygonalShape.java Mon Apr 29 10:13:34 2013 +0200
@@ -120,6 +120,31 @@
/**
* Draw circle clipped by a convex polygonal shape. Circle is drawn using alpha
+ * paint with black color and selected transparency.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @param transparency
+ * selected transparency (0..100 percent)
+ */
+ private void drawCircleClippedByPolygonalShapeAlphaPaintBlack(TestImage image, Graphics2D graphics2d, int transparency)
+ {
+ // render clip polygon
+ CommonClippingOperations.renderConvexClipPolygon(image, graphics2d);
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTransparentFillBlackColor(graphics2d, transparency);
+ // create clip area
+ CommonClippingOperations.createClipUsingConvexPolygonalShape(image, graphics2d);
+ // fill the shape
+ CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+ }
+
+ /**
+ * Draw circle clipped by a convex polygonal shape. Circle is drawn using alpha
* paint with red color and selected transparency.
*
* @param image
@@ -194,6 +219,106 @@
}
/**
+ * Draw circle clipped by a convex polygonal shape. Circle is drawn using alpha
+ * paint with magenta color and selected transparency.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @param transparency
+ * selected transparency (0..100 percent)
+ */
+ private void drawCircleClippedByPolygonalShapeAlphaPaintMagenta(TestImage image, Graphics2D graphics2d, int transparency)
+ {
+ // render clip polygon
+ CommonClippingOperations.renderConvexClipPolygon(image, graphics2d);
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTransparentFillMagentaColor(graphics2d, transparency);
+ // create clip area
+ CommonClippingOperations.createClipUsingConvexPolygonalShape(image, graphics2d);
+ // fill the shape
+ CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+ }
+
+ /**
+ * Draw circle clipped by a convex polygonal shape. Circle is drawn using alpha
+ * paint with cyan color and selected transparency.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @param transparency
+ * selected transparency (0..100 percent)
+ */
+ private void drawCircleClippedByPolygonalShapeAlphaPaintCyan(TestImage image, Graphics2D graphics2d, int transparency)
+ {
+ // render clip polygon
+ CommonClippingOperations.renderConvexClipPolygon(image, graphics2d);
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTransparentFillCyanColor(graphics2d, transparency);
+ // create clip area
+ CommonClippingOperations.createClipUsingConvexPolygonalShape(image, graphics2d);
+ // fill the shape
+ CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+ }
+
+ /**
+ * Draw circle clipped by a convex polygonal shape. Circle is drawn using alpha
+ * paint with yellow color and selected transparency.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @param transparency
+ * selected transparency (0..100 percent)
+ */
+ private void drawCircleClippedByPolygonalShapeAlphaPaintYellow(TestImage image, Graphics2D graphics2d, int transparency)
+ {
+ // render clip polygon
+ CommonClippingOperations.renderConvexClipPolygon(image, graphics2d);
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTransparentFillYellowColor(graphics2d, transparency);
+ // create clip area
+ CommonClippingOperations.createClipUsingConvexPolygonalShape(image, graphics2d);
+ // fill the shape
+ CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+ }
+
+ /**
+ * Draw circle clipped by a convex polygonal shape. Circle is drawn using alpha
+ * paint with white color and selected transparency.
+ *
+ * @param image
+ * work image
+ * @param graphics2d
+ * graphics canvas
+ * @param transparency
+ * selected transparency (0..100 percent)
+ */
+ private void drawCircleClippedByPolygonalShapeAlphaPaintWhite(TestImage image, Graphics2D graphics2d, int transparency)
+ {
+ // render clip polygon
+ CommonClippingOperations.renderConvexClipPolygon(image, graphics2d);
+ // set stroke color
+ CommonRenderingStyles.setStrokeColor(graphics2d);
+ // set fill color
+ CommonRenderingStyles.setTransparentFillWhiteColor(graphics2d, transparency);
+ // create clip area
+ CommonClippingOperations.createClipUsingConvexPolygonalShape(image, graphics2d);
+ // fill the shape
+ CommonShapesRenderer.drawFilledCircle(image, graphics2d);
+ }
+
+ /**
* Check if circle shape could be clipped by a convex polygonal shape. Circle is
* rendered using stroke paint.
*
More information about the distro-pkg-dev
mailing list