Adafruit-GFX-Library icon indicating copy to clipboard operation
Adafruit-GFX-Library copied to clipboard

Added the ability to define a text window.

Open ukmaker opened this issue 2 years ago • 2 comments

This PR adds the ability to define a window for text. Subsequent calls to print(), write() etc will cause the text to be printed within the window. Lines which are too long to fit will be clipped, if wrapping is not is enabled, at whole character boundaries.

Added functions allow to set or remove the window. Additional helper functions have been added to get the current font, the font height and whether wrapping is enabled. getTextBounds() has been modified to take account of windowing.

These changes simplify text widget code.

ukmaker avatar Apr 27 '22 16:04 ukmaker