https://github.com/mmmries/chunky_svg
An Elixir library for generating SVG images
https://github.com/mmmries/chunky_svg
Last synced: about 10 hours ago
JSON representation
An Elixir library for generating SVG images
- Host: GitHub
- URL: https://github.com/mmmries/chunky_svg
- Owner: mmmries
- Created: 2015-03-20T22:33:17.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T12:49:49.000Z (over 3 years ago)
- Last Synced: 2025-03-28T08:19:28.739Z (18 days ago)
- Language: Elixir
- Size: 30.3 KB
- Stars: 32
- Watchers: 3
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - A library for drawing things with SVG. (Images)
- fucking-awesome-elixir - chunky_svg - A library for drawing things with SVG. (Images)
- awesome-elixir - chunky_svg - A library for drawing things with SVG. (Images)
README
[](https://travis-ci.org/mmmries/chunky_svg)
[](https://hex.pm/packages/chunky_svg)Chunky SVG
=========This library is inspired by [the Ruby library "Chunky PNG"](https://github.com/wvanbergen/chunky_png).
It is meant as an experiment to play with the idea of representing expressing charts or visualizations in a higher-level language that renders down to SVG.
Project Status
==============This is a for-fun and for-learning project. It is not being used in any production systems that I am aware of.
What Can I Draw?
================You can drawn any of the SVG primitives like this:
```elixir
ChunkySVG.render([{:circle, %{cx: 50, cy: 50, r: 40}, nil}])
```Which would generate this:
ChunkySVG also knows how to draw other things in terms of SVG primitives:
`{:hexagon, %{cx: 50, cy: 50, r: 40}}`
![]()
`{:pentagon, %{cx: 50, cy: 50, r: 40}}`
![]()
`{:octagon, %{cx: 50, cy: 50, r: 40}}`
![]()