Browse files

use requiredScaleT in place of deprecated adjustSize

  • Loading branch information...
1 parent ae62877 commit f6c50d91de4c571e83da5f4d490d8d91fd273089 Brent Yorgey committed Oct 15, 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 f6c50d9

Please sign in to comment.