diagrams-canvas

HTML5 canvas backend for diagrams drawing EDSL

http://projects.haskell.org/diagrams/

Version on this page:1.3.0.3
LTS Haskell 22.39:1.4.1.2@rev:2
Stackage Nightly 2024-10-31:1.4.1.2@rev:2
Latest on Hackage:1.4.2

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]
This version can be pinned in stack with:diagrams-canvas-1.3.0.3@sha256:e9725f0f1cc0f87ce40f1ed84694d9c55a8c9063cef3cc8f2301bf9074008714,1813

Module documentation for 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

Changes

v1.3.0.3 (2016-01-14)

  • Allow blank-canvas v0.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