Permalink
Browse files

Merge pull request #17 from diagrams/sized

use requiredScaleT in place of deprecated adjustSize
  • Loading branch information...
2 parents ae62877 + f6c50d9 commit 8d39d12bd0efa1538da5c2ee1163bb91ac5e042c @fryguybob fryguybob committed Oct 22, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Diagrams/Backend/Cairo/Internal.hs
View
5 src/Diagrams/Backend/Cairo/Internal.hs
@@ -27,7 +27,8 @@ import Diagrams.Prelude
import Diagrams.TwoD.Path (Clip(..), getFillRule)
import Diagrams.TwoD.Text
import Diagrams.TwoD.Image
-import Diagrams.TwoD.Adjust (adjustDia2D, setDefault2DAttributes, adjustSize)
+import Diagrams.TwoD.Adjust (adjustDia2D, setDefault2DAttributes)
+import Diagrams.TwoD.Size (requiredScaleT)
import Graphics.UI.Gtk (DrawableClass)
import qualified Graphics.UI.Gtk.Cairo as CG
@@ -260,7 +261,7 @@ instance Renderable Image Cairo where
Right pngSurf -> do
w <- C.imageSurfaceGetWidth pngSurf
h <- C.imageSurfaceGetHeight pngSurf
- cairoTransf $ adjustSize sz (fromIntegral w, fromIntegral h)
+ cairoTransf $ requiredScaleT sz (fromIntegral w, fromIntegral h)
C.setSourceSurface pngSurf (-fromIntegral w / 2)
(-fromIntegral h / 2)
Left _ ->

0 comments on commit 8d39d12

Please sign in to comment.