The diagrams-canvas package

[Tags: bsd3, library]

This package provides a modular backend for rendering diagrams created with the diagrams EDSL using an HTML5 canvas.


[Skip to ReadMe]

Properties

Versions0.2, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.3, 0.3.0.1, 0.3.0.2, 0.3.0.3, 0.3.0.4, 1.3, 1.3.0.1, 1.3.0.2, 1.3.0.3
Change logCHANGELOG.md
Dependenciesbase (>=4.6 && <4.9), blank-canvas (>=0.5 && <0.7), cmdargs (>=0.6 && <0.11), containers (>=0.3 && <0.6), data-default-class (>=0.0.1 && <0.1), diagrams-core (==1.3.*), diagrams-lib (==1.3.*), lens (>=4.0 && <4.14), mtl (>=2.0 && <3.0), NumInstances (>=1.0 && <1.5), optparse-applicative (>=0.10 && <0.13), statestack (==0.2.*), text (>=1.0 && <1.3) [details]
LicenseBSD3
AuthorJeffrey Rosenbluth, Ryan Yates, Brent Yorgey, Andy Gill, Daniel Bergey
Maintainerdiagrams-discuss@googlegroups.com
StabilityExperimental
CategoryGraphics
Home pagehttp://projects.haskell.org/diagrams/
Bug trackerhttp://github.com/diagrams/diagrams-canvas/issues
Source repositoryhead: git clone https://github.com/diagrams/diagrams-canvas.git
UploadedThu Jan 14 15:40:24 UTC 2016 by jeffreyrosenbluth
DistributionsLTSHaskell:1.3.0.3, Stackage:1.3.0.3
Downloads1590 total (70 in last 30 days)
Votes
0 []
StatusDocs available [build log]
Last success reported on 2016-01-14 [all 1 reports]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for diagrams-canvas-1.3.0.3

diagrams-canvas

diagrams-canvas is a canvas backend for diagrams based on the blank-canvas https://github.com/ku-fpg/blank-canvas package. Diagrams is a powerful, flexible, declarative domain-specific language for creating vector graphics, using the Haskell programming language. It supports most features defined in diagrams-lib.

Installation

cabal update && cabal install diagrams-canvas

Usage

A simple example that uses diagrams-canvas to draw a square.

import Diagrams.Prelude
import Diagrams.Backend.Canvas.CmdLine

b1 = square 20 # lw 0.002

main = mainWith (pad 1.1 b1)

Save this to file named Square.hs and compile this program:

ghc --make -threaded Square.hs

This will generate an executable which, when run dispays the resulting diagrams to http://localhost:3000/

$ ./Square -w 750