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

import Foreign
import Foreign.Storable

import Graphics.Rendering.FreeType.Internal.PrimitiveTypes


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

{-# LINE 13 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}


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

{-# LINE 16 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}


{-# LINE 18 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}

data FT_BBox = FT_BBox
  { xMin :: FT_Pos
  , yMin :: FT_Pos
  , xMax :: FT_Pos
  , yMax :: FT_Pos
  }
  deriving (Read, Show, Eq)

instance Storable FT_BBox where
  sizeOf    _ = (16)
{-# LINE 29 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
  alignment _ = 4
{-# LINE 30 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
  peek ptr = do
    xMin' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 32 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    yMin' <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 33 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    xMax' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 34 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    yMax' <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 35 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    return $ FT_BBox
      { xMin = xMin'
      , yMin = yMin'
      , xMax = xMax'
      , yMax = yMax'
      }
  poke ptr val = do
    ((\hsc_ptr -> pokeByteOff hsc_ptr 0)) ptr (xMin val)
{-# LINE 43 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 4)) ptr (yMin val)
{-# LINE 44 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 8)) ptr (xMax val)
{-# LINE 45 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}
    ((\hsc_ptr -> pokeByteOff hsc_ptr 12)) ptr (yMax val)
{-# LINE 46 "Graphics/Rendering/FreeType/Internal/BBox.hsc" #-}