diagrams-canvas

HTML5 canvas backend for diagrams drawing EDSL http://projects.haskell.org/diagrams/

Version on this page:1.3.0.6
LTS Haskell 12.26:1.4.1
Stackage Nightly 2018-07-09:1.4.1
Latest on Hackage:1.4.1

See all snapshots diagrams-canvas appears in

BSD-3-Clause licensed by Jeffrey Rosenbluth, Ryan Yates, Brent Yorgey, Andy Gill, Daniel Bergey
Maintained by [email protected]

Module documentation for 1.3.0.6

This version can be pinned in stack with:[email protected]:d2932efcf44c303d4baaad7357854a05def812906017fa5cdf93e6c3ec5a2a24,1814

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

Changes

v1.3.0.6 (2016-08-16)

  • allow optparse-applicative-0.13

v1.3.0.5(2016-06-16)

  • allow base-4.9
  • allow data-default-class-0.1
  • drop support for GHC 7.6
  • test on GHC 8.0.1

v1.3.0.4(2016-05-01)

  • allow lens-4.14

v1.3.0.3 (2016-01-14)

  • Allow blank-canvas-0.6

v1.3.0.2 (2015-07-19)

Full Changelog

v1.3.0.1 (2015-05-26)

Full Changelog

1.3 (19 April 2015)

  • release to coincide with 1.3

v0.3.0.4 (2015-04-03)

Full Changelog

v0.3.0.3 (2015-01-13)

Full Changelog

v0.3.0.2 (2014-11-17)

Full Changelog

Closed issues:

  • Building with HEAD gives the error “local access only” at localhost:3000 #10

Merged pull requests:

v0.3.0.1 (2014-10-08)

Full Changelog

Closed issues:

  • API blank canvas change #7

Merged pull requests:

v0.3 (2014-09-19)

Full Changelog

Closed issues:

  • Does not support optparse-applicative-0.10 #4

Merged pull requests:

v0.2.0.3 (2014-09-11)

Full Changelog

Merged pull requests:

v0.2.0.2 (2014-09-07)

Full Changelog

v0.2.0.1 (2014-08-22)

Full Changelog

v0.2 (2014-07-08)

Closed issues:

  • Text with Local font size has incorrect vertical alignment. #1

Merged pull requests:

  • Apply accumulated uniform scaling to text size #3 (bergey)

  • Update .cabal version bounds #2 (bergey)

* This Change Log was automatically generated by github_changelog_generator