4 Commits
Author SHA1 Message Date
Jeff EplerandGitHub f80daa51c9 GFXcanvas: Allow subclass to take charge of buffer allocations (#465)
* GFXcanvas: Allow subclass to take charge of buffer allocations

In Adafruit_dvhstx, the low level driver takes charge of the framebuffer
allocations. Consequently, any allocation by the GFXcanvas class would be
an unused waste of memory.

Introduce a new constructor parameter `bool allocate_buffer=true`. The
default preserves the old behavior of allocating the buffer in the
constructor and freeing it in the destructor, while passing in `false`
skips buffer allocation & freeing.

In this case, the subclass must allocate the buffer before the first
drawing operation (such as in its constructor or begin method), and
free it in its own destructor or end method.

The subclass can also freely change the buffer pointer at runtime, for
instance in a swap method if the underlying framebuffer is double-buffered.

* experimentally run a different clang-format

This runs version 19.1.7: uvx clang-format -i *.cpp *.h

the changes look similar to what was shown during CI

* undo one edit that ci doesn't like
2025-02-19 10:15:01 -05:00
Jeff EplerandGitHub 1124b157d5 Merge pull request #394 from Rotzbua/patch-1
Doc: fix link to Adafruit GFX github repository
2025-02-18 20:14:09 -06:00
Jeff EplerandGitHub 19ae104713 Merge pull request #313 from jayzakk/lgt8-support
add support for LGT8F cpu
2025-02-18 19:55:49 -06:00
Jeff EplerandGitHub 8830fe2aee Merge pull request #449 from nocnokneo/fix-uint8-pin-overflow
Fix broken reset logic if reset pin exceeds 127 due to int8 overflow
2025-02-18 19:52:33 -06:00