Commit Graph

23 Commits

Author SHA1 Message Date
Phil Howard 7abe4aae7f ST7789: Experimental 8bit framebuffer. 2022-06-13 20:11:09 +01:00
Luyáš Říha 746b47a601 fix micropython breakout_roundlcd rendering of graphics primitives 2022-04-18 20:40:05 +02:00
Phil Howard 3b8dcecd8e Pico Graphics: Move bitmap fonts into generic library.
* Add bitmap font support into Badger 2040
2022-03-30 15:10:52 +01:00
Phil Howard 6b86c5618c Reduce size of space slightly for tighter text 2021-03-29 13:33:48 +01:00
Phil Howard 879bb673f5 Drop £ from text demo
£ is not an ASCII character and resulted in out of range mystery memory garbage being displayed.
2021-03-29 13:33:48 +01:00
David Tillotson b2027de7fc Correct version of the 6x8 font data! 2021-03-29 13:33:48 +01:00
Phil Howard 6c566992d4 Add set_font to docs 2021-03-29 13:33:48 +01:00
Phil Howard 276528c119 Make font settable by user at runtime
This allows fonts to be hot-swapped out by calling `set_font`

Unfortunately the way fonts are currently stored limits the maximum height to 8 pixels, since that's the size of a uint8_t and the y dimension is bitwise encoded.

The width can be arbitrary, by specifying the widths and max_width (the multiplier for number of bytes per char).

Might be worth grabbing some more bits from 32blit to make this not terrible, but now a user-defined font is an .hpp and a `set_font` away.
2021-03-29 13:33:43 +01:00
David Tillotson 0e24aae2eb Added the font_height as well (Oops!) 2021-03-29 13:27:25 +01:00
David Tillotson dc14cf3353 Added example 6x8 font - rename font_data8.cpp to font_data.cpp to
switch to this font.
2021-03-29 13:27:25 +01:00
David Tillotson 4cecb920bf Adjusted font_data in graphics lib code to enable different height fonts 2021-03-29 13:27:25 +01:00
Phil Howard 67b11826b7 Example/test for ST7789 displays 2021-03-29 13:18:31 +01:00
Phil Howard 675106ece4 Patch or suppress warnings
The upstream MicroPython rp2 port has re-enabled -Werror so we need to either fix warnings or,
in the case of those generated by C++/C MicroPython binding weirdness, suppress them.
2021-03-22 20:43:23 +00:00
Philip Howard 2a7f8f4781
Documentation (#5)
* Add Pico Display README
* Add PicoGraphics README
* Add Pico Explorer README
* Pico Display Python README
* Add Pico Unicorn demo.py
* Add Pico Unicorn MicroPython docs
* Add Pico Unicorn C++ README
* Add Pico RGB Keypad README
2021-01-27 09:36:08 +00:00
Philip Howard 7d4ca4a86b
Graphics Enhancements (#8)
* typedef pen and constexpr create_pen for #6

* Prevent out of bounds clip permitting write outside buffer

* camelcase rect, point, and pen types

* added triangle(p1, p2, p3) and polygon(std::vector<Point> points) methods to graphics library

* change all uses of pen that were uint16_t into Pen type

* updated micropython modules to use new rect, point, pen naming

* added line(p1, p2) method to pico graphics library with faster vertical/horizontal special cases

Co-authored-by: Jonathan Williamson <jon@pimoroni.com>
2021-01-23 23:41:09 +00:00
Phil Howard 8dae215552 Add .cmake files to support out-of-tree projects 2021-01-22 14:03:38 +00:00
Phil Howard 4f6691be8b Very messy attempt at using a bytearray as the buffer 2021-01-20 21:39:09 +00:00
ZodiusInfuser 84e98b7040 Completed mpy wrapper for pico_display, and included example 2021-01-20 21:05:07 +00:00
ZodiusInfuser 75560ea038 Added outline of an mpy wrapper for pico_display 2021-01-20 15:59:48 +00:00
Jonathan Williamson 8345197a83 add support for clipping rectangles to graphics libary, add point and rect types 2021-01-18 07:58:19 +00:00
Jonathan Williamson 96d702ef9a PicoExplorer library and example, basic text support for PicoGraphics 2021-01-17 07:41:25 +00:00
Jonathan Williamson 9f31765c98 Setup libraries and drivers correctly for CMake 2021-01-16 15:02:18 +00:00
Jonathan Williamson 90d3ab8178 pico display driver 2021-01-16 12:26:03 +00:00