{-# LINE 1 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LINE 2 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
module Graphics.Rendering.FreeType.Internal.Span
( FT_Span(..)
) where

import Foreign
import Foreign.C.Types
import Foreign.Storable


{-# LINE 11 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}

{-# LINE 12 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}


{-# LINE 14 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}

{-# LINE 15 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}


{-# LINE 17 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}

data FT_Span = FT_Span
  { x        :: CShort
  , len      :: CUShort
  , coverage :: CUChar
  }
  deriving (Read, Show, Eq)

instance Storable FT_Span where
  sizeOf    _ = (6)
{-# LINE 27 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
  alignment _ = 2
{-# LINE 28 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
  peek ptr = do
    x'        <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 30 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
    len'      <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
{-# LINE 31 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
    coverage' <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 32 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
    return $ FT_Span
      { x = x'
      , len = len'
      , coverage = coverage'
      }
  poke ptr val = do
    ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr (x val)
{-# LINE 39 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 2)) ptr (len val)
{-# LINE 40 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr (coverage val)
{-# LINE 41 "Graphics/Rendering/FreeType/Internal/Span.hsc" #-}