Add type hints

This commit is contained in:
oakes
2014-04-08 16:35:39 -04:00
parent 08a9eb9ff3
commit 32e24c8a33
2 changed files with 5 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ memory.
(pixmap! object :dispose)"
[object k & options]
`(u/call! ^Pixmap ~object ~k ~@options))
`(let [^Pixmap object# ~object]
(u/call! object# ~k ~@options)))
(defmacro shape-type
"Returns a static field from [ShapeRenderer.ShapeType](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/ShapeRenderer.ShapeType.html).

View File

@@ -24,10 +24,12 @@
(-> ^String arg Texture. TextureRegion.)
(isa? (type arg) Pixmap)
(-> ^Pixmap arg Texture. TextureRegion.)
(isa? (type arg) TextureRegion)
arg
(:object arg)
(TextureRegion. ^TextureRegion (:object arg))
:else
arg)))
(TextureRegion. arg))))
(defmacro texture
"Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html).