vacuum-cairo 0.3.1 → 0.4
raw patch · 2 files changed
+12/−3 lines, 2 files
Files
- System/Vacuum/Cairo.hs +11/−2
- vacuum-cairo.cabal +1/−1
System/Vacuum/Cairo.hs view
@@ -15,7 +15,7 @@ module System.Vacuum.Cairo ( view-+, viewFile -- export to .svg file ) where import qualified Graphics.UI.Gtk as G@@ -203,7 +203,16 @@ yield return () -+-- | Render a value to a file+viewFile :: String -> a -> IO ()+viewFile file a = do+ let dot = render . myPpDot . (showHNodes myStyle) $ vacuum a+ mdot <- findExecutable "dot"+ let exe = case mdot of+ Nothing -> error "\"dot\" executable not found. please install graphviz"+ Just p -> p + svgstring <- myReadProcess exe ["-Tsvg"] dot+ writeFile file svgstring updateCanvas :: C.SVG -> G.DrawingArea -> IO Bool updateCanvas svg canvas = do
vacuum-cairo.cabal view
@@ -1,5 +1,5 @@ name: vacuum-cairo-version: 0.3.1+version: 0.4 cabal-version: >= 1.2 build-type: Simple license: BSD3