From e4a3c123298ad25bb8199bd1f9ff864b02e5285f Mon Sep 17 00:00:00 2001 From: oakes Date: Fri, 3 Jan 2014 02:31:28 -0500 Subject: [PATCH] Add image-width and image-height --- src/play_clj/core_2d.clj | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/play_clj/core_2d.clj b/src/play_clj/core_2d.clj index fe251e1..8f4d286 100644 --- a/src/play_clj/core_2d.clj +++ b/src/play_clj/core_2d.clj @@ -38,6 +38,18 @@ (-> ^String val Texture. TextureRegion.) (TextureRegion. ^TextureRegion val))) +(defn image-width + ([^TextureRegion img] + (.getRegionWidth img)) + ([^TextureRegion img val] + (.setRegionWidth img val))) + +(defn image-height + ([^TextureRegion img] + (.getRegionHeight img)) + ([^TextureRegion img val] + (.setRegionHeight img val))) + (defn split-image ([val size] (split-image val size size))