| CARVIEW |
diagrams-postscript: Postscript backend for diagrams drawing EDSL
This package provides a modular backend for rendering diagrams created with the diagrams EDSL using Postscript.
Diagrams.Backend.Postscript.CmdLine - Provides the "mainWith" interface to render a diagram based on command line options.
Diagrams.Backend.Postscript - Provides the general API for rendering diagrams using the Postscript backend.
Diagrams.Backend.CMYK - Special support for CMYK color attributes.
[Skip to Readme]
Downloads
- diagrams-postscript-1.5.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
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, 1.5.3 |
|---|---|
| Change log | CHANGES.markdown |
| Dependencies | base (>=4.8 && <4.22), bytestring (>=0.9 && <0.13), containers (>=0.3 && <0.9), data-default (>=0.8 && <0.9), diagrams-core (>=1.3 && <1.6), diagrams-lib (>=1.4.5 && <1.6), hashable (>=1.1 && <1.6), lens (>=4.0 && <5.4), monoid-extras (>=0.3 && <0.8), 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 || ==9.12.1 |
| License | BSD-3-Clause |
| Author | Ryan Yates |
| Maintainer | diagrams-discuss@googlegroups.com |
| Uploaded | by BrentYorgey at 2025-08-13T15:19:59Z |
| Category | Graphics |
| Home page | https://diagrams.github.io/ |
| Bug tracker | https://github.com/diagrams/diagrams-postscript/issues |
| Source repo | head: git clone https://github.com/diagrams/diagrams-postscript.git |
| Distributions | LTSHaskell:1.5.3, NixOS:1.5.3, Stackage:1.5.3 |
| Reverse Dependencies | 4 direct, 37 indirect [details] |
| Downloads | 40885 total (134 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-08-13 [all 1 reports] |
Readme for diagrams-postscript-1.5.3
[back to package description]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.
