mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Add Painter.draw_bitmap for Bitmap types.
This commit is contained in:
parent
deade67fd8
commit
76013a656c
@ -54,6 +54,10 @@ int Painter::draw_string(Point p, const Style& style, const std::string text) {
|
||||
return width;
|
||||
}
|
||||
|
||||
void Painter::draw_bitmap(const Point p, const Bitmap& bitmap, const Color foreground, const Color background) {
|
||||
display.draw_bitmap(p, bitmap.size, bitmap.data, foreground, background);
|
||||
}
|
||||
|
||||
void Painter::draw_hline(Point p, int width, const Color c) {
|
||||
display.fill_rectangle({ p, { width, 1 } }, c);
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ public:
|
||||
|
||||
int draw_string(Point p, const Style& style, const std::string text);
|
||||
|
||||
void draw_bitmap(const Point p, const Bitmap& bitmap, const Color background, const Color foreground);
|
||||
|
||||
void draw_rectangle(const Rect r, const Color c);
|
||||
void fill_rectangle(const Rect r, const Color c);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user