gdl.graphics
GuiWorldViews
protocol
members
gui-mouse-position
(gui-mouse-position _)
pixels->world-units
(pixels->world-units _ pixels)
render-gui-view
(render-gui-view _ render-fn)
render-fn is a function of param 'g', graphics context.
render-world-view
(render-world-view _ render-fn)
render-fn is a function of param 'g', graphics context.
world-mouse-position
(world-mouse-position _)
ImageDrawer
protocol
members
draw-centered-image
(draw-centered-image _ image position)
draw-image
(draw-image _ image position)
draw-rotated-centered-image
(draw-rotated-centered-image _ image rotation position)
ShapeDrawer
protocol
members
draw-arc
(draw-arc _ center-position radius start-angle degree color)
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 drawer leftx bottomy gridw gridh cellw cellh color)
draw-line
(draw-line _ start-position end-position color)
draw-rectangle
(draw-rectangle _ x y w h color)
draw-sector
(draw-sector _ center-position radius start-angle degree color)
with-shape-line-width
(with-shape-line-width _ width draw-fn)
TextDrawer
protocol
members
draw-text
(draw-text _ {:keys [x y text font h-align up? scale]})
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.
TiledMapRenderer
protocol
members
render-tiled-map
(render-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 gdl.ColorSetter which is called for every tile-corner to set the color. Can be used for lights & shadows. The map-renderers are created and cached internally. Renders only visible layers.