line of code to do this
tft.drawRoundRect(180, 200, 120, 40, 6, ILI9341_CYAN);
Code:tft.drawRoundRect(180, 200, 120, 40, 6, ILI9341_CYAN);
C:\Users\peter\AppData\Local\Temp\arduino_build_118287\libraries\ILI9341_t3DMA\ILI9341_t3DMA.cpp.o: In function `ILI9341_t3DMA::drawChar(short, short, unsigned char, unsigned short, unsigned short, unsigned char)':
D:\Users\peter\Documents\Arduino\libraries\ILI9341_t3DMA/ILI9341_t3DMA.cpp:984: [COLOR="#FF0000"]undefined reference to `glcdfont'[/COLOR]
D:\Users\peter\Documents\Arduino\libraries\ILI9341_t3DMA/ILI9341_t3DMA.cpp:947: [COLOR="#FF0000"]undefined reference to `glcdfont'[/COLOR]
collect2.exe: error: ld returned 1 exit status
_t3 _t3n _t3n (FB)
Screen fill 224906 224954
Text 11223 11400
Lines 58387 58377
Horiz/Vert Lines 18382 18398
Rectangles (outline) 11683 11695
Rectangles (filled) 462091 462246 63073
Circles (filled) 69017 70225
Circles (outline) 53691 55378
Triangles (outline) 14104 14115
Triangles (filled) 153623 154156
Rounded rects (outline) 24579 25029
Rounded rects (filled) 504445 504954 73661
tft.setFont(Arial_32_Bold);
tft.setTextColor(ILI9341_RED, ILI9341_BLACK);
tft.print("Test");
I've having a problem with the ILI9341_t3 library.
Everything seems to work fine except the background when printing text.
Here's an example
I'm drawing a picture on the screen, then I'm drawing text on top of it.
I can still see the image through the text.Code:tft.setFont(Arial_32_Bold); tft.setTextColor(ILI9341_RED, ILI9341_BLACK); tft.print("Test");
I've tried multiple font sizes as well as several combinations of colors.
The first color is always the color of the text and the second color is ignored.
AFAIK - writes are transparent - only the pixels specified by the font are written for the given character.
To 'clear' space calculate and draw a filled rectangle of desired color first.
To update that space faster than rectangle redraw - re-write the prior chars in background color - then relocate and then in the new in foreground color.
Just wanted to let you know so that when you see the pull request (from "projectitis") you'll know what it's about!
In the mean time, for the fun of it, you might try integrating it with my version (github.com/kurte/ili9341_t3n)Hi Paul,
I added my support for anti-aliased fonts to the ILI9341_t3 library. It simply uses the textbgcolor to work out "anti-aliased" pixel values (so doesn't read from the display first).
The code branches within drawFontChar based on whether your font support AA or not, but those are the only real changes to the code.
Just wanted to let you know so that when you see the pull request (from "projectitis") you'll know what it's about!
I've added a set of anti-aliased fonts to the library (OpenSans).
I also added a new example which adds the original ILI9341_t3_font_t (BDF) drawing to "graphics test", as well as ILI9341_t3_font_t using anti-aliasing.
The speed is not great, I suspect because of the use of Pixel to plot each individual pixel, but I welcome any improvements!
LCD fonts: 11238
BDF fonts: 14979
Anti-aliased BDF fonts: 67120
Cheers.
@KurtE and @Projectitis
I incorporated the changes into my copy of the ILI9341_t3 library and the fonts do look nice - but as you said does take a bit longer but the quality is nicer especially for the larger fonts. I did test with the scrolltest.ino sketch but the fonts didn't seem to work as well but I don't have time to debug right now maybe later. But it does work.