Add images for bitmap and QR code.

pull/16/head
Peter Hinch 2022-06-09 08:33:12 +01:00
rodzic 2aa36fd7b5
commit d380914cf2
3 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -2522,10 +2522,14 @@ different callback if the application required it.
```python
from gui.widgets import BitMap
```
![Image](./images/bitmap.JPG)
This renders a monochrome bitmap stored in a file to a rectangular region. The
bitmap file format is C source code generated by the Linux `bitmap` editor. The
bitmap may be rendered in any color. Data and colors can be changed at run time.
The widget is intended for larger bitmaps and is designed to minimise RAM usage
at cost of performance. For fast updates of smaller bitmaps consider using an
[icon font](https://github.com/peterhinch/micropython-font-to-py/tree/master/icon_fonts).
Constructor mandatory positional args:
1. `writer` A `Writer` instance.
@ -2546,10 +2550,9 @@ Methods:__
* `color` args `fgcolor=None`, `bgcolor=None`. Causes the image colors to be
changed. The file will be re-read and the image updated.
The widget is designed to minimise RAM usage at cost of performance. This is
because images may be large. When an update occurs there will be a brief "dead
time" when the GUI is unresponsive. This is not noticeable if the image is
displayed when a screen initialises, or if it changes in response to a user
Beacuse of the use of file storage when an update occurs there will be a brief
"dead time" when the GUI is unresponsive. This is not noticeable if the image
is displayed when a screen initialises, or if it changes in response to a user
action. Use in animations is questionable.
See `gui/demos/bitmap.py` for a usage example.
@ -2561,6 +2564,7 @@ See `gui/demos/bitmap.py` for a usage example.
```python
from gui.widgets import QRMap
```
![Image](./images/qrcode.JPG)
This renders QR codes generated using the [uQR](https://github.com/JASchilz/uQR)
application. Images may be scaled to render them at larger sizes. Please see

BIN
images/bitmap.JPG 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 60 KiB

BIN
images/qrcode.JPG 100644

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 94 KiB