Skip to content

Latest commit

 

History

History
145 lines (107 loc) · 5.12 KB

index.org

File metadata and controls

145 lines (107 loc) · 5.12 KB

thi.ng/geom-svg

About the project

Overview

This is a sub-module of thi.ng/geom and is in early stage development. This module aims to provide drawing and rendering capabilities to create SVG assets & visualizations utilizing the types and functionality provided by the core & types modules. This library also uses hiccup to serialize assets as SVG format.

http://media.thi.ng/geom/svg/hero.svg

Example usage

Various examples are located in the examples.org file of this module. Also check out the geom-viz module with a dozen more complex examples, as well as these repos:

Status

ALPHA quality, in active development.

Namespaces

Tests

Module definition

Building & testing this project

Please see the parent project for further information.

Injected properties

This template uses shared project configuration defined in config.org. Module specific settings are defined below:

Leiningen project file

(defproject <<project-name>> "<<conf-version()>>"
  :description  "thi.ng geometry kit - SVG module"
  :url          "<<conf-project-url>>"
  :license      {:name "Apache Software License"
                 :url "http://www.apache.org/licenses/LICENSE-2.0"
                 :distribution :repo}
  :scm          {:name "git"
                 :url  "<<conf-project-url>>"}

  :min-lein-version "2.4.0"

  :dependencies [<<dep-clj>>
                 <<dep-cljs>>
                 [thi.ng/geom-core "<<conf-version()>>"]
                 [thi.ng/geom-types "<<conf-version()>>"]
                 [thi.ng/geom-meshops "<<conf-version()>>"]
                 <<dep-strf>>
                 <<dep-color>>
                 <<dep-xerror>>
                 <<dep-hiccup>>]

  :profiles     {:dev {:dependencies [<<dep-criterium>>]
                       :plugins      [<<dep-cljsbuild>>
                                      <<dep-cljs-test>>]
                       :global-vars {*warn-on-reflection* true}
                       :jvm-opts ^:replace []
                       :aliases {"cleantest" ["do" "clean," "test," "cljsbuild" "test"]}}}

  :cljsbuild    {:builds [{:source-paths ["src" "test"]
                           :id "simple"
                           :compiler {:output-to "<<cljs-artefact-path>>"
                                      :optimizations :whitespace
                                      :pretty-print true}}]
                 :test-commands {"unit-tests" ["phantomjs" :runner "<<cljs-artefact-path>>"]}}

  :pom-addition [:developers [:developer
                              [:name "Karsten Schmidt"]
                              [:url "http://postspectacular.com"]
                              [:timezone "0"]]])

ClojureScript HTML harness

<!DOCTYPE html>
<html lang="en">
  <head>
    <title><<lein-coords>> test</title>
  </head>
  <body>
    <script type="text/javascript" src="<<cljs-artefact-path>>"></script>
  </body>
</html>

Accessing library version during runtime

The autogenerated namespace thi.ng.geom.svg.version contains a single symbol version holding the version string defined above:

(use 'thi.ng.geom.svg.version)

(prn version)
; "<<conf-version()>>"

Version namespace

(ns thi.ng.geom.svg.version)
(def version "<<conf-version()>>")

Contributors

NameRoleWebsite
Karsten Schmidtinitiator & principal developerpostspectacular.com
thi.ng