    {-# LANGUAGE DeriveDataTypeable #-}
    {-# LANGUAGE RecordWildCards #-}
    {-# OPTIONS_HADDOCK hide #-}

    -- | Helper functions for rendering bitmaps
    module Graphics.Gloss.Internals.Rendering.Bitmap
            ( Rectangle(..)
            , BitmapData(..)
            , BitmapFormat(..), PixelFormat(..), RowOrder(..)
            , bitmapPath
            , freeBitmapData)
    where
    import Data.Data
    import Foreign

    -- | Represents a rectangular section in a bitmap
    data Rectangle
            = Rectangle
            { Rectangle -> (Int, Int)
    rectPos :: (Int, Int) -- ^ x- and y-pos in the bitmap in pixels
            , Rectangle -> (Int, Int)
    rectSize :: (Int, Int) -- ^ width/height of the area in pixelsi
            }
            deriving (Int -> Rectangle -> ShowS
    [Rectangle] -> ShowS
    Rectangle -> String
    (Int -> Rectangle -> ShowS)
    -> (Rectangle -> String)
    -> ([Rectangle] -> ShowS)
    -> Show Rectangle
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> Rectangle -> ShowS
    showsPrec :: Int -> Rectangle -> ShowS
    $cshow :: Rectangle -> String
    show :: Rectangle -> String
    $cshowList :: [Rectangle] -> ShowS
    showList :: [Rectangle] -> ShowS
    Show, ReadPrec [Rectangle]
    ReadPrec Rectangle
    Int -> ReadS Rectangle
    ReadS [Rectangle]
    (Int -> ReadS Rectangle)
    -> ReadS [Rectangle]
    -> ReadPrec Rectangle
    -> ReadPrec [Rectangle]
    -> Read Rectangle
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS Rectangle
    readsPrec :: Int -> ReadS Rectangle
    $creadList :: ReadS [Rectangle]
    readList :: ReadS [Rectangle]
    $creadPrec :: ReadPrec Rectangle
    readPrec :: ReadPrec Rectangle
    $creadListPrec :: ReadPrec [Rectangle]
    readListPrec :: ReadPrec [Rectangle]
    Read, Rectangle -> Rectangle -> Bool
    (Rectangle -> Rectangle -> Bool)
    -> (Rectangle -> Rectangle -> Bool) -> Eq Rectangle
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: Rectangle -> Rectangle -> Bool
    == :: Rectangle -> Rectangle -> Bool
    $c/= :: Rectangle -> Rectangle -> Bool
    /= :: Rectangle -> Rectangle -> Bool
    Eq, Eq Rectangle
    Eq Rectangle =>
    (Rectangle -> Rectangle -> Ordering)
    -> (Rectangle -> Rectangle -> Bool)
    -> (Rectangle -> Rectangle -> Bool)
    -> (Rectangle -> Rectangle -> Bool)
    -> (Rectangle -> Rectangle -> Bool)
    -> (Rectangle -> Rectangle -> Rectangle)
    -> (Rectangle -> Rectangle -> Rectangle)
    -> Ord Rectangle
    Rectangle -> Rectangle -> Bool
    Rectangle -> Rectangle -> Ordering
    Rectangle -> Rectangle -> Rectangle
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: Rectangle -> Rectangle -> Ordering
    compare :: Rectangle -> Rectangle -> Ordering
    $c< :: Rectangle -> Rectangle -> Bool
    < :: Rectangle -> Rectangle -> Bool
    $c<= :: Rectangle -> Rectangle -> Bool
    <= :: Rectangle -> Rectangle -> Bool
    $c> :: Rectangle -> Rectangle -> Bool
    > :: Rectangle -> Rectangle -> Bool
    $c>= :: Rectangle -> Rectangle -> Bool
    >= :: Rectangle -> Rectangle -> Bool
    $cmax :: Rectangle -> Rectangle -> Rectangle
    max :: Rectangle -> Rectangle -> Rectangle
    $cmin :: Rectangle -> Rectangle -> Rectangle
    min :: Rectangle -> Rectangle -> Rectangle
    Ord, Typeable Rectangle
    Typeable Rectangle =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> Rectangle -> c Rectangle)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c Rectangle)
    -> (Rectangle -> Constr)
    -> (Rectangle -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c Rectangle))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rectangle))
    -> ((forall b. Data b => b -> b) -> Rectangle -> Rectangle)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> Rectangle -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> Rectangle -> r)
    -> (forall u. (forall d. Data d => d -> u) -> Rectangle -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> Rectangle -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle)
    -> Data Rectangle
    Rectangle -> Constr
    Rectangle -> DataType
    (forall b. Data b => b -> b) -> Rectangle -> Rectangle
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> Rectangle -> u
    forall u. (forall d. Data d => d -> u) -> Rectangle -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Rectangle -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Rectangle -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Rectangle
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Rectangle -> c Rectangle
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Rectangle)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rectangle)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Rectangle -> c Rectangle
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> Rectangle -> c Rectangle
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Rectangle
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c Rectangle
    $ctoConstr :: Rectangle -> Constr
    toConstr :: Rectangle -> Constr
    $cdataTypeOf :: Rectangle -> DataType
    dataTypeOf :: Rectangle -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Rectangle)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c Rectangle)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rectangle)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Rectangle)
    $cgmapT :: (forall b. Data b => b -> b) -> Rectangle -> Rectangle
    gmapT :: (forall b. Data b => b -> b) -> Rectangle -> Rectangle
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Rectangle -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> Rectangle -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Rectangle -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> Rectangle -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> Rectangle -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> Rectangle -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Rectangle -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> Rectangle -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> Rectangle -> m Rectangle
    Data, Typeable)

    -- | Abstract 32-bit RGBA bitmap data.
    data BitmapData
            = BitmapData
            { BitmapData -> Int
    bitmapDataLength :: Int  -- length (in bytes)
            , BitmapData -> BitmapFormat
    bitmapFormat     :: BitmapFormat
            , BitmapData -> (Int, Int)
    bitmapSize       :: (Int, Int) -- ^ width, height in pixels
            , BitmapData -> Bool
    bitmapCacheMe    :: Bool
            , BitmapData -> ForeignPtr Word8
    bitmapPointer    :: (ForeignPtr Word8) }
            deriving (BitmapData -> BitmapData -> Bool
    (BitmapData -> BitmapData -> Bool)
    -> (BitmapData -> BitmapData -> Bool) -> Eq BitmapData
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: BitmapData -> BitmapData -> Bool
    == :: BitmapData -> BitmapData -> Bool
    $c/= :: BitmapData -> BitmapData -> Bool
    /= :: BitmapData -> BitmapData -> Bool
    Eq, Typeable BitmapData
    Typeable BitmapData =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> BitmapData -> c BitmapData)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c BitmapData)
    -> (BitmapData -> Constr)
    -> (BitmapData -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c BitmapData))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c BitmapData))
    -> ((forall b. Data b => b -> b) -> BitmapData -> BitmapData)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> BitmapData -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> BitmapData -> r)
    -> (forall u. (forall d. Data d => d -> u) -> BitmapData -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> BitmapData -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData)
    -> Data BitmapData
    BitmapData -> Constr
    BitmapData -> DataType
    (forall b. Data b => b -> b) -> BitmapData -> BitmapData
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> BitmapData -> u
    forall u. (forall d. Data d => d -> u) -> BitmapData -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapData -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapData -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BitmapData
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BitmapData -> c BitmapData
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BitmapData)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BitmapData)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BitmapData -> c BitmapData
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BitmapData -> c BitmapData
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BitmapData
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BitmapData
    $ctoConstr :: BitmapData -> Constr
    toConstr :: BitmapData -> Constr
    $cdataTypeOf :: BitmapData -> DataType
    dataTypeOf :: BitmapData -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BitmapData)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BitmapData)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BitmapData)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BitmapData)
    $cgmapT :: (forall b. Data b => b -> b) -> BitmapData -> BitmapData
    gmapT :: (forall b. Data b => b -> b) -> BitmapData -> BitmapData
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapData -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapData -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapData -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapData -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> BitmapData -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> BitmapData -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BitmapData -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BitmapData -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapData -> m BitmapData
    Data, Typeable)

    -- | Description of how the bitmap is layed out in memory.
    --
    --   * Prior version of Gloss assumed `BitmapFormat BottomToTop PxABGR`
    --
    data BitmapFormat
            = BitmapFormat
            { BitmapFormat -> RowOrder
    rowOrder    :: RowOrder
            , BitmapFormat -> PixelFormat
    pixelFormat :: PixelFormat }
            deriving (BitmapFormat -> BitmapFormat -> Bool
    (BitmapFormat -> BitmapFormat -> Bool)
    -> (BitmapFormat -> BitmapFormat -> Bool) -> Eq BitmapFormat
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: BitmapFormat -> BitmapFormat -> Bool
    == :: BitmapFormat -> BitmapFormat -> Bool
    $c/= :: BitmapFormat -> BitmapFormat -> Bool
    /= :: BitmapFormat -> BitmapFormat -> Bool
    Eq, Typeable BitmapFormat
    Typeable BitmapFormat =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> BitmapFormat -> c BitmapFormat)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c BitmapFormat)
    -> (BitmapFormat -> Constr)
    -> (BitmapFormat -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c BitmapFormat))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c BitmapFormat))
    -> ((forall b. Data b => b -> b) -> BitmapFormat -> BitmapFormat)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r)
    -> (forall u. (forall d. Data d => d -> u) -> BitmapFormat -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> BitmapFormat -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat)
    -> Data BitmapFormat
    BitmapFormat -> Constr
    BitmapFormat -> DataType
    (forall b. Data b => b -> b) -> BitmapFormat -> BitmapFormat
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> BitmapFormat -> u
    forall u. (forall d. Data d => d -> u) -> BitmapFormat -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BitmapFormat
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BitmapFormat -> c BitmapFormat
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BitmapFormat)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BitmapFormat)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BitmapFormat -> c BitmapFormat
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> BitmapFormat -> c BitmapFormat
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BitmapFormat
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c BitmapFormat
    $ctoConstr :: BitmapFormat -> Constr
    toConstr :: BitmapFormat -> Constr
    $cdataTypeOf :: BitmapFormat -> DataType
    dataTypeOf :: BitmapFormat -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BitmapFormat)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c BitmapFormat)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BitmapFormat)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c BitmapFormat)
    $cgmapT :: (forall b. Data b => b -> b) -> BitmapFormat -> BitmapFormat
    gmapT :: (forall b. Data b => b -> b) -> BitmapFormat -> BitmapFormat
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> BitmapFormat -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> BitmapFormat -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> BitmapFormat -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BitmapFormat -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> BitmapFormat -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> BitmapFormat -> m BitmapFormat
    Data, Typeable, Int -> BitmapFormat -> ShowS
    [BitmapFormat] -> ShowS
    BitmapFormat -> String
    (Int -> BitmapFormat -> ShowS)
    -> (BitmapFormat -> String)
    -> ([BitmapFormat] -> ShowS)
    -> Show BitmapFormat
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> BitmapFormat -> ShowS
    showsPrec :: Int -> BitmapFormat -> ShowS
    $cshow :: BitmapFormat -> String
    show :: BitmapFormat -> String
    $cshowList :: [BitmapFormat] -> ShowS
    showList :: [BitmapFormat] -> ShowS
    Show, Eq BitmapFormat
    Eq BitmapFormat =>
    (BitmapFormat -> BitmapFormat -> Ordering)
    -> (BitmapFormat -> BitmapFormat -> Bool)
    -> (BitmapFormat -> BitmapFormat -> Bool)
    -> (BitmapFormat -> BitmapFormat -> Bool)
    -> (BitmapFormat -> BitmapFormat -> Bool)
    -> (BitmapFormat -> BitmapFormat -> BitmapFormat)
    -> (BitmapFormat -> BitmapFormat -> BitmapFormat)
    -> Ord BitmapFormat
    BitmapFormat -> BitmapFormat -> Bool
    BitmapFormat -> BitmapFormat -> Ordering
    BitmapFormat -> BitmapFormat -> BitmapFormat
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: BitmapFormat -> BitmapFormat -> Ordering
    compare :: BitmapFormat -> BitmapFormat -> Ordering
    $c< :: BitmapFormat -> BitmapFormat -> Bool
    < :: BitmapFormat -> BitmapFormat -> Bool
    $c<= :: BitmapFormat -> BitmapFormat -> Bool
    <= :: BitmapFormat -> BitmapFormat -> Bool
    $c> :: BitmapFormat -> BitmapFormat -> Bool
    > :: BitmapFormat -> BitmapFormat -> Bool
    $c>= :: BitmapFormat -> BitmapFormat -> Bool
    >= :: BitmapFormat -> BitmapFormat -> Bool
    $cmax :: BitmapFormat -> BitmapFormat -> BitmapFormat
    max :: BitmapFormat -> BitmapFormat -> BitmapFormat
    $cmin :: BitmapFormat -> BitmapFormat -> BitmapFormat
    min :: BitmapFormat -> BitmapFormat -> BitmapFormat
    Ord)

    -- | Order of rows in an image are either:
    --
    --   * `TopToBottom` - the top row, followed by the next-lower row and so on.
    --   * `BottomToTop` - the bottom row followed by the next-higher row and so on.
    --
    data RowOrder
            = TopToBottom
            | BottomToTop
            deriving (RowOrder -> RowOrder -> Bool
    (RowOrder -> RowOrder -> Bool)
    -> (RowOrder -> RowOrder -> Bool) -> Eq RowOrder
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: RowOrder -> RowOrder -> Bool
    == :: RowOrder -> RowOrder -> Bool
    $c/= :: RowOrder -> RowOrder -> Bool
    /= :: RowOrder -> RowOrder -> Bool
    Eq, Typeable RowOrder
    Typeable RowOrder =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> RowOrder -> c RowOrder)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c RowOrder)
    -> (RowOrder -> Constr)
    -> (RowOrder -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c RowOrder))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RowOrder))
    -> ((forall b. Data b => b -> b) -> RowOrder -> RowOrder)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> RowOrder -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> RowOrder -> r)
    -> (forall u. (forall d. Data d => d -> u) -> RowOrder -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> RowOrder -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder)
    -> Data RowOrder
    RowOrder -> Constr
    RowOrder -> DataType
    (forall b. Data b => b -> b) -> RowOrder -> RowOrder
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> RowOrder -> u
    forall u. (forall d. Data d => d -> u) -> RowOrder -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RowOrder -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RowOrder -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RowOrder
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RowOrder -> c RowOrder
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RowOrder)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RowOrder)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RowOrder -> c RowOrder
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> RowOrder -> c RowOrder
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RowOrder
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c RowOrder
    $ctoConstr :: RowOrder -> Constr
    toConstr :: RowOrder -> Constr
    $cdataTypeOf :: RowOrder -> DataType
    dataTypeOf :: RowOrder -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RowOrder)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c RowOrder)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RowOrder)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RowOrder)
    $cgmapT :: (forall b. Data b => b -> b) -> RowOrder -> RowOrder
    gmapT :: (forall b. Data b => b -> b) -> RowOrder -> RowOrder
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RowOrder -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> RowOrder -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RowOrder -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> RowOrder -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> RowOrder -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> RowOrder -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> RowOrder -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> RowOrder -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> RowOrder -> m RowOrder
    Data, Typeable, Int -> RowOrder -> ShowS
    [RowOrder] -> ShowS
    RowOrder -> String
    (Int -> RowOrder -> ShowS)
    -> (RowOrder -> String) -> ([RowOrder] -> ShowS) -> Show RowOrder
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> RowOrder -> ShowS
    showsPrec :: Int -> RowOrder -> ShowS
    $cshow :: RowOrder -> String
    show :: RowOrder -> String
    $cshowList :: [RowOrder] -> ShowS
    showList :: [RowOrder] -> ShowS
    Show, Eq RowOrder
    Eq RowOrder =>
    (RowOrder -> RowOrder -> Ordering)
    -> (RowOrder -> RowOrder -> Bool)
    -> (RowOrder -> RowOrder -> Bool)
    -> (RowOrder -> RowOrder -> Bool)
    -> (RowOrder -> RowOrder -> Bool)
    -> (RowOrder -> RowOrder -> RowOrder)
    -> (RowOrder -> RowOrder -> RowOrder)
    -> Ord RowOrder
    RowOrder -> RowOrder -> Bool
    RowOrder -> RowOrder -> Ordering
    RowOrder -> RowOrder -> RowOrder
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: RowOrder -> RowOrder -> Ordering
    compare :: RowOrder -> RowOrder -> Ordering
    $c< :: RowOrder -> RowOrder -> Bool
    < :: RowOrder -> RowOrder -> Bool
    $c<= :: RowOrder -> RowOrder -> Bool
    <= :: RowOrder -> RowOrder -> Bool
    $c> :: RowOrder -> RowOrder -> Bool
    > :: RowOrder -> RowOrder -> Bool
    $c>= :: RowOrder -> RowOrder -> Bool
    >= :: RowOrder -> RowOrder -> Bool
    $cmax :: RowOrder -> RowOrder -> RowOrder
    max :: RowOrder -> RowOrder -> RowOrder
    $cmin :: RowOrder -> RowOrder -> RowOrder
    min :: RowOrder -> RowOrder -> RowOrder
    Ord, Int -> RowOrder
    RowOrder -> Int
    RowOrder -> [RowOrder]
    RowOrder -> RowOrder
    RowOrder -> RowOrder -> [RowOrder]
    RowOrder -> RowOrder -> RowOrder -> [RowOrder]
    (RowOrder -> RowOrder)
    -> (RowOrder -> RowOrder)
    -> (Int -> RowOrder)
    -> (RowOrder -> Int)
    -> (RowOrder -> [RowOrder])
    -> (RowOrder -> RowOrder -> [RowOrder])
    -> (RowOrder -> RowOrder -> [RowOrder])
    -> (RowOrder -> RowOrder -> RowOrder -> [RowOrder])
    -> Enum RowOrder
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: RowOrder -> RowOrder
    succ :: RowOrder -> RowOrder
    $cpred :: RowOrder -> RowOrder
    pred :: RowOrder -> RowOrder
    $ctoEnum :: Int -> RowOrder
    toEnum :: Int -> RowOrder
    $cfromEnum :: RowOrder -> Int
    fromEnum :: RowOrder -> Int
    $cenumFrom :: RowOrder -> [RowOrder]
    enumFrom :: RowOrder -> [RowOrder]
    $cenumFromThen :: RowOrder -> RowOrder -> [RowOrder]
    enumFromThen :: RowOrder -> RowOrder -> [RowOrder]
    $cenumFromTo :: RowOrder -> RowOrder -> [RowOrder]
    enumFromTo :: RowOrder -> RowOrder -> [RowOrder]
    $cenumFromThenTo :: RowOrder -> RowOrder -> RowOrder -> [RowOrder]
    enumFromThenTo :: RowOrder -> RowOrder -> RowOrder -> [RowOrder]
    Enum, RowOrder
    RowOrder -> RowOrder -> Bounded RowOrder
    forall a. a -> a -> Bounded a
    $cminBound :: RowOrder
    minBound :: RowOrder
    $cmaxBound :: RowOrder
    maxBound :: RowOrder
    Bounded)

    -- | Pixel formats describe the order of the color channels in memory.
    data PixelFormat
            = PxRGBA | PxABGR
            deriving (PixelFormat -> PixelFormat -> Bool
    (PixelFormat -> PixelFormat -> Bool)
    -> (PixelFormat -> PixelFormat -> Bool) -> Eq PixelFormat
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: PixelFormat -> PixelFormat -> Bool
    == :: PixelFormat -> PixelFormat -> Bool
    $c/= :: PixelFormat -> PixelFormat -> Bool
    /= :: PixelFormat -> PixelFormat -> Bool
    Eq, Typeable PixelFormat
    Typeable PixelFormat =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> PixelFormat -> c PixelFormat)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c PixelFormat)
    -> (PixelFormat -> Constr)
    -> (PixelFormat -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c PixelFormat))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e))
        -> Maybe (c PixelFormat))
    -> ((forall b. Data b => b -> b) -> PixelFormat -> PixelFormat)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r)
    -> (forall u. (forall d. Data d => d -> u) -> PixelFormat -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> PixelFormat -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat)
    -> Data PixelFormat
    PixelFormat -> Constr
    PixelFormat -> DataType
    (forall b. Data b => b -> b) -> PixelFormat -> PixelFormat
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> PixelFormat -> u
    forall u. (forall d. Data d => d -> u) -> PixelFormat -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c PixelFormat
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> PixelFormat -> c PixelFormat
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c PixelFormat)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c PixelFormat)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> PixelFormat -> c PixelFormat
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> PixelFormat -> c PixelFormat
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c PixelFormat
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c PixelFormat
    $ctoConstr :: PixelFormat -> Constr
    toConstr :: PixelFormat -> Constr
    $cdataTypeOf :: PixelFormat -> DataType
    dataTypeOf :: PixelFormat -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c PixelFormat)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c PixelFormat)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c PixelFormat)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c PixelFormat)
    $cgmapT :: (forall b. Data b => b -> b) -> PixelFormat -> PixelFormat
    gmapT :: (forall b. Data b => b -> b) -> PixelFormat -> PixelFormat
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> PixelFormat -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> PixelFormat -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> PixelFormat -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PixelFormat -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> PixelFormat -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> PixelFormat -> m PixelFormat
    Data, Typeable, Int -> PixelFormat -> ShowS
    [PixelFormat] -> ShowS
    PixelFormat -> String
    (Int -> PixelFormat -> ShowS)
    -> (PixelFormat -> String)
    -> ([PixelFormat] -> ShowS)
    -> Show PixelFormat
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> PixelFormat -> ShowS
    showsPrec :: Int -> PixelFormat -> ShowS
    $cshow :: PixelFormat -> String
    show :: PixelFormat -> String
    $cshowList :: [PixelFormat] -> ShowS
    showList :: [PixelFormat] -> ShowS
    Show, Eq PixelFormat
    Eq PixelFormat =>
    (PixelFormat -> PixelFormat -> Ordering)
    -> (PixelFormat -> PixelFormat -> Bool)
    -> (PixelFormat -> PixelFormat -> Bool)
    -> (PixelFormat -> PixelFormat -> Bool)
    -> (PixelFormat -> PixelFormat -> Bool)
    -> (PixelFormat -> PixelFormat -> PixelFormat)
    -> (PixelFormat -> PixelFormat -> PixelFormat)
    -> Ord PixelFormat
    PixelFormat -> PixelFormat -> Bool
    PixelFormat -> PixelFormat -> Ordering
    PixelFormat -> PixelFormat -> PixelFormat
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: PixelFormat -> PixelFormat -> Ordering
    compare :: PixelFormat -> PixelFormat -> Ordering
    $c< :: PixelFormat -> PixelFormat -> Bool
    < :: PixelFormat -> PixelFormat -> Bool
    $c<= :: PixelFormat -> PixelFormat -> Bool
    <= :: PixelFormat -> PixelFormat -> Bool
    $c> :: PixelFormat -> PixelFormat -> Bool
    > :: PixelFormat -> PixelFormat -> Bool
    $c>= :: PixelFormat -> PixelFormat -> Bool
    >= :: PixelFormat -> PixelFormat -> Bool
    $cmax :: PixelFormat -> PixelFormat -> PixelFormat
    max :: PixelFormat -> PixelFormat -> PixelFormat
    $cmin :: PixelFormat -> PixelFormat -> PixelFormat
    min :: PixelFormat -> PixelFormat -> PixelFormat
    Ord, Int -> PixelFormat
    PixelFormat -> Int
    PixelFormat -> [PixelFormat]
    PixelFormat -> PixelFormat
    PixelFormat -> PixelFormat -> [PixelFormat]
    PixelFormat -> PixelFormat -> PixelFormat -> [PixelFormat]
    (PixelFormat -> PixelFormat)
    -> (PixelFormat -> PixelFormat)
    -> (Int -> PixelFormat)
    -> (PixelFormat -> Int)
    -> (PixelFormat -> [PixelFormat])
    -> (PixelFormat -> PixelFormat -> [PixelFormat])
    -> (PixelFormat -> PixelFormat -> [PixelFormat])
    -> (PixelFormat -> PixelFormat -> PixelFormat -> [PixelFormat])
    -> Enum PixelFormat
    forall a.
    (a -> a)
    -> (a -> a)
    -> (Int -> a)
    -> (a -> Int)
    -> (a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> [a])
    -> (a -> a -> a -> [a])
    -> Enum a
    $csucc :: PixelFormat -> PixelFormat
    succ :: PixelFormat -> PixelFormat
    $cpred :: PixelFormat -> PixelFormat
    pred :: PixelFormat -> PixelFormat
    $ctoEnum :: Int -> PixelFormat
    toEnum :: Int -> PixelFormat
    $cfromEnum :: PixelFormat -> Int
    fromEnum :: PixelFormat -> Int
    $cenumFrom :: PixelFormat -> [PixelFormat]
    enumFrom :: PixelFormat -> [PixelFormat]
    $cenumFromThen :: PixelFormat -> PixelFormat -> [PixelFormat]
    enumFromThen :: PixelFormat -> PixelFormat -> [PixelFormat]
    $cenumFromTo :: PixelFormat -> PixelFormat -> [PixelFormat]
    enumFromTo :: PixelFormat -> PixelFormat -> [PixelFormat]
    $cenumFromThenTo :: PixelFormat -> PixelFormat -> PixelFormat -> [PixelFormat]
    enumFromThenTo :: PixelFormat -> PixelFormat -> PixelFormat -> [PixelFormat]
    Enum, PixelFormat
    PixelFormat -> PixelFormat -> Bounded PixelFormat
    forall a. a -> a -> Bounded a
    $cminBound :: PixelFormat
    minBound :: PixelFormat
    $cmaxBound :: PixelFormat
    maxBound :: PixelFormat
    Bounded)

    instance Show BitmapData where
     show :: BitmapData -> String
    show BitmapData
    _ = String
    "BitmapData"

    -- | Generates the point path to display the bitmap centred
    bitmapPath :: Float -> Float -> [(Float, Float)]
    bitmapPath :: Float -> Float -> [(Float, Float)]
    bitmapPath Float
    width Float
    height
     = [(-Float
    width', -Float
    height'), (Float
    width', -Float
    height'), (Float
    width', Float
    height'), (-Float
    width', Float
    height')]
     where  width' :: Float
    width'  = Float
    width  Float -> Float -> Float
    forall a. Fractional a => a -> a -> a
    / Float
    2
            height' :: Float
    height' = Float
    height Float -> Float -> Float
    forall a. Fractional a => a -> a -> a
    / Float
    2

    -- | Frees the allocated memory given to OpenGL to avoid a memory leak
    freeBitmapData :: Ptr Word8 -> IO ()
    freeBitmapData :: Ptr Word8 -> IO ()
    freeBitmapData Ptr Word8
    p = Ptr Word8 -> IO ()
    forall a. Ptr a -> IO ()
    free Ptr Word8
    p
    {-# INLINE freeBitmapData #-}