mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2024-09-20 17:46:09 -04:00
Fix off by 1 error
Characters are printed as 5 font data lines and 1 separator line. With the wrong left clip test, characters at x=-5*size would not clear x=0.
This commit is contained in:
parent
1ca9286a61
commit
e2aa245283
@ -375,7 +375,7 @@ void Adafruit_GFX::drawChar(int16_t x, int16_t y, unsigned char c,
|
||||
|
||||
if((x >= _width) || // Clip right
|
||||
(y >= _height) || // Clip bottom
|
||||
((x + 5 * size - 1) < 0) || // Clip left
|
||||
((x + 6 * size - 1) < 0) || // Clip left
|
||||
((y + 8 * size - 1) < 0)) // Clip top
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user