Fix for drawMask() when x < 0
This commit is contained in:
@@ -326,6 +326,12 @@ void BitmapBuffer::drawMask(coord_t x, coord_t y, const BitmapBuffer * mask, Lcd
|
|||||||
width = xmax - x;
|
width = xmax - x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (x < 0) {
|
||||||
|
width += x;
|
||||||
|
offset -= x;
|
||||||
|
x = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (y >= ymax || x >= xmax || width <= 0 || x + width < xmin || y + height < ymin) {
|
if (y >= ymax || x >= xmax || width <= 0 || x + width < xmin || y + height < ymin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user