Drawing Text and Shapes

Now that we have the panels wired up as we want, we can ues the more advanced parts of the library for drawing shapes and text. Depending on how many panels you have hooked up, the total 'width' will be different (24 pixels per panel) so call width() to get the total pixel width from the matrix object. You can also call height() - which will always be 16 in this case.

The Adafruit_GFX library for Arduino provides a common syntax and set of graphics functions for all of our TFT, LCD and OLED displays. This allows Arduino sketches to easily be adapted between display types with minimal fuss…and any new features, performance improvements and bug fixes will immediately apply across our complete offering of color displays.

The GFX library is what lets you draw points, lines, rectangles, round-rects, triangles, text, etc.

Check out our detailed tutorial here http://learn.adafruit.com/adafruit-gfx-graphics-library

This guide was first published on Jul 31, 2013. It was last updated on Jul 31, 2013.

This page (Drawing) was last updated on May 11, 2021.

Text editor powered by tinymce.