Skip to content
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

Bug? 32bit color used in TFT_eSprite::pushRotated #1735

Closed
Bluebrain2000 opened this issue Mar 22, 2022 · 1 comment
Closed

Bug? 32bit color used in TFT_eSprite::pushRotated #1735

Bluebrain2000 opened this issue Mar 22, 2022 · 1 comment

Comments

@Bluebrain2000
Copy link

Bluebrain2000 commented Mar 22, 2022

in Sprite.cpp
bool TFT_eSprite::pushRotated(int16_t angle, uint32_t transp)
... uses 32 bit color and "tries" to swap bytes with:
tpcolor = tpcolor>>8 | tpcolor<<8;
especially this part messes it up.
e.g.:
0x1122>>8 = 0x1122
0x1122<<8 = 0x0011
with the -or- operator, it becomes:
0x112211 which does not make much sense, because the compare with a uint16_t color value further below:
if (tpcolor == rp) {
will never be true.

@Bodmer Bodmer closed this as completed in 810aa98 Mar 22, 2022
@Bodmer
Copy link
Owner

Bodmer commented Mar 22, 2022

Should be fixed now in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants