Commit 6d015d6e authored by Bodmer's avatar Bodmer

Fix #2400 for GC9A01

An odd one this. Pixels get lost in a stream with the GC9A01. It appears the GC9A01 has a pixel stream time-out that stops new pixels in a started stream from being rendered.  No other  supported display behaves this way!

This is a GC9A01 specific patch.
parent 3d018602
......@@ -4464,16 +4464,25 @@ void TFT_eSPI::drawWedgeLine(float ax, float ay, float bx, float by, float ar, f
// Track edge to minimise calculations
if (!endX) { endX = true; xs = xp; }
if (alpha > HiAlphaTheshold) {
if (swin) { setWindow(xp, yp, width()-1, yp); swin = false; }
#ifdef GC9A01_DRIVER
drawPixel(xp, yp, fg_color);
#else
if (swin) { setWindow(xp, yp, x1, yp); swin = false; }
pushColor(fg_color);
#endif
continue;
}
//Blend color with background and plot
if (bg_color == 0x00FFFFFF) {
bg = readPixel(xp, yp); swin = true;
}
if (swin) { setWindow(xp, yp, width()-1, yp); swin = false; }
#ifdef GC9A01_DRIVER
uint16_t pcol = alphaBlend((uint8_t)(alpha * PixelAlphaGain);
drawPixel(xp, yp, pcol, fg_color, bg));
#else
if (swin) { setWindow(xp, yp, x1, yp); swin = false; }
pushColor(alphaBlend((uint8_t)(alpha * PixelAlphaGain), fg_color, bg));
#endif
}
}
......@@ -4492,16 +4501,25 @@ void TFT_eSPI::drawWedgeLine(float ax, float ay, float bx, float by, float ar, f
// Track line boundary
if (!endX) { endX = true; xs = xp; }
if (alpha > HiAlphaTheshold) {
if (swin) { setWindow(xp, yp, width()-1, yp); swin = false; }
#ifdef GC9A01_DRIVER
drawPixel(xp, yp, fg_color);
#else
if (swin) { setWindow(xp, yp, x1, yp); swin = false; }
pushColor(fg_color);
#endif
continue;
}
//Blend colour with background and plot
if (bg_color == 0x00FFFFFF) {
bg = readPixel(xp, yp); swin = true;
}
if (swin) { setWindow(xp, yp, width()-1, yp); swin = false; }
#ifdef GC9A01_DRIVER
uint16_t pcol = alphaBlend((uint8_t)(alpha * PixelAlphaGain);
drawPixel(xp, yp, pcol, fg_color, bg));
#else
if (swin) { setWindow(xp, yp, x1, yp); swin = false; }
pushColor(alphaBlend((uint8_t)(alpha * PixelAlphaGain), fg_color, bg));
#endif
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment