Skip to content

Conversation

boul51
Copy link

@boul51 boul51 commented Jan 2, 2015

Hi,
I noticed a bug in the ST7735 TFT library in drawFastHLine and drawFastVLine functions. The drawn line is one pixel shorter than it should be. The issue can be reproduced by the following setup function.
Without this commit, the horizontal line (drawn using drawFastHLine) is one pixel shorter than the 45° line.
This is explained by the while (w--) loop preceding the spiwrite call.
With this commit both lines are 2 pixels long.

void setup() {
TFTscreen.begin();
TFTscreen.background(0, 0, 0);
TFTscreen.stroke(255, 0, 0);
TFTscreen.line(0, 0, 1, 1); // 45° line, OK (pixels [0,0] and [1,1] are filled
TFTscreen.line(0, 10, 1, 10); // Horiz. line, NOK (only pixel [0,10] is filled)
}

@cmaglie cmaglie added Type: Bug Library: TFT The TFT Arduino library labels Apr 15, 2015
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: TFT The TFT Arduino library Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants