Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/mmmries/chunky_svg

An Elixir library for generating SVG images
https://github.com/mmmries/chunky_svg

Last synced: about 2 months ago
JSON representation

An Elixir library for generating SVG images

Lists

README

        

[![Build Status](https://travis-ci.org/mmmries/chunky_svg.svg)](https://travis-ci.org/mmmries/chunky_svg)
[![Hex.pm](https://img.shields.io/hexpm/v/chunky_svg.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}}`