Permalink
Browse files

add the GTK backend as an option

  • Loading branch information...
1 parent 5e82ae6 commit 30c25afb85330f90045e4471e6e56dcb10899fb1 Brent Yorgey committed Aug 24, 2013
Showing with 25 additions and 7 deletions.
  1. +11 −5 README.markdown
  2. +14 −2 diagrams.cabal
View
@@ -8,14 +8,16 @@ animations.
[haskell]: http://www.haskell.org/haskellwiki/Haskell
This package is just *a convenient wrapper* around the
-[diagrams-core], [diagrams-lib], and [diagrams-contrib] packages, so
-they can be installed with a single `cabal install diagrams` command.
+[diagrams-core], [diagrams-lib], [diagrams-svg], and
+[diagrams-contrib] packages, so they can be installed with a single
+`cabal install diagrams` command.
[diagrams-core]: http://github.com/diagrams/diagrams-core
[diagrams-lib]: http://github.com/diagrams/diagrams-lib
+[diagrams-svg]: http://github.com/diagrams/diagrams-svg
[diagrams-contrib]: http://github.com/diagrams/diagrams-contrib
-The package also comes with flags to enable three different backends.
+The package also comes with flags to enable four different backends.
The [native SVG backend](http://github.com/diagrams/diagrams-svg) is
enabled by the `-fsvg` flag and is enabled by default. If you don't
want it, you must explicitly disable it with `-f-svg`.
@@ -24,8 +26,12 @@ The
[native postscript backend](http://github.com/diagrams/diagrams-postscript)
is disabled by default but can be enabled by the `-fps` flag.
-The [cairo/gtk backend](http://github.com/diagrams/diagrams-cairo) is
-disabled by default but can be selected with the `-fcairo` flag.
+The [cairo backend](http://github.com/diagrams/diagrams-cairo) is
+disabled by default but can be selected with the `-fcairo` flag. In
+addition, the [GTK backend](http://github.com/diagrams/diagrams-gtk)
+is based on the cairo backend (but split into a separate package to
+make installing the cairo backend easier). It can be selected with
+the `fgtk` flag.
# Installation
View
@@ -10,7 +10,7 @@ Description: Diagrams is a full-featured framework and embedded domain-s
installed with a single `cabal install diagrams`
command.
.
- The package also comes with flags to enable three
+ The package also comes with flags to enable four
different backends.
A Haskell-native SVG
backend (the @diagrams-svg@ package)
@@ -25,13 +25,17 @@ Description: Diagrams is a full-featured framework and embedded domain-s
however, much easier to install, so it is the
out-of-the-box default.
.
- There is also a cairo backend (the
+ There is also a cairo backend (the
@diagrams-cairo@ package) which can be selected
with the @-fcairo@ flag. It is fully-featured and
can produce PNG, PS, PDF, or SVG output; however,
due to its dependencies it can be difficult to
install on some platforms (notably OS X).
.
+ In addition, there is a GTK backend based on the
+ cairo backend, for rendering diagrams directly to
+ GTK windows. You can enable it with the @-fgtk@ flag.
+ .
Finally, there is a Haskell-native postscript
backend (the @diagrams-postscript@ package) which
can be selected with the @-fps@ flag. The only
@@ -64,6 +68,11 @@ Flag cairo
Default: False
Manual: True
+Flag gtk
+ Description: Enable the GTK backend
+ Default: False
+ Manual: True
+
Flag svg
Description: Enable the Haskell-native SVG backend
Default: True
@@ -82,6 +91,9 @@ Library
if flag(cairo)
Build-depends: diagrams-cairo >= 0.7 && < 0.8
+ if flag(gtk)
+ Build-depends: diagrams-gtk >= 0.6.0.1 && < 0.7
+
if flag(svg)
Build-depends: diagrams-svg >= 0.7 && < 0.8

0 comments on commit 30c25af

Please sign in to comment.