    -- 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/Drawing/Paths.chs" #-}
    -----------------------------------------------------------------------------
    -- |
    -- Module      :  GI.Cairo.Render.Internal.Drawing.Paths
    -- Copyright   :  (c) Paolo Martini 2005
    -- License     :  BSD-style (see cairo/COPYRIGHT)
    --
    -- Maintainer  :  p.martini@neuralnoise.com
    -- Stability   :  experimental
    -- Portability :  portable
    --
    -- Creating paths and manipulating path data.
    -----------------------------------------------------------------------------

    module GI.Cairo.Render.Internal.Drawing.Paths where
    import qualified Foreign.C.Types as C2HSImp
    import qualified Foreign.Ptr as C2HSImp

    import GI.Cairo.Render.Types
    {-# LINE 18 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    import Data.GI.Base(wrapBoxed, withManagedPtr)
    import Foreign
    import Foreign.C
    import Data.Text

    import GI.Cairo.Render.Internal.Utilities (CairoString(..))

    {-# LINE 27 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    getCurrentPoint :: (Cairo) -> IO ((Double), (Double))
    getCurrentPoint :: Cairo -> IO (Double, Double)
    getCurrentPoint a1 =
      Cairo -> (Ptr Cairo -> IO (Double, Double)) -> IO (Double, Double)
    forall a c.
    (HasCallStack, ManagedPtrNewtype a) =>
    a -> (Ptr a -> IO c) -> IO c
    withManagedPtr Cairo
    a1 ((Ptr Cairo -> IO (Double, Double)) -> IO (Double, Double))
    -> (Ptr Cairo -> IO (Double, Double)) -> IO (Double, Double)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Cairo
    a1' ->
      (Ptr CDouble -> IO (Double, Double)) -> IO (Double, Double)
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CDouble -> IO (Double, Double)) -> IO (Double, Double))
    -> (Ptr CDouble -> IO (Double, Double)) -> IO (Double, Double)
    forall a b. (a -> b) -> a -> b
    $ \Ptr CDouble
    a2' ->
      alloca $ \a3' ->
      getCurrentPoint'_ a1' a2' a3' >>
      peekFloatConv  a2'>>= \a2'' ->
      peekFloatConv  a3'>>= \a3'' ->
      return (a2'', a3'')

    {-# LINE 29 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    newPath :: (Cairo) -> IO ()
    newPath a1 =
      withManagedPtr a1 $ \a1' ->
      newPath'_ a1' >>
      return ()

    {-# LINE 30 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    closePath :: (Cairo) -> IO ()
    closePath a1 =
      withManagedPtr a1 $ \a1' ->
      closePath'_ a1' >>
      return ()

    {-# LINE 31 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    arc :: (Cairo) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> IO ()
    arc a1 a2 a3 a4 a5 a6 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      let {a5' = realToFrac a5} in
      let {a6' = realToFrac a6} in
      arc'_ a1' a2' a3' a4' a5' a6' >>
      return ()

    {-# LINE 32 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    arcNegative :: (Cairo) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> IO ()
    arcNegative a1 a2 a3 a4 a5 a6 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      let {a5' = realToFrac a5} in
      let {a6' = realToFrac a6} in
      arcNegative'_ a1' a2' a3' a4' a5' a6' >>
      return ()

    {-# LINE 33 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    curveTo :: (Cairo) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> IO ()
    curveTo a1 a2 a3 a4 a5 a6 a7 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      let {a5' = realToFrac a5} in
      let {a6' = realToFrac a6} in
      let {a7' = realToFrac a7} in
      curveTo'_ a1' a2' a3' a4' a5' a6' a7' >>
      return ()

    {-# LINE 34 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    lineTo :: (Cairo) -> (Double) -> (Double) -> IO ()
    lineTo a1 a2 a3 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      lineTo'_ a1' a2' a3' >>
      return ()

    {-# LINE 35 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    moveTo :: (Cairo) -> (Double) -> (Double) -> IO ()
    moveTo a1 a2 a3 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      moveTo'_ a1' a2' a3' >>
      return ()

    {-# LINE 36 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    rectangle :: (Cairo) -> (Double) -> (Double) -> (Double) -> (Double) -> IO ()
    rectangle a1 a2 a3 a4 a5 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      let {a5' = realToFrac a5} in
      rectangle'_ a1' a2' a3' a4' a5' >>
      return ()

    {-# LINE 37 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    textPath :: CairoString string => Cairo -> string -> IO ()
    textPath c string =
        withManagedPtr c $ \ctxt ->
          withUTFString string $ \string' ->
          cairo_text_path ctxt string'
    relCurveTo :: (Cairo) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> (Double) -> IO ()
    relCurveTo a1 a2 a3 a4 a5 a6 a7 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      let {a4' = realToFrac a4} in
      let {a5' = realToFrac a5} in
      let {a6' = realToFrac a6} in
      let {a7' = realToFrac a7} in
      relCurveTo'_ a1' a2' a3' a4' a5' a6' a7' >>
      return ()

    {-# LINE 43 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    relLineTo :: (Cairo) -> (Double) -> (Double) -> IO ()
    relLineTo a1 a2 a3 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      relLineTo'_ a1' a2' a3' >>
      return ()

    {-# LINE 44 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    relMoveTo :: (Cairo) -> (Double) -> (Double) -> IO ()
    relMoveTo a1 a2 a3 =
      withManagedPtr a1 $ \a1' ->
      let {a2' = realToFrac a2} in
      let {a3' = realToFrac a3} in
      relMoveTo'_ a1' a2' a3' >>
      return ()

    {-# LINE 45 "./GI/Cairo/Render/Internal/Drawing/Paths.chs" #-}

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_get_current_point"
      getCurrentPoint'_ :: ((CairoPtr) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> (IO ()))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_new_path"
      newPath'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_close_path"
      closePath'_ :: ((CairoPtr) -> (IO ()))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_arc"
      arc'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ())))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_arc_negative"
      arcNegative'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ())))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_curve_to"
      curveTo'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_line_to"
      lineTo'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_move_to"
      moveTo'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_rectangle"
      rectangle'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_text_path"
      cairo_text_path :: ((CairoPtr) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO ())))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_rel_curve_to"
      relCurveTo'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_rel_line_to"
      relLineTo'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))

    foreign import ccall safe "GI/Cairo/Render/Internal/Drawing/Paths.chs.h cairo_rel_move_to"
      relMoveTo'_ :: ((CairoPtr) -> (C2HSImp.CDouble -> (C2HSImp.CDouble -> (IO ()))))