From af71458eb625606ad4d6423bcabb5042bed13ed4 Mon Sep 17 00:00:00 2001 From: oakes Date: Sat, 3 May 2014 01:43:51 -0400 Subject: [PATCH] Improve texture docstring --- src/play_clj/g2d.clj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/play_clj/g2d.clj b/src/play_clj/g2d.clj index 720a502..07c8966 100644 --- a/src/play_clj/g2d.clj +++ b/src/play_clj/g2d.clj @@ -56,11 +56,19 @@ (defmacro texture "Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html). + ; load image.png (texture \"image.png\") + ; load image.png, flip it, and only display the specified region (texture \"image.png\" :flip true false :set-region 0 0 100 100) - (texture (texture \"image.png\"))" + ; create a new texture based on an existing one + (texture (texture \"image.png\")) + ; rotate a texture 45 degress counterclockwise around the bottom-left corner + (assoc (texture \"image.png\") + :angle 45 + :origin-x 0 + :origin-y 0)" [arg & options] `(let [entity# (texture* ~arg)] (u/calls! ^TextureRegion (u/get-obj entity# :object) ~@options)