packages feed

easyrender 0.1.0.1 → 0.1.1.0

raw patch · 4 files changed

+35/−9 lines, 4 filesdep ~basedep ~bytestringdep ~containers

Dependency ranges changed: base, bytestring, containers, mtl, superdoc, zlib

Files

ChangeLog view
@@ -1,5 +1,10 @@ ChangeLog +v0.1.1.0 2015/08/15+	(2015/08/15) PS1 - relaxed package dependencies.+	(2015/06/03) PS1 - fixed the documentation for 'arc'.+	(2015/01/07) PS1 - added a 'clip' command.+ v0.1.0.1 2014/10/08 	(2014/10/07) PS1 - added Applicative and Functor instances to 	silence compiler warnings.
Graphics/EasyRender.hs view
@@ -73,6 +73,9 @@   stroke,   fill,   fillstroke,++  -- ** Clipping path+  clip,      -- ** Text commands   textbox,
Graphics/EasyRender/Internal.hs view
@@ -336,6 +336,7 @@   | Lineto X Y   -- ^ Append a straight line to the current subpath.   | Curveto X Y X Y X Y -- ^ Append a Bezier curve segment.   | Closepath    -- ^ Close the current subpath.+  | Clip         -- ^ Use the current path as a clipping path.   | Stroke       -- ^ Stroke and clear the current path.   | Fill Color   -- ^ Fill and clear the current path.   | FillStroke Color -- ^ Fill and stroke and clear the current path.@@ -463,6 +464,18 @@ closepath = draw_write (Closepath)  -- ----------------------------------------------------------------------+-- *** Clipping++-- | 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.+-- There is no way to undo this operation, except by enclosing it in+-- the local block.+clip :: Draw ()+clip = draw_write (Clip)++-- ---------------------------------------------------------------------- -- *** Painting commands  -- | Stroke the current path, using the current line color, line@@ -579,12 +592,12 @@ -- define it here. Since PostScript does have such a command, we use -- the 'draw_subroutine' mechanism. --- | Start a new subpath consisting of a circular arc segment. The--- arc segment is centered at (/x/,/y/), has radius /r/, and extends--- from angle /a1/ to angle /a2/, measured in degrees,--- counterclockwise from the /x/-axis. The arc is drawn clockwise if--- /a2/ ≥ /a1/, and counterclockwise otherwise. The final point--- becomes the new current point.+-- | Start a new subpath consisting of a circular arc segment. The arc+-- segment is centered at (/x/,/y/), has radius /r/, and extends from+-- angle /a1/ to angle /a2/, measured in degrees, counterclockwise+-- from the /x/-axis. The arc is drawn counterclockwise if /a2/ ≥+-- /a1/, and clockwise otherwise. The final point becomes the new+-- current point. arc :: X -> Y -> Double -> Double -> Double -> Draw () arc x y r a1 a2 = draw_subroutine alt $ do   arc_internal False x y r r a1 a2@@ -1170,6 +1183,9 @@   wPutStrLn "closepath" command_to_ps (Stroke) = do   wPutStrLn "stroke"+command_to_ps (Clip) = do+  wPutStrLn "clip"+  wPutStrLn "newpath" command_to_ps (Fill color) = do   wPutStrLn "gsave"    color_to_ps color@@ -1706,6 +1722,8 @@   wPutStr "h\n" command_to_pdf (Stroke) = do   wPutStr "S\n"+command_to_pdf (Clip) = do+  wPutStr "W\n" command_to_pdf (Fill color) = do   fillcolor_to_pdf color   wPutStr "f\n"
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.0.1+version:             0.1.1.0  -- 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-2014 Peter Selinger+copyright:           Copyright (c) 2012-2015 Peter Selinger  -- A classification category for future use by the package catalogue -- Hackage. These categories have not yet been specified, but the@@ -83,5 +83,5 @@   -- other-modules:             -- Other library packages from which modules are imported.-  build-depends:       base >= 4.6 && < 4.8, zlib ==0.5.*, mtl ==2.1.*, bytestring ==0.10.*, containers ==0.5.*, superdoc ==0.1.*+  build-depends:       base >= 4.6 && < 4.9, zlib >=0.5, mtl >=2.1, bytestring >=0.10, containers >=0.5, superdoc >=0.1