Skip to content

Instantly share code, notes, and snippets.

@etrepum
Created January 9, 2014 18:56
Show Gist options
  • Save etrepum/8339830 to your computer and use it in GitHub Desktop.
Save etrepum/8339830 to your computer and use it in GitHub Desktop.
diff -rN -u old-ThreadScope/GUI/SaveAs.hs new-ThreadScope/GUI/SaveAs.hs
--- old-ThreadScope/GUI/SaveAs.hs 2014-01-09 10:55:58.000000000 -0800
+++ new-ThreadScope/GUI/SaveAs.hs 2014-01-09 10:55:58.000000000 -0800
@@ -10,6 +10,20 @@
-- Imports for GTK
import Graphics.UI.Gtk
import Graphics.Rendering.Cairo
+ ( Render
+ , Operator(..)
+ , Format(..)
+ , rectangle
+ , getOperator
+ , setOperator
+ , fill
+ , translate
+ , liftIO
+ , withPDFSurface
+ , renderWith
+ , withImageSurface
+ , surfaceWriteToPNG
+ )
saveAs :: HECs -> ViewParameters -> Double -> DrawingArea
-> (Int, Int, Render ())
diff -rN -u old-ThreadScope/GUI/Timeline/Render.hs new-ThreadScope/GUI/Timeline/Render.hs
--- old-ThreadScope/GUI/Timeline/Render.hs 2014-01-09 10:55:58.000000000 -0800
+++ new-ThreadScope/GUI/Timeline/Render.hs 2014-01-09 10:55:58.000000000 -0800
@@ -22,6 +22,31 @@
import Graphics.UI.Gtk
import Graphics.Rendering.Cairo
+ ( Render
+ , Content(..)
+ , Operator(..)
+ , Surface
+ , liftIO
+ , withTargetSurface
+ , createSimilarSurface
+ , renderWith
+ , surfaceFinish
+ , clip
+ , setSourceSurface
+ , setOperator
+ , paint
+ , setLineWidth
+ , moveTo
+ , lineTo
+ , stroke
+ , rectangle
+ , fill
+ , save
+ , scale
+ , translate
+ , restore
+ , setSourceRGBA
+ )
import Data.IORef
import Control.Monad
diff -rN -u old-ThreadScope/GUI/Timeline.hs new-ThreadScope/GUI/Timeline.hs
--- old-ThreadScope/GUI/Timeline.hs 2014-01-09 10:55:58.000000000 -0800
+++ new-ThreadScope/GUI/Timeline.hs 2014-01-09 10:55:58.000000000 -0800
@@ -34,7 +34,7 @@
import Events.HECs
import Graphics.UI.Gtk
-import Graphics.Rendering.Cairo
+import Graphics.Rendering.Cairo ( liftIO )
import Data.IORef
import Control.Monad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment