-- GENERATED by C->Haskell Compiler, version 0.28.3 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/NanoVG/Internal/State.chs" #-}
module NanoVG.Internal.State where
import qualified Foreign.Ptr as C2HSImp



import NanoVG.Internal.Context




{-# LINE 7 "src/NanoVG/Internal/State.chs" #-}


-- | Pushes and saves the current render state into a state stack.
--
-- A matching 'restore' must be used to restore the state.
save :: (Context) -> IO ()
save :: Context -> IO ()
save Context
a1 =
  let {a1' :: Context
a1' = Context -> Context
forall a. a -> a
id Context
a1} in 
  Context -> IO ()
save'_ Context
a1' IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
  () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

{-# LINE 13 "src/NanoVG/Internal/State.chs" #-}


-- | Pops and restores current render state.
restore :: (Context) -> IO ()
restore a1 =
  let {a1' = id a1} in 
  restore'_ a1' >>
  return ()

{-# LINE 17 "src/NanoVG/Internal/State.chs" #-}


-- | Resets current render state to default values. Does not affect the render state stack.
reset :: (Context) -> IO ()
reset a1 =
  let {a1' = id a1} in 
  reset'_ a1' >>
  return ()

{-# LINE 21 "src/NanoVG/Internal/State.chs" #-}



foreign import ccall unsafe "NanoVG/Internal/State.chs.h nvgSave"
  save'_ :: ((Context) -> (IO ()))

foreign import ccall unsafe "NanoVG/Internal/State.chs.h nvgRestore"
  restore'_ :: ((Context) -> (IO ()))

foreign import ccall unsafe "NanoVG/Internal/State.chs.h nvgReset"
  reset'_ :: ((Context) -> (IO ()))