Safe Haskell | None |
---|---|
Language | Haskell98 |
Functions to load bitmap data from various places.
- data BitmapData :: *
- bitmapOfForeignPtr :: Int -> Int -> ForeignPtr Word8 -> Bool -> Picture
- bitmapOfByteString :: Int -> Int -> ByteString -> Bool -> Picture
- bitmapOfBMP :: BMP -> Picture
- loadBMP :: FilePath -> IO Picture
Documentation
bitmapOfForeignPtr :: Int -> Int -> ForeignPtr Word8 -> Bool -> Picture
O(1). Use a ForeignPtr
of RGBA data as a bitmap with the given
width and height.
bitmapOfByteString :: Int -> Int -> 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.