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

import Foreign
import Foreign.Storable

import Graphics.Rendering.FreeType.Internal.PrimitiveTypes


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

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


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

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

data FT_Bitmap_Size = FT_Bitmap_Size
  { height :: FT_Short
  , width  :: FT_Short
  , size   :: FT_Pos
  , x_ppem :: FT_Pos
  , y_ppem :: FT_Pos
  }
  deriving (Read, Show, Eq)

instance Storable FT_Bitmap_Size where
  sizeOf   _  = (16)
{-# LINE 28 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
  alignment _ = 4
{-# LINE 29 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
  peek ptr = do
    height' <- ((\hsc_ptr -> peekByteOff hsc_ptr 0)) ptr
{-# LINE 31 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
    width'  <- ((\hsc_ptr -> peekByteOff hsc_ptr 2)) ptr
{-# LINE 32 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
    size'   <- ((\hsc_ptr -> peekByteOff hsc_ptr 4)) ptr
{-# LINE 33 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
    x_ppem' <- ((\hsc_ptr -> peekByteOff hsc_ptr 8)) ptr
{-# LINE 34 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
    y_ppem' <- ((\hsc_ptr -> peekByteOff hsc_ptr 12)) ptr
{-# LINE 35 "Graphics/Rendering/FreeType/Internal/BitmapSize.hsc" #-}
    return $ FT_Bitmap_Size
      { height = height'
      , width = width'
      , size = size'
      , x_ppem = x_ppem'
      , y_ppem = y_ppem'
      }