1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-02-04 07:13:00 +08:00
lvgl/docs/libs/qrcode.md
_VIFEXTech be1e1fca3a
fix(qrcode): remove global variables and lv_qrcode_delete (#3771)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-11-02 18:32:48 +01:00

31 lines
749 B
Markdown

# QR code
QR code generation with LVGL. Uses [QR-Code-generator](https://github.com/nayuki/QR-Code-generator) by [nayuki](https://github.com/nayuki).
## Usage
Enable `LV_USE_QRCODE` in `lv_conf.h`.
Use `lv_qrcode_create()` to create a qrcode object, and use `lv_qrcode_update()` to generate a QR code.
If you need to re-modify the size and color, use `lv_qrcode_set_size()` and `lv_qrcode_set_dark/light_color()`, and call `lv_qrcode_update()` again to regenerate the QR code.
## Notes
- QR codes with less data are smaller, but they scaled by an integer number to best fit to the given size.
## Example
```eval_rst
.. include:: ../../examples/libs/qrcode/index.rst
```
## API
```eval_rst
.. doxygenfile:: lv_qrcode.h
:project: lvgl