drawille-clj is a Clojure library that lets you draw in the terminal using Unicode Braille characters. It's inspired by Drawille, which does more or less the same thing but in Python.
Add to your project.clj
:
[mkremins/drawille-clj "0.2.0"]
Pull in the namespace:
(:require [drawille-clj.core :as d])
Returns a blank canvas with w
(multiple of 2) columns and h
(multiple of 4) rows. (A "canvas" is just a vector of vectors of characters, where each vector at the top level represents one "row" or "line". This is subject to change in the future.)
Returns a blank canvas with the same dimensions as canvas
.
Returns a canvas like canvas
, but with the point [x y]
enabled.
Returns a canvas like canvas
, but with the point [x y]
disabled.
Returns a canvas like canvas
, but with the point [x y]
toggled.
Returns a canvas like canvas
, but with a straight line connecting [x1 y1]
and [x2 y2]
.
Renders canvas
to a newline-delimited string. The string will contain h/4
lines, each having w/2
characters, where w
and h
are the width and height of canvas
respectively.
MIT License. Hack away.