{-# LINE 2 "./Graphics/Rendering/Cairo/Internal/Surfaces/PDF.chs" #-}
-----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.Cairo.Internal.Surfaces.PDF
-- Copyright : (c) Paolo Martini 2005
-- License : BSD-style (see doc/COPYRIGHT)
--
-- Maintainer : p.martini@neuralnoise.com
-- Stability : experimental
-- Portability : portable
--
-- Rendering PDF documents.
-----------------------------------------------------------------------------

module Graphics.Rendering.Cairo.Internal.Surfaces.PDF where

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

import Foreign
import Foreign.C


{-# LINE 23 "./Graphics/Rendering/Cairo/Internal/Surfaces/PDF.chs" #-}



pdfSurfaceCreate :: FilePath -> Double -> Double -> IO (Surface)
pdfSurfaceCreate :: FilePath -> Double -> Double -> IO Surface
pdfSurfaceCreate 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' = cFloatConv a3} in 
  pdfSurfaceCreate'_ a1' a2' a3' >>= \res ->
  mkSurface res >>= \res' ->
  return (res')
{-# LINE 27 "./Graphics/Rendering/Cairo/Internal/Surfaces/PDF.chs" #-}


pdfSurfaceSetSize :: Surface -> Double -> Double -> IO ()
pdfSurfaceSetSize a1 a2 a3 =
  withSurface a1 $ \a1' -> 
  let {a2' = cFloatConv a2} in 
  let {a3' = cFloatConv a3} in 
  pdfSurfaceSetSize'_ a1' a2' a3' >>= \res ->
  return ()
{-# LINE 30 "./Graphics/Rendering/Cairo/Internal/Surfaces/PDF.chs" #-}

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

foreign import ccall safe "cairo_pdf_surface_set_size"
  pdfSurfaceSetSize'_ :: ((Ptr Surface) -> (CDouble -> (CDouble -> (IO ()))))