Liking cljdoc? Tell your friends :D

clunk.text


capture-gl-stateclj

(capture-gl-state)

Capture the current blending state of GL so we can draw NanoVG text (which blats the config) before restoring the original state for drawing images/shapes.

Capture the current blending state of GL so we can draw NanoVG
text (which blats the config) before restoring the original state
for drawing images/shapes.
sourceraw docstring

create-fontclj

(create-font vg name classpath-resource)

Load a .ttf from a classpath resource and register it as name in the NanoVG context vg.

Load a .ttf from a classpath resource and register it as `name` in
the NanoVG context `vg`.
sourceraw docstring

draw-text!clj

(draw-text! {:keys [window vg vg-color default-font] :as state}
            [x y]
            content
            &
            {:keys [font font-size color rotation]
             :or {font default-font font-size 32 color p/white rotation 0}})
source

restore-gl-stateclj

(restore-gl-state {:keys [src-rgb src-alpha dst-rgb dst-alpha blend-enabled?]})

Restore the original blending state of GL for drawing images/shapes.

Restore the original blending state of GL for drawing images/shapes.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close