/hg/gfx-test: Added three new texture generators into CommonRend...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Wed Apr 24 01:36:25 PDT 2013
changeset aa69e4e77a1d in /hg/gfx-test
details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=aa69e4e77a1d
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Wed Apr 24 10:39:35 2013 +0200
Added three new texture generators into CommonRenderingStyles.
diffstat:
ChangeLog | 5 +
src/org/gfxtest/framework/CommonRenderingStyles.java | 54 ++++++++++++++++++++
2 files changed, 59 insertions(+), 0 deletions(-)
diffs (76 lines):
diff -r ac608f047fd8 -r aa69e4e77a1d ChangeLog
--- a/ChangeLog Mon Apr 22 10:17:28 2013 +0200
+++ b/ChangeLog Wed Apr 24 10:39:35 2013 +0200
@@ -1,3 +1,8 @@
+2013-04-24 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * src/org/gfxtest/framework/CommonRenderingStyles.java:
+ Added three new texture generators into CommonRenderingStyles.
+
2013-04-22 Pavel Tisnovsky <ptisnovs at redhat.com>
* src/org/gfxtest/framework/CommonBitmapOperations.java:
diff -r ac608f047fd8 -r aa69e4e77a1d src/org/gfxtest/framework/CommonRenderingStyles.java
--- a/src/org/gfxtest/framework/CommonRenderingStyles.java Mon Apr 22 10:17:28 2013 +0200
+++ b/src/org/gfxtest/framework/CommonRenderingStyles.java Wed Apr 24 10:39:35 2013 +0200
@@ -1258,6 +1258,60 @@
}
/**
+ * Set texture paint using RGB texture.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ */
+ public static void setTextureFillUsingRGBTexture4(TestImage image, Graphics2D graphics)
+ {
+ // compute anchor for a texture
+ Rectangle2D anchor = createAnchorRectangle(image);
+
+ // create texture and paint object
+ TexturePaint texturePaint = ProceduralTextureFactory.getRGBTexture4Paint(image, anchor);
+ graphics.setPaint(texturePaint);
+ }
+
+ /**
+ * Set texture paint using RGB texture.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ */
+ public static void setTextureFillUsingRGBTexture5(TestImage image, Graphics2D graphics)
+ {
+ // compute anchor for a texture
+ Rectangle2D anchor = createAnchorRectangle(image);
+
+ // create texture and paint object
+ TexturePaint texturePaint = ProceduralTextureFactory.getRGBTexture5Paint(image, anchor);
+ graphics.setPaint(texturePaint);
+ }
+
+ /**
+ * Set texture paint using RGB texture.
+ *
+ * @param image
+ * image to which two dimensional shape is to be rendered
+ * @param graphics
+ * graphics context for image
+ */
+ public static void setTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics)
+ {
+ // compute anchor for a texture
+ Rectangle2D anchor = createAnchorRectangle(image);
+
+ // create texture and paint object
+ TexturePaint texturePaint = ProceduralTextureFactory.getRGBTexture6Paint(image, anchor);
+ graphics.setPaint(texturePaint);
+ }
+
+ /**
* Set zero pixels wide stroke and default cap and join style.
*
* @param graphics
More information about the distro-pkg-dev
mailing list