    {-# LINE 2 "./Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs" #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module : Graphics.Rendering.Cairo.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 Graphics.Rendering.Cairo.Internal.Surfaces.SVG where

    import Graphics.Rendering.Cairo.Types
    {-# LINE 18 "./Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs" #-}

    import Foreign
    import Foreign.C

    {-# LINE 23 "./Graphics/Rendering/Cairo/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. (RealFloat a, RealFloat b) => a -> b
    cFloatConv Double
    a2} in
      let {a3' :: CDouble
    a3' = Double -> CDouble
    forall a b. (RealFloat a, RealFloat b) => a -> b
    cFloatConv Double
    a3} in
      svgSurfaceCreate'_ a1' a2' a3' >>= \res ->
      mkSurface res >>= \res' ->
      return (res')
    {-# LINE 27 "./Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs" #-}

    svgSurfaceSetDocumentUnit :: Surface -> SvgUnit -> IO ()
    svgSurfaceSetDocumentUnit a1 a2 =
      withSurface a1 $ \a1' ->
      let {a2' = cFromEnum a2} in
      svgSurfaceSetDocumentUnit'_ a1' a2' >>= \res ->
      return ()
    {-# LINE 30 "./Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs" #-}
    svgSurfaceGetDocumentUnit :: Surface -> IO (SvgUnit)
    svgSurfaceGetDocumentUnit a1 =
      withSurface a1 $ \a1' ->
      svgSurfaceGetDocumentUnit'_ a1' >>= \res ->
      let {res' = cToEnum res} in
      return (res')
    {-# LINE 31 "./Graphics/Rendering/Cairo/Internal/Surfaces/SVG.chs" #-}

    foreign import ccall safe "cairo_svg_surface_create"
      svgSurfaceCreate'_ :: ((Ptr CChar) -> (CDouble -> (CDouble -> (IO (Ptr Surface)))))

    foreign import ccall safe "cairo_svg_surface_set_document_unit"
      svgSurfaceSetDocumentUnit'_ :: ((Ptr Surface) -> (CInt -> (IO ())))

    foreign import ccall safe "cairo_svg_surface_get_document_unit"
      svgSurfaceGetDocumentUnit'_ :: ((Ptr Surface) -> (IO CInt))