「App:Library:LVGL:docs:3rd party libraries:QR code」の版間の差分
提供: robot-jp wiki
ナビゲーションに移動検索に移動8行目: | 8行目: | ||
| | | | ||
QR code generation with LVGL. Uses QR-Code-generator by nayuki. | QR code generation with LVGL. Uses QR-Code-generator by nayuki. | ||
− | | | + | |LVGLによるQRコードの生成。nayukiによるQRコードジェネレーターを使用しています。 |
|} | |} | ||
32行目: | 32行目: | ||
lv_qrcode_update(qr, data, strlen(data)); | lv_qrcode_update(qr, data, strlen(data)); | ||
| | | | ||
+ | * このリポジトリをダウンロードまたは複製します | ||
+ | ** GitHubからダウンロード | ||
+ | ** クローン:git clone <nowiki>https://github.com/lvgl/lv_lib_qrcode.git</nowiki> | ||
+ | * ライブラリを含める:<code>#include "lv_lib_qrcode/lv_qrcode.h"</code> | ||
+ | * 次のコードでテストします。 | ||
+ | |||
+ | const char * data = "Hello world"; | ||
+ | |||
+ | / *100x100QRコードを作成します*/ | ||
+ | lv_obj_t * qr = lv_qrcode_create(lv_scr_act()、100、lv_color_hex3(0x33f)、lv_color_hex3(0xeef)); | ||
+ | |||
+ | /*データを設定*/ | ||
+ | lv_qrcode_update(qr、data、strlen(data)); | ||
|} | |} | ||
43行目: | 56行目: | ||
* QR codes with less data are smaller, but they scaled by an integer number to best fit to the given size. | * QR codes with less data are smaller, but they scaled by an integer number to best fit to the given size. | ||
| | | | ||
+ | * データが少ないQRコードは小さいですが、指定されたサイズに最も合うように整数でスケーリングされます。 | ||
|} | |} | ||
94行目: | 108行目: | ||
; const lv_obj_class_t lv_qrcode_class | ; const lv_obj_class_t lv_qrcode_class | ||
| | | | ||
+ | |||
+ | |||
+ | 機能 | ||
+ | |||
+ | ; lv_obj_t * lv_qrcode_create(lv_obj_t * parent、lv_coord_t size、lv_color_t dark_color、lv_color_t light_color) | ||
+ | : 空のQRコード(<code>lv_canvas</code>)オブジェクトを作成します。 | ||
+ | :; パラメーター | ||
+ | ::* 親-QRコードを作成するオブジェクトをポイントします | ||
+ | ::* サイズ-QRコードの幅と高さ | ||
+ | ::* dark_color-QRコードの暗い色 | ||
+ | ::* light_color-QRコードの明るい色 | ||
+ | :; 戻り値 | ||
+ | :: 作成したQRコードオブジェクトへのポインタ | ||
+ | |||
+ | ; lv_res_t lv_qrcode_update(lv_obj_t * qrcode、const void * data、uint32_t data_len) | ||
+ | : QRコードオブジェクトのデータを設定する | ||
+ | :; パラメーター | ||
+ | ::* qrcode-aQコードオブジェクトへのポインタ | ||
+ | ::* data-表示するデータ | ||
+ | ::* data_len-バイト単位のデータの長さ | ||
+ | :; 戻り値 | ||
+ | :: LV_RES_OK:エラーがない場合。LV_RES_INV:エラー時 | ||
+ | |||
+ | ; void lv_qrcode_delete(lv_obj_t * qrcode) | ||
+ | : 非推奨:代わりに通常のlv_obj_delを使用してくださいQRコードオブジェクトを削除してください | ||
+ | :; パラメーター | ||
+ | :: qrcode-QRコードオブジェクトへのポインタ | ||
+ | |||
+ | 変数 | ||
+ | |||
+ | ; const lv_obj_class_t lv_qrcode_class | ||
|} | |} | ||
2022年6月29日 (水) 17:03時点における版
https://docs.lvgl.io/8.2/libs/qrcode.html
QR code
英文 | 自動翻訳 |
---|---|
QR code generation with LVGL. Uses QR-Code-generator by nayuki. |
LVGLによるQRコードの生成。nayukiによるQRコードジェネレーターを使用しています。 |
Get started
英文 | 自動翻訳 |
---|---|
const char * data = "Hello world"; /*Create a 100x100 QR code*/ lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 100, lv_color_hex3(0x33f), lv_color_hex3(0xeef)); /*Set data*/ lv_qrcode_update(qr, data, strlen(data)); |
const char * data = "Hello world"; / *100x100QRコードを作成します*/ lv_obj_t * qr = lv_qrcode_create(lv_scr_act()、100、lv_color_hex3(0x33f)、lv_color_hex3(0xeef)); /*データを設定*/ lv_qrcode_update(qr、data、strlen(data)); |
Notes
英文 | 自動翻訳 |
---|---|
|
|
Example
英文 | 自動翻訳 |
---|---|
Create a QR Code |
API
英文 | 自動翻訳 |
---|---|
Functions
Variables
|
変数
|