-- GENERATED by C->Haskell Compiler, version 0.28.8 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./GI/Cairo/Render/Internal/Surfaces/SVG.chs" #-}
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  GI.Cairo.Render.Internal.Surfaces.SVG
-- Copyright   :  (c) Duncan Coutts 2007
-- License     :  BSD-style (see doc/COPYRIGHT)
--
-- Maintainer  :  p.martini@neuralnoise.com
-- Stability   :  experimental
-- Portability :  portable
--
-- Rendering SVG images.
-----------------------------------------------------------------------------



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)))))