Unified CTOR to create empty bitmap.
Unified CTOR tor create bitmap from preexisting data.
Creates an empty bitmap.
Creates a bitmap from an array.
Creates an empty bitmap.
Creates a bitmap from an array.
CTOR for 1 bit bitmaps with no preexisting source.
CTOR to convert 8bit aligned bitmaps to 32/64bit ones.
CTOR for 1 bit bitmaps with a preexisting source. Alignment and padding is for size_t (32 and 64 bit, on their respected systems)
Clears the Bitmap
Generates a standard collision model by checking against a transparency value (default vaule is T.init).
Offsets all indexes in the bitmap by a certain value. Keeps zeroth index (usually for transparency) if needed. Useful when converting bitmaps.
Returns the pixel at the given position.
Returns the pixel at the given position.
Returns the pixel at the given position.
Resizes the bitmap. NOTE: It's not for scaling.
Resizes the array behind the bitmap.
Tests a single chunk of pixels between two 1 bit bitmaps for collision, using a single chunk (size_t) of pixels.
Tests a single chunk of pixels between two 1 bit bitmaps for collision, using a single chunk (size_t) of pixels, if other is wider than what size_t allows.
Tests two collision models against each other.
Returns a 2D slice (window) of the bitmap.
Returns a 2D slice (window) of the bitmap.
Writes the pixel at the given position.
Writes the pixel at the given position.
Writes the pixel at the given position.
Total length of a line in bits
Image data.
Returns the width of the bitmap.
Returns the height of the bitmap.
Returns the palette pointer. DEPRECATED!
Sets the palette pointer. Make sure that you set it to a valid memory location. DEPRECATED!
Returns the wordlength of the type
Clears the whole bitmap to a transparent color.
Implements a bitmap with variable bit depth. Use the aliases to initialize them.
Note on 16 bit bitmaps: It's using the master palette, It's not implementing any 16 bit RGB or RGBA color space directly. Can implement such colorspaces via proper lookup tables.
Note on 4 bit bitmaps: It's width needs to be an even number (for rendering simplicity), otherwise it'll cause an exception.
Note on 1 bit bitmaps: Uses size_t based paddings for more than one bit testing at the time in the future, through the use of logic functions.