{-# 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 a1 a2 a3 =
  withCAString a1 $ \a1' -> 
  let {a2' = cFloatConv 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 ()))))