generateme / Jul 02 2019
Remix of clojure2d by Martin Kavalar
clojure2d headless test
Remix this to get started with clojure2d.
{:deps {org.clojure/clojure {:mvn/version "1.10.1"} clojure2d {:mvn/version "1.2.0-SNAPSHOT"}}}
deps.edn
Extensible Data Notation
apt-get update apt-get install fontconfig
We start by setting up a canvas:
(System/setProperty "java.awt.headless" "true")
(require [clojure2d.core :as c]) (c/canvas 200 200)
(c/save (c/with-canvas-> (c/canvas 200 200) (c/set-background :maroon) (c/set-color :white) (c/text "HEADLESS TEST" 100 100 :center)) "/results/headless.jpg")
c/fonts-list
Vector(8) ["DejaVu Sans", "DejaVu Sans Mono", "DejaVu Serif", "Dialog", "DialogInput", "Monospaced", "SansSerif", "Serif"]