aboutsummaryrefslogtreecommitdiff
path: root/docs/libs/qrcode.rst
blob: 55c1bde45cb207839cd27e0232441156d89c8348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.. _qrcode:

=======
QR code
=======

QR code generation with LVGL. Uses
`QR-Code-generator <https://github.com/nayuki/QR-Code-generator>`__ by
`nayuki <https://github.com/nayuki>`__.

.. _qrcode_usage:

Usage
-----

Enable :c:macro:`LV_USE_QRCODE` in ``lv_conf.h``.

Use :cpp:func:`lv_qrcode_create` to create a qrcode object, and use
:cpp:func:`lv_qrcode_update` to generate a QR code.

If you need to re-modify the size and color, use
:cpp:func:`lv_qrcode_set_size` and :cpp:func:`lv_qrcode_set_dark_color` or 
:cpp:func:`lv_qrcode_set_light_color`, and
call :cpp:func:`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.

.. _qrcode_example:

Example
-------

.. include:: ../examples/libs/qrcode/index.rst

.. _qrcode_api:

API
---

:ref:`qrcodegen`