MCUFRIEND line width adjustment for tft.drawRoundRect() function

  1. How do I set a wider line width when using the subject function?

  2. Where do I find a text listing of the functions within the MCUFRIEND_kbv library?

Thanks

Some documentation is provided in the readme on the home page of the library:

Most important:

MCUFRIEND_kbv inherits all the methods from the Adafruit_GFX class: Overview | Adafruit GFX Graphics Library | Adafruit Learning System and Print class: Serial.print() - Arduino Reference

The only "new" methods are hardware related: vertScroll(), readGRAM(), readPixel(), setAddrWindow(), pushColors(), readID(), begin()

readReg(), pushCommand() access the controller registers

The Adafruit_GFX library provides the generic code that would be needed to control any display. So all the MCUFRIEND_kbv library has to do is provide the code to interface with the specific hardware of the mcufriend Shields. So all that nice documentation on the Adafruit website applies to the MCUFRIEND_kbv library.

Similarly, the Print class of the Arduino core library provides the generic code needed to print any data type. Unfortunately, Arduino has not provided any universal documentation of the Print class, but the Serial reference pages do document the Print class. The only tricky thing is they document it as it applies to serial communication. So you do need to extrapolate how the same would apply to the MCUFRIEND_kbv library. This is really not a stretch, since there's little difference between printing to the Serial Monitor and printing to the display on your mcufriend Shield.

The readme also says:

Build any of the Examples from the File->Examples->Mcufriend_kbv menu. e.g.

graphictest_kbv.ino: shows all the methods.

So File->Examples->Mcufriend_kbv->graphictest_kbv will provide you with a demonstration of all the functions of the library as they are used in a sketch.

If you want to draw a rounded rectangle which is thicker than 1 pixel:

int thick = 3;
int radius = 5;
for (int i = 0; i < thick; i++) {
     tft.drawRoundedRect(x + i, y + i, w - i*2, h - i*2, radius, TFT_RED);
}

If you are drawing very thick lines you might alter the radius in the loop.

As pert has suggested: run all the examples. See what interests you.

Read the Adafruit_GFX documentation. All the graphics, text, button, ... methods are listed in Adafruit_GFX.h

Most importantly, if you don't understand something, quote a library example sketch by name.
Or post a link to the code on the internet.

Most Arduino graphics programs use "Adafruit_GFX" graphics methods.
So even if a program was written for a different screen, it is fairly easy to adapt for MCUFRIEND_kbv

Ideally start with an example. Adapt for your project.
When you have more confidence, design your own programs with pencil and paper.

If unsure how to code a section from your flowchart. Post your drawings. Readers will help when presented with a nicely drawn diagram and clearly written design notes.

David.

Thanks for the tips.