Added get_width and get_height
parent
331a5749b9
commit
930ba8b5c1
|
@ -46,6 +46,14 @@ void Bitmap::clear() {
|
|||
}
|
||||
|
||||
|
||||
size_t Bitmap::get_width() const {
|
||||
return width;
|
||||
}
|
||||
|
||||
|
||||
size_t Bitmap::get_height() const {
|
||||
return height;
|
||||
}
|
||||
|
||||
void Bitmap::setpixel(
|
||||
size_t row,
|
||||
|
@ -54,6 +62,7 @@ void Bitmap::setpixel(
|
|||
uint8_t g,
|
||||
uint8_t b
|
||||
) {
|
||||
|
||||
data[row][col] = std::make_tuple(r, g, b);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,9 @@ class Bitmap {
|
|||
|
||||
void save(const char *filename) const;
|
||||
|
||||
size_t get_width() const;
|
||||
size_t get_height() const;
|
||||
|
||||
private:
|
||||
size_t width;
|
||||
size_t height;
|
||||
|
|
Loading…
Reference in New Issue