data Bitmap bits = Bitmap Size (Maybe Point) bits instance Eq bits => Eq (Bitmap bits) instance Functor Bitmap instance Ord bits => Ord (Bitmap bits) instance Read bits => Read (Bitmap bits) instance Show bits => Show (Bitmap bits) instance Graphic (Bitmap PixmapId) instance Graphic (Bitmap [Int]) type Bit = Bool bm :: Int -> Int -> bits -> Bitmap bits bits2bitmap :: Point -> [Bit] -> Bitmap [Int] doubleBM :: Bitmap [Int] -> Bitmap [Int] explodeBM :: Bitmap [Int] -> Bitmap [[Bit]] implodeBM :: Bitmap [[Bit]] -> Bitmap [Int]
Bitmap are used to represent bitmaps (images
with one bit per pixel). The type allows the bits in a bitmap to
be represented in a few different ways:
Bitmap [[Bit]]).
Bitmap [Int]), a more compact
representation that corresponds to
how they are represented in X bitmap files (file extension .xbm or
.h, since they can be #included and used directly as bitmap data
in C programs).
Functions explodeBM, implodeBM and bitmapFromData
convert between these representations.
Functions bm and bits2bitmap are convenience functions
for creating bitmaps without a hotspot.
The function doubleBM doubles the size (width and height) of a bitmap.