Safe Haskell | None |
---|---|
Language | Haskell98 |
Graphics.Gloss.Data.Bitmap
Description
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 BitmapFormat :: * #
Description of how the bitmap is layed out in memory.
- Prior version of Gloss assumed `BitmapFormat BottomToTop PxAGBR`
Constructors
BitmapFormat | |
Fields |
Instances
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.
Constructors
TopToBottom | |
BottomToTop |
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.