Skip to content

TFT ST7735: Fixed length bug in drawFastHLine and drawFastVLine #2528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: ide-1.5.x
Choose a base branch
from

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