mirror of
https://github.com/esphome/esphome.git
synced 2026-01-10 04:00:51 -07:00
[hub75] Add clipping check (#12762)
This commit is contained in:
committed by
Jonathan Swoboda
parent
5b5cede5f9
commit
dd855985be
@@ -111,6 +111,9 @@ void HOT HUB75Display::draw_pixel_at(int x, int y, Color color) {
|
||||
if (x >= this->get_width_internal() || x < 0 || y >= this->get_height_internal() || y < 0) [[unlikely]]
|
||||
return;
|
||||
|
||||
if (!this->get_clipping().inside(x, y))
|
||||
return;
|
||||
|
||||
driver_->set_pixel(x, y, color.r, color.g, color.b);
|
||||
App.feed_wdt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user