|
| Bitmap (int width, int height) |
| Constructor - uninitialized data. More...
|
|
| Bitmap (int width, int height, Gempyre::Color::type color) |
| Constructor - with a single color data. More...
|
|
| Bitmap () |
| Constructor - zero size, use. More...
|
|
| Bitmap (Bitmap &&other)=default |
| Move constructor.
|
|
| Bitmap (const Bitmap &other)=default |
| Copy constructor - does not copy the data, for deep copy. More...
|
|
| ~Bitmap () |
| Destructor.
|
|
| Bitmap (const std::vector< uint8_t > &image_data) |
| Create bitmap from byte array. More...
|
|
std::vector< uint8_t > | png_image () const |
| Convert a bitmap to PNG. More...
|
|
Bitmap & | operator= (const Bitmap &other)=default |
| Copy operator does only shallow copy, for deep copy. More...
|
|
Bitmap & | operator= (Bitmap &&other)=default |
| Move operator.
|
|
void | create (int width, int height) |
| Create bitmap bytes. More...
|
|
Bitmap | clone () const |
| Deep copy bitmap bytes.
|
|
void | set_pixel (int x, int y, Color::type color) |
| Set a single pixel.
|
|
void | set_alpha (int x, int y, Color::type alpha) |
| Set a singe pixel's alpha value.
|
|
Color::type | pixel (int x, int y) const |
| Get a single pixel.
|
|
int | width () const |
| Get width.
|
|
int | height () const |
| Get height.
|
|
void | swap (Bitmap &other) |
| Swap bitmap data with another.
|
|
void | draw_rect (const Gempyre::Rect &rect, Color::type color) |
| Draw a rect with a color in bitmap.
|
|
void | merge (int x, int y, const Bitmap &other) |
| Draw a Bitmap on this bitmap - merge alpha.
|
|
void | merge (const Bitmap &other) |
| Draw a Bitmap on this bitmap - merge alpha.
|
|
void | tile (int x, int y, const Bitmap &other) |
| Draw a Bitmap on this bitmap - replace area.
|
|
void | tile (int x, int y, const Bitmap &other, int width, int height) |
| Draw a Bitmap withing extents on this bitmap - replace area.
|
|
void | tile (int x, int y, const Bitmap &other, int other_x, int other_y, int width, int height) |
| Draw a Bitmap withing extents on this bitmap - replace area.
|
|
Bitmap | clip (const Gempyre::Rect &rect) const |
| Create a new bitmap from part of bitmap.
|
|
bool | empty () const |
| return true if there is not data
|
|
const uint8_t * | const_data () const |
| underlaying data
|
|
template<class T , std::enable_if_t< std::is_same_v< typename T::value_type, Color::type >, int > = 0> |
bool | set_data (const T &bytes, size_t offset=0) |
| Copy pixels into bitmap. More...
|
|
Bitmap for Gempyre Graphics.