Added get_width and get_height

master
Mark 2022-06-24 19:57:12 -07:00
parent 331a5749b9
commit 930ba8b5c1
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
2 changed files with 12 additions and 0 deletions

View File

@ -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( void Bitmap::setpixel(
size_t row, size_t row,
@ -54,6 +62,7 @@ void Bitmap::setpixel(
uint8_t g, uint8_t g,
uint8_t b uint8_t b
) { ) {
data[row][col] = std::make_tuple(r, g, b); data[row][col] = std::make_tuple(r, g, b);
} }

View File

@ -22,6 +22,9 @@ class Bitmap {
void save(const char *filename) const; void save(const char *filename) const;
size_t get_width() const;
size_t get_height() const;
private: private:
size_t width; size_t width;
size_t height; size_t height;