Add pixmap-format and a new arity to pixmap*
This commit is contained in:
@@ -160,6 +160,7 @@
|
|||||||
"perspective!" :methods}
|
"perspective!" :methods}
|
||||||
"Pixmap" {"pixmap" :methods
|
"Pixmap" {"pixmap" :methods
|
||||||
"pixmap!" :methods}
|
"pixmap!" :methods}
|
||||||
|
"Pixmap.Format" {"pixmap-format" :static-fields}
|
||||||
"Plane" {"plane" :methods
|
"Plane" {"plane" :methods
|
||||||
"plane!" :methods}
|
"plane!" :methods}
|
||||||
"Plane.PlaneSide" {"plane-side" :static-fields}
|
"Plane.PlaneSide" {"plane-side" :static-fields}
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
(in-ns 'play-clj.core)
|
(in-ns 'play-clj.core)
|
||||||
|
|
||||||
|
(defmacro pixmap-format
|
||||||
|
"Returns a static field from [Pixmap.Format](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.Format.html).
|
||||||
|
|
||||||
|
(pixmap-format :alpha)"
|
||||||
|
[k]
|
||||||
|
(u/gdx-field :graphics "Pixmap$Format" (u/key->pascal k)))
|
||||||
|
|
||||||
(defn pixmap*
|
(defn pixmap*
|
||||||
[path]
|
([^String path]
|
||||||
(or (u/load-asset path Pixmap)
|
(or (u/load-asset path Pixmap)
|
||||||
(Pixmap. (files! :internal path))))
|
(Pixmap. (files! :internal path))))
|
||||||
|
([^long width ^long height ^Pixmap$Format fmt]
|
||||||
|
(Pixmap. width height fmt)))
|
||||||
|
|
||||||
(defmacro pixmap
|
(defmacro pixmap
|
||||||
"Returns a [Pixmap](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html).
|
"Returns a [Pixmap](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Pixmap.html).
|
||||||
|
|||||||
Reference in New Issue
Block a user