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

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

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

import Foreign
import Foreign.C


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



psSurfaceCreate :: FilePath -> Double -> Double -> IO (Surface)
psSurfaceCreate a1 a2 a3 =
  withCAString a1 $ \a1' -> 
  let {a2' = cFloatConv a2} in 
  let {a3' = cFloatConv a3} in 
  psSurfaceCreate'_ a1' a2' a3' >>= \res ->
  mkSurface res >>= \res' ->
  return (res')
{-# LINE 27 "./Graphics/Rendering/Cairo/Internal/Surfaces/PS.chs" #-}


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

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

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