gdx.graphics
->color
(->color r g b)
(->color r g b a)
->texture-region
(->texture-region path-or-texture)
(->texture-region texture-region [x y w h])
def-markup-color
(def-markup-color name-str color)
A general purpose class containing named colors that can be changed at will. For example, the markup language defined by the BitmapFontCache class uses this class to retrieve colors and the user can define his own colors.
javadoc
draw-arc
(draw-arc center radius start-angle degree color)
draw-centered-image
(draw-centered-image image position)
draw-circle
(draw-circle position radius color)
draw-ellipse
(draw-ellipse position radius-x radius-y color)
draw-filled-circle
(draw-filled-circle position radius color)
draw-filled-ellipse
(draw-filled-ellipse position radius-x radius-y color)
draw-filled-rectangle
(draw-filled-rectangle x y w h color)
draw-grid
(draw-grid leftx bottomy gridw gridh cellw cellh color)
draw-image
(draw-image {:keys [texture-region color], :as image} position)
draw-line
(draw-line start end color)
draw-rectangle
(draw-rectangle x y w h color)
draw-rotated-centered-image
(draw-rotated-centered-image {:keys [texture-region color], :as image} rotation [x y])
draw-sector
(draw-sector center radius start-angle degree color)
draw-text
(draw-text {:keys [x y text font h-align up? scale], :as opts})
font, h-align, up? and scale are optional. h-align one of: :center, :left, :right. Default :center. up? renders the font over y, otherwise under. scale will multiply the drawn text size with the scale.
draw-tiled-map
(draw-tiled-map tiled-map color-setter)
Renders tiled-map using world-view at world-camera position and with world-unit-scale.
Color-setter is a (fn [color x y])
which is called for every tile-corner to set the color.
Can be used for lights & shadows.
Renders only visible layers.
edn->image
(edn->image {:keys [file sub-image-bounds]})
frames-per-second
(frames-per-second)
gui-mouse-position
(gui-mouse-position)
gui-viewport-height
(gui-viewport-height)
gui-viewport-width
(gui-viewport-width)
load!
(load! {:keys [views default-font cursors]})
pixels->world-units
(pixels->world-units pixels)
render-gui-view!
(render-gui-view! render-fn)
render-world-view!
(render-world-view! render-fn)
set-cursor!
(set-cursor! cursor-key)
sprite
(sprite {:keys [image tilew tileh]} [x y])
x,y index starting top-left
sprite-sheet
(sprite-sheet file tilew tileh)
sub-image
(sub-image {:keys [texture-region]} bounds)
with-shape-line-width
(with-shape-line-width width draw-fn)
world-camera
(world-camera)
world-mouse-position
(world-mouse-position)
world-viewport-height
(world-viewport-height)
world-viewport-width
(world-viewport-width)