Skip to content

Commit

Permalink
Merge pull request #39 from robx/nops
Browse files Browse the repository at this point in the history
remove claimed PostScript support
  • Loading branch information
robx authored Nov 24, 2018
2 parents 602ef26 + 97efd6d commit 7e9c0f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Remove non-existent PostScript support.

0.3.1.0: 20181119
-----------------

Expand Down
7 changes: 2 additions & 5 deletions src/Draw/CmdLine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,20 @@ renderRasterific ropts = Rasterific.renderRasterific (_file ropts) (_size ropts)
renderSVG :: RenderOpts -> Diagram SVG.B -> IO ()
renderSVG ropts = SVG.renderSVG (_file ropts) (_size ropts)

data Format = PNG | PS | PDF | SVG | JPG
data Format = PNG | PDF | SVG | JPG

data BackendType = BackendRasterific | BackendSVG

backend :: Format -> BackendType
backend b = case b of
PNG -> BackendRasterific
PS -> BackendRasterific
PDF -> BackendRasterific
JPG -> BackendRasterific
SVG -> BackendSVG

lookupFormat :: String -> Maybe Format
lookupFormat f = case f of
"png" -> Just PNG
"ps" -> Just PS
"pdf" -> Just PDF
"svg" -> Just SVG
"jpg" -> Just JPG
Expand All @@ -54,9 +52,8 @@ extension :: Format -> String
extension f = case f of
PNG -> "png"
PDF -> "pdf"
PS -> "ps"
SVG -> "svg"
JPG -> "jpg"

formats :: [Format]
formats = [PNG, JPG, PS, PDF, SVG]
formats = [PNG, JPG, PDF, SVG]

0 comments on commit 7e9c0f1

Please sign in to comment.