Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | None |
Manipulating bitmaps
- data Bitmap = BitmapData (Array F DIM3 Word8) (Maybe Int)
- _BitmapArray :: Functor f => (Array F DIM3 Word8 -> f (Array F DIM3 Word8)) -> Bitmap -> f Bitmap
- _BitmapHash :: Functor f => (Maybe Int -> f (Maybe Int)) -> Bitmap -> f Bitmap
- bitmapSize :: Bitmap -> (Int, Int)
- loadBitmapFromFile :: FilePath -> IO Bitmap
- toBitmap :: Array F DIM3 Word8 -> Bitmap
- toStableBitmap :: Array F DIM3 Word8 -> Bitmap
- makeStableBitmap :: Array F DIM3 Word8 -> IO Bitmap
- onBitmapWithHashable :: Hashable h => h -> (Array F DIM3 Word8 -> Array F DIM3 Word8) -> Bitmap -> Bitmap
- cropBitmap :: Bitmap -> (Int, Int) -> (Int, Int) -> Bitmap
Basic types and functions
Concrete bitmap data. Internal representation is stored as y * x * RGBA.
_BitmapArray :: Functor f => (Array F DIM3 Word8 -> f (Array F DIM3 Word8)) -> Bitmap -> f BitmapSource
_BitmapHash :: Functor f => (Maybe Int -> f (Maybe Int)) -> Bitmap -> f BitmapSource
_BitmapHash
:: Lens'Bitmap
(Maybe
Int
)
Loading from a file
Constructing bitmaps
toStableBitmap :: Array F DIM3 Word8 -> BitmapSource
Create stable Bitmap
from the given array and compute the hash.
makeStableBitmap :: Array F DIM3 Word8 -> IO BitmapSource
Create stable Bitmap
with unique hash from the given array.