{-# LINE 1 "src/NanoVG/Internal/Style.chs" #-}
module NanoVG.Internal.Style where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import Foreign.C.Types
import Foreign.Marshal.Utils
import NanoVG.Internal.Context
import NanoVG.Internal.Color
import NanoVG.Internal.Paint
{-# LINE 13 "src/NanoVG/Internal/Style.chs" #-}
{-# LINE 14 "src/NanoVG/Internal/Style.chs" #-}
{-# LINE 15 "src/NanoVG/Internal/Style.chs" #-}
data LineCap = Butt
| Round
| Square
| Bevel
| Miter
deriving (Enum,Show,Read,Eq,Ord)
{-# LINE 19 "src/NanoVG/Internal/Style.chs" #-}
strokeColor :: (Context) -> (Color) -> IO ()
strokeColor a1 a2 =
let {a1' = id a1} in
with a2 $ \a2' ->
strokeColor'_ a1' a2' >>
return ()
{-# LINE 23 "src/NanoVG/Internal/Style.chs" #-}
strokePaint :: (Context) -> (Paint) -> IO ()
strokePaint a1 a2 =
let {a1' = id a1} in
with a2 $ \a2' ->
strokePaint'_ a1' a2' >>
return ()
{-# LINE 27 "src/NanoVG/Internal/Style.chs" #-}
fillColor :: (Context) -> (Color) -> IO ()
fillColor a1 a2 =
let {a1' = id a1} in
with a2 $ \a2' ->
fillColor'_ a1' a2' >>
return ()
{-# LINE 31 "src/NanoVG/Internal/Style.chs" #-}
fillPaint :: (Context) -> (Paint) -> IO ()
fillPaint a1 a2 =
let {a1' = id a1} in
with a2 $ \a2' ->
fillPaint'_ a1' a2' >>
return ()
{-# LINE 35 "src/NanoVG/Internal/Style.chs" #-}
miterLimit :: (Context) -> (CFloat) -> IO ()
miterLimit a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
miterLimit'_ a1' a2' >>
return ()
{-# LINE 40 "src/NanoVG/Internal/Style.chs" #-}
strokeWidth :: (Context) -> (CFloat) -> IO ()
strokeWidth a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
strokeWidth'_ a1' a2' >>
return ()
{-# LINE 44 "src/NanoVG/Internal/Style.chs" #-}
lineCap :: (Context) -> (LineCap) -> IO ()
lineCap a1 a2 =
let {a1' = id a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
lineCap'_ a1' a2' >>
return ()
{-# LINE 49 "src/NanoVG/Internal/Style.chs" #-}
lineJoin :: (Context) -> (LineCap) -> IO ()
lineJoin a1 a2 =
let {a1' = id a1} in
let {a2' = (fromIntegral . fromEnum) a2} in
lineJoin'_ a1' a2' >>
return ()
{-# LINE 54 "src/NanoVG/Internal/Style.chs" #-}
globalAlpha :: (Context) -> (CFloat) -> IO ()
globalAlpha a1 a2 =
let {a1' = id a1} in
let {a2' = realToFrac a2} in
globalAlpha'_ a1' a2' >>
return ()
{-# LINE 59 "src/NanoVG/Internal/Style.chs" #-}
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgStrokeColor_"
strokeColor'_ :: ((Context) -> ((ColorPtr) -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgStrokePaint_"
strokePaint'_ :: ((Context) -> ((PaintPtr) -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgFillColor_"
fillColor'_ :: ((Context) -> ((ColorPtr) -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgFillPaint_"
fillPaint'_ :: ((Context) -> ((PaintPtr) -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgMiterLimit"
miterLimit'_ :: ((Context) -> (C2HSImp.CFloat -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgStrokeWidth"
strokeWidth'_ :: ((Context) -> (C2HSImp.CFloat -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgLineCap"
lineCap'_ :: ((Context) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgLineJoin"
lineJoin'_ :: ((Context) -> (C2HSImp.CInt -> (IO ())))
foreign import ccall unsafe "NanoVG/Internal/Style.chs.h nvgGlobalAlpha"
globalAlpha'_ :: ((Context) -> (C2HSImp.CFloat -> (IO ())))