Permalink
Browse files

merge

  • Loading branch information...
2 parents 537680f + b0bcf98 commit 5c80c529863e39f0d5fb1cd2f6de3c0821d2d195 Brent Yorgey committed Dec 11, 2012
Showing with 59 additions and 2 deletions.
  1. +32 −1 CHANGES.markdown
  2. +1 −0 LICENSE
  3. +13 −0 src/Diagrams/Backend/Cairo/List.hs
  4. +12 −0 src/Diagrams/Backend/Cairo/Ptr.hs
  5. +1 −1 src/Diagrams/Backend/Cairo/Text.hs
View
33 CHANGES.markdown
@@ -5,17 +5,48 @@
- New `--list` option for `multiMain` to list all available diagrams
+ - Major documentation improvements
+
+ - New modules:
+
+ + `Diagrams.Backend.Cairo.Ptr`, for rendering directly to buffers
+ in memory
+
+ + `Diagrams.Backend.Cairo.List`, for rendering to a list of lists
+ of pixels.
+
* **API changes**
- Removal of `StyleParam` from `Diagrams.Backend.Cairo.Text`, change
functions in that module to accept `Style R2`. Usage can be fixed
by applying these style functions to `mempty`.
+ - GTK rendering has been split out into a new package, diagrams-gtk.
+
+ + The `Diagrams.Backend.Cairo.Gtk` module is now
+ `Diagrams.Backend.Gtk` in the `diagrams-gtk` package.
+
+ + The `CairoOptions` record has a new boolean `cairoBypassAdjust`
+ option; when set, the backend should bypass calling `adjustDia2D`.
+
+ + The GTK output type is gone.
+
+ + There is a new `RenderOnly` output type, for when you don't
+ care about the `IO` action but only want the cairo `Render` action.
+
* **Dependency/version changes**
- - Allow new versions of dependencies:
+ - Upper bounds relaxed to allow
`base`-4.6, `unix`-2.6, `cmdargs`-0.10, `split`-0.2.*, `mtl`-2.1
+ - Add a dependency on `time`, and conditional compilation to use
+ either ClockTime or UTCTime depending on the version of the
+ `directory` package
+
+ - Add dependency on `colour`
+
+ - Lower bound on `cairo` raised to 0.12.4
+
* **Bug fixes**
- Fixed looped compile mode, which was repeatedly trying to compile
View
1 LICENSE
@@ -1,6 +1,7 @@
Copyright 2011-2012 diagrams-cairo team:
Sam Griffin <sam.griffin@gmail.com>
+ Niklas Haas <nand@lavabit.com>
John Lato <jwlato@gmail.com>
Ian Ross <ian@skybluetrades.net>
Michael Sloan <mgsloan@gmail.com>
View
13 src/Diagrams/Backend/Cairo/List.hs
@@ -1,3 +1,16 @@
+
+-----------------------------------------------------------------------------
+-- |
+-- Module : Diagrams.Backend.Cairo.List
+-- Copyright : (c) 2012 Diagrams-cairo team (see LICENSE)
+-- License : BSD-style (see LICENSE)
+-- Maintainer : diagrams-discuss@googlegroups.com
+--
+-- Render a diagram directly to a list of lists of Colour values
+-- (/i.e./ pixels).
+--
+-----------------------------------------------------------------------------
+
module Diagrams.Backend.Cairo.List where
import Control.Applicative ((<$>))
View
12 src/Diagrams/Backend/Cairo/Ptr.hs
@@ -1,3 +1,15 @@
+
+-----------------------------------------------------------------------------
+-- |
+-- Module : Diagrams.Backend.Cairo.Ptr
+-- Copyright : (c) 2012 Diagrams-cairo team (see LICENSE)
+-- License : BSD-style (see LICENSE)
+-- Maintainer : diagrams-discuss@googlegroups.com
+--
+-- Render diagrams to buffers in memory.
+--
+-----------------------------------------------------------------------------
+
module Diagrams.Backend.Cairo.Ptr where
import Data.Word (Word8)
View
2 src/Diagrams/Backend/Cairo/Text.hs
@@ -147,7 +147,7 @@ textVisualBoundedIO :: Style R2 -> String -> IO (Diagram Cairo R2)
textVisualBoundedIO style str = do
te <- queryCairo $ getTextExtents style str
let box = fromCorners (origin .+^ bearing te)
- (origin .+^ bearing te ^+^ (textSize te))
+ ((origin .+^ bearing te) .+^ textSize te)
return . setEnvelope (getEnvelope box) . applyStyle style $ baselineText str
kerningCorrection :: Style R2 -> Char -> Char -> Double

0 comments on commit 5c80c52

Please sign in to comment.