A library for drawing with bocko on Android surface view.
Open android/BockoAndroid
in Android Studio
and change android/BockoAndroid/app/src/main/java/com/nvbn/bockoandroid/BockoView.java:getUrl
to file:///android_asset/index.html
if you want to put compiled
cljs in apk or to something like http://192.168.0.107:3449/
if you
want to use figwheel.
Example usage:
(require '[bocko-android.core :refer [init])
(require '[bocko.core :as b])
(init)
(doseq [[c n] (map vector
[:black :red :dark-blue :purple
:dark-green :dark-gray :medium-blue :light-blue
:brown :orange :light-gray :pink
:light-green :yellow :aqua :white]
(range))]
(b/color c)
(let [x' (* 10 (rem n 4))
y' (* 10 (quot n 4))]
(doseq [x (range x' (+ 10 x'))
y (range y' (+ 10 y'))]
(b/plot x y))))
Result:
For more information see examples and bocko for usage on cljs side.
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.