Safe Haskell | None |
---|---|
Language | Haskell98 |
Functions to load bitmap data from various places.
- data BitmapData :: *
- data BitmapFormat :: * = BitmapFormat {}
- data RowOrder :: *
- data PixelFormat :: *
- bitmapOfForeignPtr :: Int -> Int -> BitmapFormat -> ForeignPtr Word8 -> Bool -> Picture
- bitmapOfByteString :: Int -> Int -> BitmapFormat -> ByteString -> Bool -> Picture
- bitmapOfBMP :: BMP -> Picture
- loadBMP :: FilePath -> IO Picture
Documentation
data BitmapData :: * #
Abstract 32-bit RGBA bitmap data.
data BitmapFormat :: * #
Description of how the bitmap is layed out in memory.
- Prior version of Gloss assumed `BitmapFormat BottomToTop PxAGBR`
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 PixelFormat :: * #
Pixel formats describe the order of the color channels in memory.
bitmapOfForeignPtr :: Int -> Int -> BitmapFormat -> ForeignPtr Word8 -> Bool -> Picture #
O(1). Use a ForeignPtr
of RGBA data as a bitmap with the given
width and height.
The boolean flag controls whether Gloss should cache the data
between frames for speed. If you are programatically generating
the image for each frame then use False
. If you have loaded it
from a file then use True
.
bitmapOfByteString :: Int -> Int -> BitmapFormat -> ByteString -> Bool -> Picture #
O(size). Copy a ByteString
of RGBA data into a bitmap with the given
width and height.
The boolean flag controls whether Gloss should cache the data
between frames for speed. If you are programatically generating
the image for each frame then use False
. If you have loaded it
from a file then use True
.
bitmapOfBMP :: BMP -> Picture #
O(size). Copy a BMP
file into a bitmap.