The lucid-svg package

[ Tags: bsd3, graphics, library ] [ Propose Tags ]

Easy to write SVG in the syle of lucid.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.1, 0.3, 0.4, 0.4.0.1, 0.4.0.2, 0.4.0.3, 0.4.0.4, 0.5.0.0, 0.6.0.0, 0.6.0.1, 0.7.0.0
Dependencies base (>=4.5 && <4.10), blaze-builder (>=0.2 && <0.5), lucid (>=2.9.2 && <3.0), text (>=0.11 && <1.3), transformers (>=0.2 && <0.6) [details]
License BSD3
Copyright 2015 Jeffrey Rosenbluth
Author Jeffrey Rosenbluth
Maintainer jeffrey.rosenbluth@gmail.com
Category Graphics
Home page http://github.com/jeffreyrosenbluth/lucid-svg.git
Uploaded Wed Jun 29 14:56:26 UTC 2016 by jeffreyrosenbluth
Distributions Debian:0.6.0.1, LTSHaskell:0.7.0.0, NixOS:0.7.0.0, Tumbleweed:0.7.0.0
Downloads 3752 total (9 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-06-29 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for lucid-svg-0.7.0.0

[back to package description]

lucid-svg Hackage

Simple DSL for writing SVG, based on lucid

Example

{-# LANGUAGE OverloadedStrings #-}

import Lucid.Svg
 
svg :: Svg () -> Svg ()
svg content = do
  doctype_
  with (svg11_ content) [width_ "300" , height_ "200"]

contents :: Svg ()
contents = do
  rect_   [width_ "100%", height_ "100%", fill_ "red"]
  circle_ [cx_ "150", cy_ "100", r_ "80", fill_ "green"]
  text_   [x_ "150", y_ "125", font_size_ "60", text_anchor_ "middle", fill_ "white"] "SVG"


main :: IO ()
main = do
  print $ svg contents

SVG