easyrender 0.1.1.3 → 0.1.1.4
raw patch · 6 files changed
+27/−20 lines, 6 filessetup-changed
Files
- ChangeLog +5/−0
- Graphics/EasyRender.hs +1/−1
- Graphics/EasyRender/Auxiliary.hs +5/−5
- Graphics/EasyRender/Internal.hs +10/−5
- Setup.hs +2/−2
- easyrender.cabal +4/−7
ChangeLog view
@@ -1,5 +1,10 @@ ChangeLog +v0.1.1.4 2018/11/25+ (2018/11/25) PS1 - removed dependency on superdoc, as current+ versions of Haddock have much better Unicode support and markup.+ (2018/11/25) PS1 - fixed a compiler warning.+ v0.1.1.3 2017/12/04 (2017/12/04) PS1 - updated package dependencies to work with Cabal >= 1.24 and Stack.
Graphics/EasyRender.hs view
@@ -200,7 +200,7 @@ -- Coordinates, lengths, widths, etc, are all interpreted relative to -- a /current coordinate system/. The initial coordinate system of -- each page has the origin in the lower left corner, with each unit--- equaling one PostScript point (1/72 inch). The following commands+-- equalling one PostScript point (1/72 inch). The following commands -- can be used to change the current coordinate system. -- $BLOCKSTRUCTURE
Graphics/EasyRender/Auxiliary.hs view
@@ -13,7 +13,7 @@ -- | A version of the 'ceiling' function that returns an 'Integer'. int_ceiling :: RealFrac a => a -> Integer-int_ceiling = toInteger . ceiling+int_ceiling = ceiling -- ---------------------------------------------------------------------- -- * The Curry type class@@ -31,14 +31,14 @@ class Curry fun args res | args res -> fun where -- | Multiple curry: map a function - -- (/a/[sub 1], (/a/[sub 2], (…, ())) → /b/ + -- (/a/₁, (/a/₂, (…, ())) → /b/ -- to its curried form - -- /a/[sub 1] → /a/[sub 2] → … → /b/.+ -- /a/₁ → /a/₂ → … → /b/. mcurry :: (args -> res) -> fun -- | Multiple uncurry: map a function- -- /a/[sub 1] → /a/[sub 2] → … → /b/+ -- /a/₁ → /a/₂ → … → /b/ -- to its uncurried form - -- (/a/[sub 1], (/a/[sub 2], (…, ())) → /b/.+ -- (/a/₁, (/a/₂, (…, ())) → /b/. muncurry :: fun -> (args -> res) instance Curry b () b where
Graphics/EasyRender/Internal.hs view
@@ -469,7 +469,7 @@ -- | Use the current path as a clipping path. The non-zero winding -- number determines which points lie \"inside\" the path. All -- subsequent drawing operations only paint inside the clipping--- path. This operation implicitly resets the curent path to empty.+-- path. This operation implicitly resets the current path to empty. -- There is no way to undo this operation, except by enclosing it in -- the local block. clip :: Draw ()@@ -509,7 +509,7 @@ -- coincides with the text's usual baseline. If /b/=0.5, then this -- line approximately goes through the center of each character. -- --- \[image textbox.png]+-- <<images/textbox.png>> textbox :: Alignment -> Font -> Color -> X -> Y -> X -> Y -> Double -> String -> Draw () textbox a f c x0 y0 x1 y1 b s = draw_write (TextBox a f c x0 y0 x1 y1 b s) @@ -539,7 +539,7 @@ -- Coordinates, lengths, widths, etc, are all interpreted relative to -- a /current coordinate system/. The initial coordinate system of -- each page has the origin in the lower left corner, with each unit--- equaling one PostScript point (1/72 inch). The following commands+-- equalling one PostScript point (1/72 inch). The following commands -- can be used to change the current coordinate system. -- | Translate the current coordinate system by (/x/,/y/).@@ -621,9 +621,12 @@ -- (/x/,/y/), with horizontal and vertical radii /rx/ and /ry/, -- respectively. oval :: X -> Y -> X -> Y -> Draw ()-oval x y rx ry = do+oval x y rx ry = draw_subroutine alt $ do arc_internal False x y rx ry 0 360 closepath+ where+ alt = [custom_ps $ printf "%f %f %f %f oval\n" x y rx ry,+ custom_ascii $ printf "Oval %f %f %f %f\n" x y rx ry] -- | The common implementation of 'arc', 'arc_append', and 'oval'. The -- first parameter is a boolean flag indicating whether to append to@@ -1253,7 +1256,9 @@ -- | Global PostScript definitions used by the rendering engine. global_ps_defs :: String global_ps_defs = "/textbox { /b exch def /align exch def /y1 exch def /x1 exch def /y0 exch def /x0 exch def /dx x1 x0 sub def /dy y1 y0 sub def /d dx dx mul dy dy mul add sqrt def dup stringwidth pop /w exch def /fontscale w d le {d} {w} ifelse def gsave [dx dy dy neg dx x0 y0] concat 1 fontscale div dup scale fontscale w sub align mul b moveto show grestore } bind def\n"- + +++ "/oval { /ry exch def /rx exch def /y exch def /x exch def /a 0.552285 def x rx add y moveto x rx add y a ry mul add x rx a mul add y ry add x y ry add curveto x rx a mul sub y ry add x rx sub y ry a mul add x rx sub y curveto x rx sub y a ry mul sub x rx a mul sub y ry sub x y ry sub curveto x rx a mul add y ry sub x rx add y ry a mul sub x rx add y curveto closepath } bind def\n"+ -- | Render pages as PostScript. pages_to_ps :: Document a -> PSWriter a pages_to_ps (Document_Return a) = return a
Setup.hs view
@@ -1,2 +1,2 @@-import Distribution.Superdoc-main = superdocMain+import Distribution.Simple+main = defaultMain
easyrender.cabal view
@@ -7,7 +7,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.1.3+version: 0.1.1.4 -- A short (one-line) description of the package. synopsis: User-friendly creation of EPS, PostScript, and PDF files@@ -57,7 +57,7 @@ maintainer: selinger@mathstat.dal.ca -- A copyright notice.-copyright: Copyright (c) 2012-2017 Peter Selinger+copyright: Copyright (c) 2012-2018 Peter Selinger -- A classification category for future use by the package catalogue -- Hackage. These categories have not yet been specified, but the@@ -65,10 +65,10 @@ category: Graphics -- The type of build used by this package.-build-type: Custom+build-type: Simple -- Constraint on the version of Cabal needed to build this package.-cabal-version: >=1.24+cabal-version: 1.24 -- A list of additional files to be included in source distributions -- built with setup sdist.@@ -86,6 +86,3 @@ build-depends: base >= 4.5 && < 5, zlib >=0.5, mtl >=2.1, bytestring >=0.9, containers >=0.5 default-language: Haskell2010--custom-setup- setup-depends: base >= 4.5, Cabal >= 1.24 && < 2, superdoc >= 0.1