{-# LINE 1 "./GI/Cairo/Render/Internal/Surfaces/SVG.chs" #-}
{-# LANGUAGE CPP #-}
module GI.Cairo.Render.Internal.Surfaces.SVG where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import GI.Cairo.Render.Types
{-# LINE 19 "./GI/Cairo/Render/Internal/Surfaces/SVG.chs" #-}
import Foreign
import Foreign.C
{-# LINE 24 "./GI/Cairo/Render/Internal/Surfaces/SVG.chs" #-}
svgSurfaceCreate :: (FilePath) -> (Double) -> (Double) -> IO ((Surface))
svgSurfaceCreate :: FilePath -> Double -> Double -> IO Surface
svgSurfaceCreate FilePath
a1 Double
a2 Double
a3 =
FilePath -> (CString -> IO Surface) -> IO Surface
forall a. FilePath -> (CString -> IO a) -> IO a
withCAString FilePath
a1 ((CString -> IO Surface) -> IO Surface)
-> (CString -> IO Surface) -> IO Surface
forall a b. (a -> b) -> a -> b
$ \CString
a1' ->
let {a2' :: CDouble
a2' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a2} in
let {a3' :: CDouble
a3' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
a3} in
CString -> CDouble -> CDouble -> IO SurfacePtr
svgSurfaceCreate'_ CString
a1' CDouble
a2' CDouble
a3' IO SurfacePtr -> (SurfacePtr -> IO Surface) -> IO Surface
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \SurfacePtr
res ->
SurfacePtr -> IO Surface
mkSurface SurfacePtr
res IO Surface -> (Surface -> IO Surface) -> IO Surface
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Surface
res' ->
Surface -> IO Surface
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Surface
res')
{-# LINE 28 "./GI/Cairo/Render/Internal/Surfaces/SVG.chs" #-}
foreign import ccall safe "GI/Cairo/Render/Internal/Surfaces/SVG.chs.h cairo_svg_surface_create"
svgSurfaceCreate'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO (SurfacePtr)))))