diagrams-postscript: Postscript backend for diagrams drawing EDSL

[ bsd3, graphics, library ] [ Propose Tags ] [ Report a vulnerability ]

This package provides a modular backend for rendering diagrams created with the diagrams EDSL using Postscript.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.6, 0.6.0.1, 0.7, 0.7.0.1, 0.7.0.2, 1.0, 1.0.0.1, 1.0.0.2, 1.0.1, 1.0.1.1, 1.0.1.2, 1.0.2, 1.0.2.1, 1.0.2.2, 1.0.2.3, 1.0.2.4, 1.1, 1.1.0.1, 1.1.0.2, 1.1.0.3, 1.1.0.4, 1.1.0.5, 1.3.0.0, 1.3.0.1, 1.3.0.2, 1.3.0.3, 1.3.0.4, 1.3.0.5, 1.3.0.6, 1.3.0.7, 1.4, 1.4.1, 1.5, 1.5.1, 1.5.1.1, 1.5.2
Change log CHANGES.markdown
Dependencies base (>=4.8 && <4.21), bytestring (>=0.9 && <0.13), containers (>=0.3 && <0.8), data-default (>=0.8 && <0.9), diagrams-core (>=1.3 && <1.6), diagrams-lib (>=1.4.5 && <1.5), hashable (>=1.1 && <1.6), lens (>=4.0 && <5.4), monoid-extras (>=0.3 && <0.7), mtl (>=2.0 && <2.4), semigroups (>=0.3.4 && <0.21), split (>=0.1.2 && <0.3), statestack (>=0.2 && <0.4) [details]
Tested with ghc ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1
License BSD-3-Clause
Author Ryan Yates
Maintainer diagrams-discuss@googlegroups.com
Category Graphics
Home page https://diagrams.github.io/
Bug tracker http://github.com/diagrams/diagrams-postscript/issues
Source repo head: git clone https://github.com/diagrams/diagrams-postscript.git
Uploaded by BrentYorgey at 2024-10-31T17:08:18Z
Distributions LTSHaskell:1.5.1.1, NixOS:1.5.1.1, Stackage:1.5.2
Reverse Dependencies 4 direct, 35 indirect [details]
Downloads 39687 total (149 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-10-31 [all 1 reports]

Readme for diagrams-postscript-1.5.2

[back to package description]

Build Status

diagrams-postscript is a rendering backend for diagrams, a powerful, flexible, declarative domain-specific language for creating vector graphics, using the Haskell programming language.

diagrams-postscript has a simple rendering engine that outputs PostScriptâ„¢ language files and is an officially supported backend for diagrams.

Installation

cabal update && cabal install diagrams-postscript

Basic usage

A simple example that uses diagrams-postscript to draw a blue circle:

import Diagrams.Prelude
import Diagrams.Backend.Postscript.CmdLine

d = circle 1 # fc blue

main = mainWith (pad 1.1 d)

Save this to file named Circle.hs and compile it:

ghc --make Circle.hs

This will generate an executable which, when run, outputs a blue circle to some file. Run the executable with the --help option to find out more about how to call it.

$ ./Circle --help
./Circle

Usage: ./Circle [-w|--width WIDTH] [-h|--height HEIGHT] [-o|--output OUTPUT]
  Command-line diagram generation.

Available options:
  -?,--help                Show this help text
  -w,--width WIDTH         Desired WIDTH of the output image
  -h,--height HEIGHT       Desired HEIGHT of the output image
  -o,--output OUTPUT       OUTPUT file

The output type will be automatically determined from the file extension. Currently EPS and PS are supported.

$ ./Circle -o circle.eps -w 400

The command above generates an EPS file with a width of 400pt.

Advanced usage

Instead of just creating a standalone executable, the postscript backend can also be called from within a larger program. For more information, see the Diagram.Backend.Postscript module.

--

PostScriptâ„¢ is a trademark of Adobe.