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-0.3.0.3@sha256:b38346f1b925cdf755d52f07d69fb8fba159b44f30a15c2815e95767a63ff54f,1801

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

0.3.0.3 (13 Jan 2015)

  • Allow vector-space-0.9
  • Allow lens-4.7

0.3.0.2 (17 November 2014)

  • Allow lens-4.6

0.3.0.1 (8 October 2014)

  • Allow optparse-applicative-0.11
  • Allow NumInstances-1.4

0.3 (20 September 2014)

  • Allow & require blank-canvas-0.5.*
  • Allow text-1.2
  • Allow & require optparse-applicative-0.10.*

0.2.0.1 (22 August 2014)

  • Allow lens-4.4