Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libraries/TFT/src/utility/Adafruit_ST7735.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ void Adafruit_ST7735::drawPixel(int16_t x, int16_t y, uint16_t color) {
void Adafruit_ST7735::drawFastVLine(int16_t x, int16_t y, int16_t h,
uint16_t color) {

// Needed to achieve correct line length
h++;

// Rudimentary clipping
if((x >= _width) || (y >= _height)) return;
if((y+h-1) >= _height) h = _height-y;
Expand All @@ -465,6 +468,9 @@ void Adafruit_ST7735::drawFastVLine(int16_t x, int16_t y, int16_t h,
void Adafruit_ST7735::drawFastHLine(int16_t x, int16_t y, int16_t w,
uint16_t color) {

// Needed to achieve correct line length
w++;

// Rudimentary clipping
if((x >= _width) || (y >= _height)) return;
if((x+w-1) >= _width) w = _width-x;
Expand Down