LVGL library from v9.0.0 to v9.1.0 (#21008)

This commit is contained in:
s-hadinger 2024-03-21 18:47:41 +01:00 committed by GitHub
parent a38e88422f
commit 3c70e63af8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
314 changed files with 11620 additions and 6401 deletions

View File

@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.
### Changed ### Changed
- LVGL library from v9.0.0 to v9.1.0
### Fixed ### Fixed

View File

@ -11,7 +11,7 @@
# bpp 2 and strong autohint for more readability at low size # bpp 2 and strong autohint for more readability at low size
~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --no-kerning --bpp 2 --no-compress --size 10 --font fonts/Montserrat-Medium/Montserrat-Medium.ttf --autohint-strong -r 0x20-0x7F,0xB0,0x2022 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/montserrat/lv_font_montserrat_tasmota_10.c --format lvgl ~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --no-kerning --bpp 2 --no-compress --size 10 --font fonts/Montserrat-Medium/Montserrat-Medium.ttf --autohint-strong -r 0x20-0x7F,0xB0,0x2022 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/montserrat/lv_font_montserrat_tasmota_10.c --format lvgl
~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --no-kerning --bpp 2 --no-compress --size 14 --font fonts/Montserrat-Medium/Montserrat-Medium.ttf --autohint-strong -r 0x20-0x7F,0xB0,0x2022 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/montserrat/lv_font_montserrat_tasmota_14.c --format lvgl ~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --no-kerning --bpp 2 --no-compress --size 14 --font fonts/Montserrat-Medium/Montserrat-Medium.ttf --autohint-strong -r 0x20-0x7F,0xB0,0x2022 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/montserrat/lv_font_montserrat_tasmota_14.c --format lvgl
~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --force-fast-kern-format --bpp 3 --size 20 --font fonts/Montserrat-Medium/Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/montserrat/lv_font_montserrat_tasmota_20.c --format lvgl ~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --force-fast-kern-format --bpp 2 --size 20 --font fonts/Montserrat-Medium/Montserrat-Medium.ttf -r 0x20-0x7F,0xB0,0x2022 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/montserrat/lv_font_montserrat_tasmota_20.c --format lvgl
# icons only fonts for sizes not covered by monsterrat # icons only fonts for sizes not covered by monsterrat
~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --no-kerning --bpp 1 --size 12 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/icons/lv_font_icons_12.c --format lvgl ~/Tasmota/s-hadinger/lv_font_conv/lv_font_conv.js --no-kerning --bpp 1 --size 12 --font fonts/Symbols/materialdesignicons-webfont.ttf --autohint-strong -r '0xf012c=>0xE12C','0xf0140=>0xE140','0xf0141=>0xE141','0xf0142=>0xE142','0xf0143=>0xE143','0xf0156=>0xE156','0xf0045=>0xE045','0xf004d=>0xE04D','0xf0054=>0xE054','0xf005d=>0xE05D','0xf02dc=>0xE2DC','0xf0374=>0xE374','0xf0415=>0xE415','0xf0717=>0xE717','0xf060c=>0xE60C','0xf0599=>0xE599','0xf05a8=>0xE5A8','0xf0335=>0xE335','0xf06e8=>0xE6E8','0xf050f=>0xE50F','0xf058e=>0xE58E','0xf0594=>0xE594','0xf140b=>0xF40B','0xf05a9=>0xE5A9','0xf011c=>0xE11C','0xf0425=>0xE425','0xf0769=>0xE769','0xf081b=>0xE81B','0xf10af=>0xF0AF','0xf081c=>0xE81C','0xf0322=>0xE322','0xf06a5=>0xE6A5','0xf0150=>0xE150','0xf12d4=>0xF2D4','0xf12d3=>0xF2D3','0xf111c=>0xF21C','0xf111d=>0xF21D','0xf111e=>0xF21E','0xf010b=>0xE10B','0xf033e=>0xE33E','0xf0fc6=>0xEFC6','0xf1054=>0xF154','0xf070d=>0xE70D','0xf099d=>0xE99D','0xf001b=>0xE01B','0xf0026=>0xE026','0xf009a=>0xE09A','0xf030b=>0xE30B','0xf032a=>0xE32A','0xf0438=>0xE438','0xf0ad7=>0xEAD7','0xf068a=>0xE68A','0xf04ad=>0xE4AD','0xf04ae=>0xE4AE','0xf0502=>0xE502','0xf00ac=>0xE0AC','0xf1011=>0xE011','0xf070e=>0xE70E','0xf0565=>0xE565','0xf0a70=>0xEA70','0xf075f=>0xE75F','0xf04b9=>0xE4B9','0xf0004=>0xE004','0xf02e3=>0xE2E3','0xf064a=>0xE64A','0xf09a0=>0xE9A0','0xf0606=>0xE606','0xf1020=>0xF020','0xf08dd=>0xE8DD','0xf06b5=>0xE6B5','0xf0456=>0xE456','0xf0457=>0xE457','0xf0458=>0xE458','0xf11f3=>0xF1F3','0xf049d=>0xE49D','0xf049e=>0xE49E','0xf04c3=>0xE4C3','0xF0A7A=>0xEA7A','0xf11e1=>0xF1E1','0xf057e=>0xE57E','0xf091c=>0xE91C','0xf00af=>0xE0AF','0xf0493=>0xE493','0xf0210=>0xE210','0xf0238=>0xE238','0xf03e4=>0xE3E4','0xf040a=>0xE40A','0xf04db=>0xE4DB','0xf04de=>0xE4DE','0xf0580=>0xE580','0xf072a=>0xE72A','0xf0917=>0xE917','0xf0aac=>0xEAAC','0xF028F=>0xE28F','0xF0C99=>0xEC99','0xf095f=>0xE95F','0xf05f1=>0xE5F1','0xf09ab=>0xE9AB','0xf058c=>0xE58C','0xf0176=>0xE176','0xf12ba=>0xF2BA','0xf051b=>0xE51B','0xF11DB=>0xF1DB','0xf008e=>0xE08E','0xf06a1=>0xE6A1','0xF096B=>0xE96B','0xf05fa=>0xE5FA','0xf075a=>0xE75A','0xf058f=>0xE58F','0xf06c0=>0xE6C0','0xf06c3=>0xE6C3','0xf12a3=>0xF2A3','0xf12a1=>0xF2A1','0xf12a2=>0xF2A2','0xF00ED=>0xE0ED','0xF07AE=>0xE7AE','0xF02DA=>0xE2DA','0xf01d9=>0xE1D9','0xf01fa=>0xE1FA','0xf0f5f=>0xEF5F' --font fonts/Symbols/FontAwesome5-Solid+Brands+Regular.woff --autohint-strong -r 61441,61448,61451,61452,61452,61453,61457,61459,61461,61465,61468,61473,61478,61479,61480,61502,61507,61512,61515,61516,61517,61521,61522,61523,61524,61543,61544,61550,61552,61553,61556,61559,61560,61561,61563,61587,61589,61636,61637,61639,61641,61664,61671,61674,61683,61724,61732,61787,61931,62016,62017,62018,62019,62020,62087,62099,62212,62189,62810,63426,63650 --format bin -o src/fonts/icons/lv_font_icons_12.c --format lvgl

View File

@ -985,6 +985,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1008,7 +1009,7 @@ lv_font_t lv_font_icons_12 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -1076,6 +1076,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1099,7 +1100,7 @@ lv_font_t lv_font_icons_14 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -1461,6 +1461,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1484,7 +1485,7 @@ lv_font_t lv_font_icons_16 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -1657,6 +1657,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1680,7 +1681,7 @@ lv_font_t lv_font_icons_18 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -1794,6 +1794,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1817,7 +1818,7 @@ lv_font_t lv_font_icons_20 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -1951,6 +1951,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1974,7 +1975,7 @@ lv_font_t lv_font_icons_22 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -2059,6 +2059,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -2082,7 +2083,7 @@ lv_font_t lv_font_icons_24 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -2492,6 +2492,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -2515,7 +2516,7 @@ lv_font_t lv_font_icons_28 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -1574,6 +1574,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -1597,7 +1598,7 @@ lv_font_t lv_font_montserrat_tasmota_10 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -2091,6 +2091,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -2114,7 +2115,7 @@ lv_font_t lv_font_montserrat_tasmota_14 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -2235,6 +2235,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -2258,7 +2259,7 @@ lv_font_t robotocondensed_regular_12_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -2586,6 +2586,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -2609,7 +2610,7 @@ lv_font_t robotocondensed_regular_14_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -2829,6 +2829,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -2852,7 +2853,7 @@ lv_font_t robotocondensed_regular_16_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -3599,6 +3599,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -3622,7 +3623,7 @@ lv_font_t robotocondensed_regular_20_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -3915,6 +3915,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -3938,7 +3939,7 @@ lv_font_t robotocondensed_regular_22_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -4152,6 +4152,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -4175,7 +4176,7 @@ lv_font_t robotocondensed_regular_24_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -6573,6 +6573,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -6596,7 +6597,7 @@ lv_font_t robotocondensed_regular_36_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -8952,6 +8952,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
}; };
/*----------------- /*-----------------
* PUBLIC FONT * PUBLIC FONT
*----------------*/ *----------------*/
@ -8975,7 +8976,7 @@ lv_font_t robotocondensed_regular_48_latin1 = {
#endif #endif
.dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */ .dsc = &font_dsc, /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
.fallback = NULL, .fallback = NULL,
.user_data = NULL .user_data = NULL,
}; };

View File

@ -78,6 +78,8 @@ draw_line_dsc_init|lv.draw_line_dsc||[lv_draw_line_dsc_init](https://docs.lvgl.i
draw_rect|comptr, lv.draw_rect_dsc, lv.area||[lv_draw_rect](https://docs.lvgl.io/9.0/search.html?q=lv_draw_rect) draw_rect|comptr, lv.draw_rect_dsc, lv.area||[lv_draw_rect](https://docs.lvgl.io/9.0/search.html?q=lv_draw_rect)
draw_rect_dsc_init|lv.draw_rect_dsc||[lv_draw_rect_dsc_init](https://docs.lvgl.io/9.0/search.html?q=lv_draw_rect_dsc_init) draw_rect_dsc_init|lv.draw_rect_dsc||[lv_draw_rect_dsc_init](https://docs.lvgl.io/9.0/search.html?q=lv_draw_rect_dsc_init)
draw_vector|comptr||[lv_draw_vector](https://docs.lvgl.io/9.0/search.html?q=lv_draw_vector) draw_vector|comptr||[lv_draw_vector](https://docs.lvgl.io/9.0/search.html?q=lv_draw_vector)
event_dsc_get_cb|lv.event_dsc|lv.event_cb|[lv_event_dsc_get_cb](https://docs.lvgl.io/9.0/search.html?q=lv_event_dsc_get_cb)
event_dsc_get_user_data|lv.event_dsc|comptr|[lv_event_dsc_get_user_data](https://docs.lvgl.io/9.0/search.html?q=lv_event_dsc_get_user_data)
event_register_id||int|[lv_event_register_id](https://docs.lvgl.io/9.0/search.html?q=lv_event_register_id) event_register_id||int|[lv_event_register_id](https://docs.lvgl.io/9.0/search.html?q=lv_event_register_id)
flex_init|||[lv_flex_init](https://docs.lvgl.io/9.0/search.html?q=lv_flex_init) flex_init|||[lv_flex_init](https://docs.lvgl.io/9.0/search.html?q=lv_flex_init)
font_get_glyph_width|lv.font, int, int|int|[lv_font_get_glyph_width](https://docs.lvgl.io/9.0/search.html?q=lv_font_get_glyph_width) font_get_glyph_width|lv.font, int, int|int|[lv_font_get_glyph_width](https://docs.lvgl.io/9.0/search.html?q=lv_font_get_glyph_width)
@ -110,6 +112,7 @@ obj_style_get_selector_state|int|int|[lv_obj_style_get_selector_state](https://d
objid_builtin_destroy|||[lv_objid_builtin_destroy](https://docs.lvgl.io/9.0/search.html?q=lv_objid_builtin_destroy) objid_builtin_destroy|||[lv_objid_builtin_destroy](https://docs.lvgl.io/9.0/search.html?q=lv_objid_builtin_destroy)
pct|int|int|[lv_pct](https://docs.lvgl.io/9.0/search.html?q=lv_pct) pct|int|int|[lv_pct](https://docs.lvgl.io/9.0/search.html?q=lv_pct)
pct_to_px|int, int|int|[lv_pct_to_px](https://docs.lvgl.io/9.0/search.html?q=lv_pct_to_px) pct_to_px|int, int|int|[lv_pct_to_px](https://docs.lvgl.io/9.0/search.html?q=lv_pct_to_px)
point_array_transform|comptr, int, int, int, int, comptr, bool||[lv_point_array_transform](https://docs.lvgl.io/9.0/search.html?q=lv_point_array_transform)
point_from_precise|lv.point_precise|int|[lv_point_from_precise](https://docs.lvgl.io/9.0/search.html?q=lv_point_from_precise) point_from_precise|lv.point_precise|int|[lv_point_from_precise](https://docs.lvgl.io/9.0/search.html?q=lv_point_from_precise)
point_precise_set|lv.point_precise, int, int||[lv_point_precise_set](https://docs.lvgl.io/9.0/search.html?q=lv_point_precise_set) point_precise_set|lv.point_precise, int, int||[lv_point_precise_set](https://docs.lvgl.io/9.0/search.html?q=lv_point_precise_set)
point_precise_swap|lv.point_precise, lv.point_precise||[lv_point_precise_swap](https://docs.lvgl.io/9.0/search.html?q=lv_point_precise_swap) point_precise_swap|lv.point_precise, lv.point_precise||[lv_point_precise_swap](https://docs.lvgl.io/9.0/search.html?q=lv_point_precise_swap)
@ -184,6 +187,7 @@ vector_path_close|comptr||[lv_vector_path_close](https://docs.lvgl.io/9.0/search
vector_path_copy|comptr, comptr||[lv_vector_path_copy](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_copy) vector_path_copy|comptr, comptr||[lv_vector_path_copy](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_copy)
vector_path_create|int|comptr|[lv_vector_path_create](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_create) vector_path_create|int|comptr|[lv_vector_path_create](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_create)
vector_path_delete|comptr||[lv_vector_path_delete](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_delete) vector_path_delete|comptr||[lv_vector_path_delete](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_delete)
vector_path_get_bounding|comptr, lv.area||[lv_vector_path_get_bounding](https://docs.lvgl.io/9.0/search.html?q=lv_vector_path_get_bounding)
version_info||string|[lv_version_info](https://docs.lvgl.io/9.0/search.html?q=lv_version_info) version_info||string|[lv_version_info](https://docs.lvgl.io/9.0/search.html?q=lv_version_info)
version_major||int|[lv_version_major](https://docs.lvgl.io/9.0/search.html?q=lv_version_major) version_major||int|[lv_version_major](https://docs.lvgl.io/9.0/search.html?q=lv_version_major)
version_minor||int|[lv_version_minor](https://docs.lvgl.io/9.0/search.html?q=lv_version_minor) version_minor||int|[lv_version_minor](https://docs.lvgl.io/9.0/search.html?q=lv_version_minor)
@ -245,6 +249,7 @@ get_dpi||int|[lv_display_get_dpi](https://docs.lvgl.io/9.0/search.html?q=lv_disp
get_dpi||int|[lv_display_get_dpi](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_dpi) get_dpi||int|[lv_display_get_dpi](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_dpi)
get_driver_data||comptr|[lv_display_get_driver_data](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_driver_data) get_driver_data||comptr|[lv_display_get_driver_data](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_driver_data)
get_event_count||int|[lv_display_get_event_count](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_event_count) get_event_count||int|[lv_display_get_event_count](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_event_count)
get_event_dsc|int|lv.event_dsc|[lv_display_get_event_dsc](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_event_dsc)
get_hor_res||int|[lv_display_get_horizontal_resolution](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_horizontal_resolution) get_hor_res||int|[lv_display_get_horizontal_resolution](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_horizontal_resolution)
get_horizontal_resolution||int|[lv_display_get_horizontal_resolution](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_horizontal_resolution) get_horizontal_resolution||int|[lv_display_get_horizontal_resolution](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_horizontal_resolution)
get_inactive_time||int|[lv_display_get_inactive_time](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_inactive_time) get_inactive_time||int|[lv_display_get_inactive_time](https://docs.lvgl.io/9.0/search.html?q=lv_display_get_inactive_time)
@ -317,6 +322,7 @@ get_key||int|[lv_event_get_key](https://docs.lvgl.io/9.0/search.html?q=lv_event_
get_layer||comptr|[lv_event_get_layer](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_layer) get_layer||comptr|[lv_event_get_layer](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_layer)
get_old_size||lv.area|[lv_event_get_old_size](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_old_size) get_old_size||lv.area|[lv_event_get_old_size](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_old_size)
get_param||comptr|[lv_event_get_param](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_param) get_param||comptr|[lv_event_get_param](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_param)
get_rotary_diff||int|[lv_event_get_rotary_diff](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_rotary_diff)
get_scroll_anim||lv.anim|[lv_event_get_scroll_anim](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_scroll_anim) get_scroll_anim||lv.anim|[lv_event_get_scroll_anim](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_scroll_anim)
get_self_size_info||comptr|[lv_event_get_self_size_info](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_self_size_info) get_self_size_info||comptr|[lv_event_get_self_size_info](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_self_size_info)
get_target||comptr|[lv_event_get_target](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_target) get_target||comptr|[lv_event_get_target](https://docs.lvgl.io/9.0/search.html?q=lv_event_get_target)
@ -368,6 +374,7 @@ get_disp||lv.display|[lv_indev_get_display](https://docs.lvgl.io/9.0/search.html
get_display||lv.display|[lv_indev_get_display](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_display) get_display||lv.display|[lv_indev_get_display](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_display)
get_driver_data||comptr|[lv_indev_get_driver_data](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_driver_data) get_driver_data||comptr|[lv_indev_get_driver_data](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_driver_data)
get_event_count||int|[lv_indev_get_event_count](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_event_count) get_event_count||int|[lv_indev_get_event_count](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_event_count)
get_event_dsc|int|lv.event_dsc|[lv_indev_get_event_dsc](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_event_dsc)
get_gesture_dir||int|[lv_indev_get_gesture_dir](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_gesture_dir) get_gesture_dir||int|[lv_indev_get_gesture_dir](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_gesture_dir)
get_group||lv.group|[lv_indev_get_group](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_group) get_group||lv.group|[lv_indev_get_group](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_group)
get_key||int|[lv_indev_get_key](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_key) get_key||int|[lv_indev_get_key](https://docs.lvgl.io/9.0/search.html?q=lv_indev_get_key)
@ -439,6 +446,7 @@ set_bg_img_tiled|bool||[lv_style_set_bg_image_tiled](https://docs.lvgl.io/9.0/se
set_bg_main_opa|int||[lv_style_set_bg_main_opa](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bg_main_opa) set_bg_main_opa|int||[lv_style_set_bg_main_opa](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bg_main_opa)
set_bg_main_stop|int||[lv_style_set_bg_main_stop](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bg_main_stop) set_bg_main_stop|int||[lv_style_set_bg_main_stop](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bg_main_stop)
set_bg_opa|int||[lv_style_set_bg_opa](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bg_opa) set_bg_opa|int||[lv_style_set_bg_opa](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bg_opa)
set_bitmap_mask_src|lv.image_dsc||[lv_style_set_bitmap_mask_src](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_bitmap_mask_src)
set_blend_mode|int||[lv_style_set_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_blend_mode) set_blend_mode|int||[lv_style_set_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_blend_mode)
set_border_color|lv.color||[lv_style_set_border_color](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_border_color) set_border_color|lv.color||[lv_style_set_border_color](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_border_color)
set_border_opa|int||[lv_style_set_border_opa](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_border_opa) set_border_opa|int||[lv_style_set_border_opa](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_border_opa)
@ -504,6 +512,7 @@ set_pad_top|int||[lv_style_set_pad_top](https://docs.lvgl.io/9.0/search.html?q=l
set_pad_ver|int||[lv_style_set_pad_ver](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_pad_ver) set_pad_ver|int||[lv_style_set_pad_ver](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_pad_ver)
set_prop|int, int||[lv_style_set_prop](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_prop) set_prop|int, int||[lv_style_set_prop](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_prop)
set_radius|int||[lv_style_set_radius](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_radius) set_radius|int||[lv_style_set_radius](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_radius)
set_rotary_sensitivity|int||[lv_style_set_rotary_sensitivity](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_rotary_sensitivity)
set_shadow_color|lv.color||[lv_style_set_shadow_color](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_shadow_color) set_shadow_color|lv.color||[lv_style_set_shadow_color](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_shadow_color)
set_shadow_offset_x|int||[lv_style_set_shadow_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_shadow_offset_x) set_shadow_offset_x|int||[lv_style_set_shadow_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_shadow_offset_x)
set_shadow_offset_y|int||[lv_style_set_shadow_offset_y](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_shadow_offset_y) set_shadow_offset_y|int||[lv_style_set_shadow_offset_y](https://docs.lvgl.io/9.0/search.html?q=lv_style_set_shadow_offset_y)
@ -566,7 +575,7 @@ set_user_data|\<any\>||[lv_timer_set_user_data](https://docs.lvgl.io/9.0/search.
Method|Arguments|Return type|LVGL equivalent Method|Arguments|Return type|LVGL equivalent
:---|:---|:---|:--- :---|:---|:---|:---
add_event_cb|\<closure\>, int, \<any\>||[lv_obj_add_event_cb](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_event_cb) add_event_cb|\<closure\>, int, \<any\>|lv.event_dsc|[lv_obj_add_event_cb](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_event_cb)
add_flag|int||[lv_obj_add_flag](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_flag) add_flag|int||[lv_obj_add_flag](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_flag)
add_state|int||[lv_obj_add_state](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_state) add_state|int||[lv_obj_add_state](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_state)
add_style|lv.style, int||[lv_obj_add_style](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_style) add_style|lv.style, int||[lv_obj_add_style](https://docs.lvgl.io/9.0/search.html?q=lv_obj_add_style)
@ -605,6 +614,7 @@ get_coords|lv.area||[lv_obj_get_coords](https://docs.lvgl.io/9.0/search.html?q=l
get_disp||lv.display|[lv_obj_get_display](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_display) get_disp||lv.display|[lv_obj_get_display](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_display)
get_display||lv.display|[lv_obj_get_display](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_display) get_display||lv.display|[lv_obj_get_display](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_display)
get_event_count||int|[lv_obj_get_event_count](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_event_count) get_event_count||int|[lv_obj_get_event_count](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_event_count)
get_event_dsc|int|lv.event_dsc|[lv_obj_get_event_dsc](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_event_dsc)
get_group||lv.group|[lv_obj_get_group](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_group) get_group||lv.group|[lv_obj_get_group](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_group)
get_height||int|[lv_obj_get_height](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_height) get_height||int|[lv_obj_get_height](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_height)
get_index||int|[lv_obj_get_index](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_index) get_index||int|[lv_obj_get_index](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_index)
@ -656,6 +666,7 @@ get_style_bg_image_tiled|int|bool|[lv_obj_get_style_bg_image_tiled](https://docs
get_style_bg_main_opa|int|int|[lv_obj_get_style_bg_main_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bg_main_opa) get_style_bg_main_opa|int|int|[lv_obj_get_style_bg_main_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bg_main_opa)
get_style_bg_main_stop|int|int|[lv_obj_get_style_bg_main_stop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bg_main_stop) get_style_bg_main_stop|int|int|[lv_obj_get_style_bg_main_stop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bg_main_stop)
get_style_bg_opa|int|int|[lv_obj_get_style_bg_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bg_opa) get_style_bg_opa|int|int|[lv_obj_get_style_bg_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bg_opa)
get_style_bitmap_mask_src|int|lv.image_dsc|[lv_obj_get_style_bitmap_mask_src](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_bitmap_mask_src)
get_style_blend_mode|int|int|[lv_obj_get_style_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_blend_mode) get_style_blend_mode|int|int|[lv_obj_get_style_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_blend_mode)
get_style_border_color|int|lv.color|[lv_obj_get_style_border_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_border_color) get_style_border_color|int|lv.color|[lv_obj_get_style_border_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_border_color)
get_style_border_color_filtered|int|lv.color|[lv_obj_get_style_border_color_filtered](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_border_color_filtered) get_style_border_color_filtered|int|lv.color|[lv_obj_get_style_border_color_filtered](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_border_color_filtered)
@ -723,6 +734,7 @@ get_style_pad_row|int|int|[lv_obj_get_style_pad_row](https://docs.lvgl.io/9.0/se
get_style_pad_top|int|int|[lv_obj_get_style_pad_top](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_pad_top) get_style_pad_top|int|int|[lv_obj_get_style_pad_top](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_pad_top)
get_style_prop|int, int|int|[lv_obj_get_style_prop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_prop) get_style_prop|int, int|int|[lv_obj_get_style_prop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_prop)
get_style_radius|int|int|[lv_obj_get_style_radius](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_radius) get_style_radius|int|int|[lv_obj_get_style_radius](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_radius)
get_style_rotary_sensitivity|int|int|[lv_obj_get_style_rotary_sensitivity](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_rotary_sensitivity)
get_style_shadow_color|int|lv.color|[lv_obj_get_style_shadow_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_shadow_color) get_style_shadow_color|int|lv.color|[lv_obj_get_style_shadow_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_shadow_color)
get_style_shadow_color_filtered|int|lv.color|[lv_obj_get_style_shadow_color_filtered](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_shadow_color_filtered) get_style_shadow_color_filtered|int|lv.color|[lv_obj_get_style_shadow_color_filtered](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_shadow_color_filtered)
get_style_shadow_offset_x|int|int|[lv_obj_get_style_shadow_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_shadow_offset_x) get_style_shadow_offset_x|int|int|[lv_obj_get_style_shadow_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_shadow_offset_x)
@ -762,7 +774,7 @@ get_style_translate_y|int|int|[lv_obj_get_style_translate_y](https://docs.lvgl.i
get_style_width|int|int|[lv_obj_get_style_width](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_width) get_style_width|int|int|[lv_obj_get_style_width](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_width)
get_style_x|int|int|[lv_obj_get_style_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_x) get_style_x|int|int|[lv_obj_get_style_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_x)
get_style_y|int|int|[lv_obj_get_style_y](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_y) get_style_y|int|int|[lv_obj_get_style_y](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_style_y)
get_transformed_area|lv.area, bool, bool||[lv_obj_get_transformed_area](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_transformed_area) get_transformed_area|lv.area, int||[lv_obj_get_transformed_area](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_transformed_area)
get_user_data||comptr|[lv_obj_get_user_data](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_user_data) get_user_data||comptr|[lv_obj_get_user_data](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_user_data)
get_width||int|[lv_obj_get_width](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_width) get_width||int|[lv_obj_get_width](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_width)
get_width||int|[lv_obj_get_width](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_width) get_width||int|[lv_obj_get_width](https://docs.lvgl.io/9.0/search.html?q=lv_obj_get_width)
@ -807,6 +819,7 @@ remove|||[lv_obj_delete](https://docs.lvgl.io/9.0/search.html?q=lv_obj_delete)
remove_event|int|bool|[lv_obj_remove_event](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event) remove_event|int|bool|[lv_obj_remove_event](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event)
remove_event_cb|\<any\>|bool|[lv_obj_remove_event_cb](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event_cb) remove_event_cb|\<any\>|bool|[lv_obj_remove_event_cb](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event_cb)
remove_event_cb_with_user_data|\<any\>, \<any\>|int|[lv_obj_remove_event_cb_with_user_data](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event_cb_with_user_data) remove_event_cb_with_user_data|\<any\>, \<any\>|int|[lv_obj_remove_event_cb_with_user_data](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event_cb_with_user_data)
remove_event_dsc|lv.event_dsc|bool|[lv_obj_remove_event_dsc](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_event_dsc)
remove_flag|int||[lv_obj_remove_flag](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_flag) remove_flag|int||[lv_obj_remove_flag](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_flag)
remove_local_style_prop|int, int|bool|[lv_obj_remove_local_style_prop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_local_style_prop) remove_local_style_prop|int, int|bool|[lv_obj_remove_local_style_prop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_local_style_prop)
remove_state|int||[lv_obj_remove_state](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_state) remove_state|int||[lv_obj_remove_state](https://docs.lvgl.io/9.0/search.html?q=lv_obj_remove_state)
@ -868,6 +881,7 @@ set_style_bg_image_tiled|bool, int||[lv_obj_set_style_bg_image_tiled](https://do
set_style_bg_main_opa|int, int||[lv_obj_set_style_bg_main_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bg_main_opa) set_style_bg_main_opa|int, int||[lv_obj_set_style_bg_main_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bg_main_opa)
set_style_bg_main_stop|int, int||[lv_obj_set_style_bg_main_stop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bg_main_stop) set_style_bg_main_stop|int, int||[lv_obj_set_style_bg_main_stop](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bg_main_stop)
set_style_bg_opa|int, int||[lv_obj_set_style_bg_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bg_opa) set_style_bg_opa|int, int||[lv_obj_set_style_bg_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bg_opa)
set_style_bitmap_mask_src|lv.image_dsc, int||[lv_obj_set_style_bitmap_mask_src](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_bitmap_mask_src)
set_style_blend_mode|int, int||[lv_obj_set_style_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_blend_mode) set_style_blend_mode|int, int||[lv_obj_set_style_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_blend_mode)
set_style_border_color|lv.color, int||[lv_obj_set_style_border_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_border_color) set_style_border_color|lv.color, int||[lv_obj_set_style_border_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_border_color)
set_style_border_opa|int, int||[lv_obj_set_style_border_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_border_opa) set_style_border_opa|int, int||[lv_obj_set_style_border_opa](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_border_opa)
@ -935,6 +949,7 @@ set_style_pad_row|int, int||[lv_obj_set_style_pad_row](https://docs.lvgl.io/9.0/
set_style_pad_top|int, int||[lv_obj_set_style_pad_top](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_pad_top) set_style_pad_top|int, int||[lv_obj_set_style_pad_top](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_pad_top)
set_style_pad_ver|int, int||[lv_obj_set_style_pad_ver](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_pad_ver) set_style_pad_ver|int, int||[lv_obj_set_style_pad_ver](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_pad_ver)
set_style_radius|int, int||[lv_obj_set_style_radius](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_radius) set_style_radius|int, int||[lv_obj_set_style_radius](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_radius)
set_style_rotary_sensitivity|int, int||[lv_obj_set_style_rotary_sensitivity](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_rotary_sensitivity)
set_style_shadow_color|lv.color, int||[lv_obj_set_style_shadow_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_shadow_color) set_style_shadow_color|lv.color, int||[lv_obj_set_style_shadow_color](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_shadow_color)
set_style_shadow_offset_x|int, int||[lv_obj_set_style_shadow_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_shadow_offset_x) set_style_shadow_offset_x|int, int||[lv_obj_set_style_shadow_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_shadow_offset_x)
set_style_shadow_offset_y|int, int||[lv_obj_set_style_shadow_offset_y](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_shadow_offset_y) set_style_shadow_offset_y|int, int||[lv_obj_set_style_shadow_offset_y](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_style_shadow_offset_y)
@ -975,7 +990,8 @@ set_x|int||[lv_obj_set_x](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_x)
set_y|int||[lv_obj_set_y](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_y) set_y|int||[lv_obj_set_y](https://docs.lvgl.io/9.0/search.html?q=lv_obj_set_y)
stringify_id|comptr, int|string|[lv_obj_stringify_id](https://docs.lvgl.io/9.0/search.html?q=lv_obj_stringify_id) stringify_id|comptr, int|string|[lv_obj_stringify_id](https://docs.lvgl.io/9.0/search.html?q=lv_obj_stringify_id)
swap|lv.obj||[lv_obj_swap](https://docs.lvgl.io/9.0/search.html?q=lv_obj_swap) swap|lv.obj||[lv_obj_swap](https://docs.lvgl.io/9.0/search.html?q=lv_obj_swap)
transform_point|comptr, bool, bool||[lv_obj_transform_point](https://docs.lvgl.io/9.0/search.html?q=lv_obj_transform_point) transform_point|comptr, int||[lv_obj_transform_point](https://docs.lvgl.io/9.0/search.html?q=lv_obj_transform_point)
transform_point_array|lv.point_arr, int, int||[lv_obj_transform_point_array](https://docs.lvgl.io/9.0/search.html?q=lv_obj_transform_point_array)
update_flag|int, bool||[lv_obj_update_flag](https://docs.lvgl.io/9.0/search.html?q=lv_obj_update_flag) update_flag|int, bool||[lv_obj_update_flag](https://docs.lvgl.io/9.0/search.html?q=lv_obj_update_flag)
update_layout|||[lv_obj_update_layout](https://docs.lvgl.io/9.0/search.html?q=lv_obj_update_layout) update_layout|||[lv_obj_update_layout](https://docs.lvgl.io/9.0/search.html?q=lv_obj_update_layout)
update_snap|int||[lv_obj_update_snap](https://docs.lvgl.io/9.0/search.html?q=lv_obj_update_snap) update_snap|int||[lv_obj_update_snap](https://docs.lvgl.io/9.0/search.html?q=lv_obj_update_snap)
@ -1110,6 +1126,7 @@ Method|Arguments|Return type|LVGL equivalent
:---|:---|:---|:--- :---|:---|:---|:---
get_angle||int|[lv_image_get_rotation](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_rotation) get_angle||int|[lv_image_get_rotation](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_rotation)
get_antialias||bool|[lv_image_get_antialias](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_antialias) get_antialias||bool|[lv_image_get_antialias](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_antialias)
get_bitmap_map_src||lv.image_dsc|[lv_image_get_bitmap_map_src](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_bitmap_map_src)
get_blend_mode||int|[lv_image_get_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_blend_mode) get_blend_mode||int|[lv_image_get_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_blend_mode)
get_inner_align||int|[lv_image_get_inner_align](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_inner_align) get_inner_align||int|[lv_image_get_inner_align](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_inner_align)
get_offset_x||int|[lv_image_get_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_offset_x) get_offset_x||int|[lv_image_get_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_offset_x)
@ -1126,6 +1143,7 @@ get_src||comptr|[lv_image_get_src](https://docs.lvgl.io/9.0/search.html?q=lv_ima
get_zoom||int|[lv_image_get_scale](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_scale) get_zoom||int|[lv_image_get_scale](https://docs.lvgl.io/9.0/search.html?q=lv_image_get_scale)
set_angle|int||[lv_image_set_rotation](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_rotation) set_angle|int||[lv_image_set_rotation](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_rotation)
set_antialias|bool||[lv_image_set_antialias](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_antialias) set_antialias|bool||[lv_image_set_antialias](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_antialias)
set_bitmap_map_src|lv.image_dsc||[lv_image_set_bitmap_map_src](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_bitmap_map_src)
set_blend_mode|int||[lv_image_set_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_blend_mode) set_blend_mode|int||[lv_image_set_blend_mode](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_blend_mode)
set_inner_align|int||[lv_image_set_inner_align](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_inner_align) set_inner_align|int||[lv_image_set_inner_align](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_inner_align)
set_offset_x|int||[lv_image_set_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_offset_x) set_offset_x|int||[lv_image_set_offset_x](https://docs.lvgl.io/9.0/search.html?q=lv_image_set_offset_x)

View File

@ -45,6 +45,7 @@ const be_ntv_func_def_t lv_style_func[] = {
{ "set_bg_main_opa", { (const void*) &lv_style_set_bg_main_opa, "", "(lv.style)i" } }, { "set_bg_main_opa", { (const void*) &lv_style_set_bg_main_opa, "", "(lv.style)i" } },
{ "set_bg_main_stop", { (const void*) &lv_style_set_bg_main_stop, "", "(lv.style)i" } }, { "set_bg_main_stop", { (const void*) &lv_style_set_bg_main_stop, "", "(lv.style)i" } },
{ "set_bg_opa", { (const void*) &lv_style_set_bg_opa, "", "(lv.style)i" } }, { "set_bg_opa", { (const void*) &lv_style_set_bg_opa, "", "(lv.style)i" } },
{ "set_bitmap_mask_src", { (const void*) &lv_style_set_bitmap_mask_src, "", "(lv.style)(lv.image_dsc)" } },
{ "set_blend_mode", { (const void*) &lv_style_set_blend_mode, "", "(lv.style)i" } }, { "set_blend_mode", { (const void*) &lv_style_set_blend_mode, "", "(lv.style)i" } },
{ "set_border_color", { (const void*) &lv_style_set_border_color, "", "(lv.style)(lv.color)" } }, { "set_border_color", { (const void*) &lv_style_set_border_color, "", "(lv.style)(lv.color)" } },
{ "set_border_opa", { (const void*) &lv_style_set_border_opa, "", "(lv.style)i" } }, { "set_border_opa", { (const void*) &lv_style_set_border_opa, "", "(lv.style)i" } },
@ -110,6 +111,7 @@ const be_ntv_func_def_t lv_style_func[] = {
{ "set_pad_ver", { (const void*) &lv_style_set_pad_ver, "", "(lv.style)i" } }, { "set_pad_ver", { (const void*) &lv_style_set_pad_ver, "", "(lv.style)i" } },
{ "set_prop", { (const void*) &lv_style_set_prop, "", "(lv.style)ii" } }, { "set_prop", { (const void*) &lv_style_set_prop, "", "(lv.style)ii" } },
{ "set_radius", { (const void*) &lv_style_set_radius, "", "(lv.style)i" } }, { "set_radius", { (const void*) &lv_style_set_radius, "", "(lv.style)i" } },
{ "set_rotary_sensitivity", { (const void*) &lv_style_set_rotary_sensitivity, "", "(lv.style)i" } },
{ "set_shadow_color", { (const void*) &lv_style_set_shadow_color, "", "(lv.style)(lv.color)" } }, { "set_shadow_color", { (const void*) &lv_style_set_shadow_color, "", "(lv.style)(lv.color)" } },
{ "set_shadow_offset_x", { (const void*) &lv_style_set_shadow_offset_x, "", "(lv.style)i" } }, { "set_shadow_offset_x", { (const void*) &lv_style_set_shadow_offset_x, "", "(lv.style)i" } },
{ "set_shadow_offset_y", { (const void*) &lv_style_set_shadow_offset_y, "", "(lv.style)i" } }, { "set_shadow_offset_y", { (const void*) &lv_style_set_shadow_offset_y, "", "(lv.style)i" } },
@ -188,7 +190,7 @@ const be_ntv_func_def_t lv_group_func[] = {
/* `lv_obj` methods */ /* `lv_obj` methods */
#ifdef BE_LV_WIDGET_OBJ #ifdef BE_LV_WIDGET_OBJ
const be_ntv_func_def_t lv_obj_func[] = { const be_ntv_func_def_t lv_obj_func[] = {
{ "add_event_cb", { (const void*) &lv_obj_add_event_cb, "", "(lv.obj)^lv_event_cb^i." } }, { "add_event_cb", { (const void*) &lv_obj_add_event_cb, "lv.event_dsc", "(lv.obj)^lv_event_cb^i." } },
{ "add_flag", { (const void*) &lv_obj_add_flag, "", "(lv.obj)i" } }, { "add_flag", { (const void*) &lv_obj_add_flag, "", "(lv.obj)i" } },
{ "add_state", { (const void*) &lv_obj_add_state, "", "(lv.obj)i" } }, { "add_state", { (const void*) &lv_obj_add_state, "", "(lv.obj)i" } },
{ "add_style", { (const void*) &lv_obj_add_style, "", "(lv.obj)(lv.style)i" } }, { "add_style", { (const void*) &lv_obj_add_style, "", "(lv.obj)(lv.style)i" } },
@ -227,6 +229,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "get_disp", { (const void*) &lv_obj_get_display, "lv.display", "(lv.obj)" } }, { "get_disp", { (const void*) &lv_obj_get_display, "lv.display", "(lv.obj)" } },
{ "get_display", { (const void*) &lv_obj_get_display, "lv.display", "(lv.obj)" } }, { "get_display", { (const void*) &lv_obj_get_display, "lv.display", "(lv.obj)" } },
{ "get_event_count", { (const void*) &lv_obj_get_event_count, "i", "(lv.obj)" } }, { "get_event_count", { (const void*) &lv_obj_get_event_count, "i", "(lv.obj)" } },
{ "get_event_dsc", { (const void*) &lv_obj_get_event_dsc, "lv.event_dsc", "(lv.obj)i" } },
{ "get_group", { (const void*) &lv_obj_get_group, "lv.group", "(lv.obj)" } }, { "get_group", { (const void*) &lv_obj_get_group, "lv.group", "(lv.obj)" } },
{ "get_height", { (const void*) &lv_obj_get_height, "i", "(lv.obj)" } }, { "get_height", { (const void*) &lv_obj_get_height, "i", "(lv.obj)" } },
{ "get_index", { (const void*) &lv_obj_get_index, "i", "(lv.obj)" } }, { "get_index", { (const void*) &lv_obj_get_index, "i", "(lv.obj)" } },
@ -278,6 +281,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "get_style_bg_main_opa", { (const void*) &lv_obj_get_style_bg_main_opa, "i", "(lv.obj)i" } }, { "get_style_bg_main_opa", { (const void*) &lv_obj_get_style_bg_main_opa, "i", "(lv.obj)i" } },
{ "get_style_bg_main_stop", { (const void*) &lv_obj_get_style_bg_main_stop, "i", "(lv.obj)i" } }, { "get_style_bg_main_stop", { (const void*) &lv_obj_get_style_bg_main_stop, "i", "(lv.obj)i" } },
{ "get_style_bg_opa", { (const void*) &lv_obj_get_style_bg_opa, "i", "(lv.obj)i" } }, { "get_style_bg_opa", { (const void*) &lv_obj_get_style_bg_opa, "i", "(lv.obj)i" } },
{ "get_style_bitmap_mask_src", { (const void*) &lv_obj_get_style_bitmap_mask_src, "lv.image_dsc", "(lv.obj)i" } },
{ "get_style_blend_mode", { (const void*) &lv_obj_get_style_blend_mode, "i", "(lv.obj)i" } }, { "get_style_blend_mode", { (const void*) &lv_obj_get_style_blend_mode, "i", "(lv.obj)i" } },
{ "get_style_border_color", { (const void*) &lv_obj_get_style_border_color, "lv.color", "(lv.obj)i" } }, { "get_style_border_color", { (const void*) &lv_obj_get_style_border_color, "lv.color", "(lv.obj)i" } },
{ "get_style_border_color_filtered", { (const void*) &lv_obj_get_style_border_color_filtered, "lv.color", "(lv.obj)i" } }, { "get_style_border_color_filtered", { (const void*) &lv_obj_get_style_border_color_filtered, "lv.color", "(lv.obj)i" } },
@ -345,6 +349,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "get_style_pad_top", { (const void*) &lv_obj_get_style_pad_top, "i", "(lv.obj)i" } }, { "get_style_pad_top", { (const void*) &lv_obj_get_style_pad_top, "i", "(lv.obj)i" } },
{ "get_style_prop", { (const void*) &lv_obj_get_style_prop, "i", "(lv.obj)ii" } }, { "get_style_prop", { (const void*) &lv_obj_get_style_prop, "i", "(lv.obj)ii" } },
{ "get_style_radius", { (const void*) &lv_obj_get_style_radius, "i", "(lv.obj)i" } }, { "get_style_radius", { (const void*) &lv_obj_get_style_radius, "i", "(lv.obj)i" } },
{ "get_style_rotary_sensitivity", { (const void*) &lv_obj_get_style_rotary_sensitivity, "i", "(lv.obj)i" } },
{ "get_style_shadow_color", { (const void*) &lv_obj_get_style_shadow_color, "lv.color", "(lv.obj)i" } }, { "get_style_shadow_color", { (const void*) &lv_obj_get_style_shadow_color, "lv.color", "(lv.obj)i" } },
{ "get_style_shadow_color_filtered", { (const void*) &lv_obj_get_style_shadow_color_filtered, "lv.color", "(lv.obj)i" } }, { "get_style_shadow_color_filtered", { (const void*) &lv_obj_get_style_shadow_color_filtered, "lv.color", "(lv.obj)i" } },
{ "get_style_shadow_offset_x", { (const void*) &lv_obj_get_style_shadow_offset_x, "i", "(lv.obj)i" } }, { "get_style_shadow_offset_x", { (const void*) &lv_obj_get_style_shadow_offset_x, "i", "(lv.obj)i" } },
@ -384,7 +389,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "get_style_width", { (const void*) &lv_obj_get_style_width, "i", "(lv.obj)i" } }, { "get_style_width", { (const void*) &lv_obj_get_style_width, "i", "(lv.obj)i" } },
{ "get_style_x", { (const void*) &lv_obj_get_style_x, "i", "(lv.obj)i" } }, { "get_style_x", { (const void*) &lv_obj_get_style_x, "i", "(lv.obj)i" } },
{ "get_style_y", { (const void*) &lv_obj_get_style_y, "i", "(lv.obj)i" } }, { "get_style_y", { (const void*) &lv_obj_get_style_y, "i", "(lv.obj)i" } },
{ "get_transformed_area", { (const void*) &lv_obj_get_transformed_area, "", "(lv.obj)(lv.area)bb" } }, { "get_transformed_area", { (const void*) &lv_obj_get_transformed_area, "", "(lv.obj)(lv.area)i" } },
{ "get_user_data", { (const void*) &lv_obj_get_user_data, "c", "(lv.obj)" } }, { "get_user_data", { (const void*) &lv_obj_get_user_data, "c", "(lv.obj)" } },
{ "get_width", { (const void*) &lv_obj_get_width, "i", "(lv.obj)" } }, { "get_width", { (const void*) &lv_obj_get_width, "i", "(lv.obj)" } },
{ "get_x", { (const void*) &lv_obj_get_x, "i", "(lv.obj)" } }, { "get_x", { (const void*) &lv_obj_get_x, "i", "(lv.obj)" } },
@ -428,6 +433,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "remove_event", { (const void*) &lv_obj_remove_event, "b", "(lv.obj)i" } }, { "remove_event", { (const void*) &lv_obj_remove_event, "b", "(lv.obj)i" } },
{ "remove_event_cb", { (const void*) &lv_obj_remove_event_cb, "b", "(lv.obj)." } }, { "remove_event_cb", { (const void*) &lv_obj_remove_event_cb, "b", "(lv.obj)." } },
{ "remove_event_cb_with_user_data", { (const void*) &lv_obj_remove_event_cb_with_user_data, "i", "(lv.obj).." } }, { "remove_event_cb_with_user_data", { (const void*) &lv_obj_remove_event_cb_with_user_data, "i", "(lv.obj).." } },
{ "remove_event_dsc", { (const void*) &lv_obj_remove_event_dsc, "b", "(lv.obj)(lv.event_dsc)" } },
{ "remove_flag", { (const void*) &lv_obj_remove_flag, "", "(lv.obj)i" } }, { "remove_flag", { (const void*) &lv_obj_remove_flag, "", "(lv.obj)i" } },
{ "remove_local_style_prop", { (const void*) &lv_obj_remove_local_style_prop, "b", "(lv.obj)ii" } }, { "remove_local_style_prop", { (const void*) &lv_obj_remove_local_style_prop, "b", "(lv.obj)ii" } },
{ "remove_state", { (const void*) &lv_obj_remove_state, "", "(lv.obj)i" } }, { "remove_state", { (const void*) &lv_obj_remove_state, "", "(lv.obj)i" } },
@ -488,6 +494,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "set_style_bg_main_opa", { (const void*) &lv_obj_set_style_bg_main_opa, "", "(lv.obj)ii" } }, { "set_style_bg_main_opa", { (const void*) &lv_obj_set_style_bg_main_opa, "", "(lv.obj)ii" } },
{ "set_style_bg_main_stop", { (const void*) &lv_obj_set_style_bg_main_stop, "", "(lv.obj)ii" } }, { "set_style_bg_main_stop", { (const void*) &lv_obj_set_style_bg_main_stop, "", "(lv.obj)ii" } },
{ "set_style_bg_opa", { (const void*) &lv_obj_set_style_bg_opa, "", "(lv.obj)ii" } }, { "set_style_bg_opa", { (const void*) &lv_obj_set_style_bg_opa, "", "(lv.obj)ii" } },
{ "set_style_bitmap_mask_src", { (const void*) &lv_obj_set_style_bitmap_mask_src, "", "(lv.obj)(lv.image_dsc)i" } },
{ "set_style_blend_mode", { (const void*) &lv_obj_set_style_blend_mode, "", "(lv.obj)ii" } }, { "set_style_blend_mode", { (const void*) &lv_obj_set_style_blend_mode, "", "(lv.obj)ii" } },
{ "set_style_border_color", { (const void*) &lv_obj_set_style_border_color, "", "(lv.obj)(lv.color)i" } }, { "set_style_border_color", { (const void*) &lv_obj_set_style_border_color, "", "(lv.obj)(lv.color)i" } },
{ "set_style_border_opa", { (const void*) &lv_obj_set_style_border_opa, "", "(lv.obj)ii" } }, { "set_style_border_opa", { (const void*) &lv_obj_set_style_border_opa, "", "(lv.obj)ii" } },
@ -555,6 +562,7 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "set_style_pad_top", { (const void*) &lv_obj_set_style_pad_top, "", "(lv.obj)ii" } }, { "set_style_pad_top", { (const void*) &lv_obj_set_style_pad_top, "", "(lv.obj)ii" } },
{ "set_style_pad_ver", { (const void*) &lv_obj_set_style_pad_ver, "", "(lv.obj)ii" } }, { "set_style_pad_ver", { (const void*) &lv_obj_set_style_pad_ver, "", "(lv.obj)ii" } },
{ "set_style_radius", { (const void*) &lv_obj_set_style_radius, "", "(lv.obj)ii" } }, { "set_style_radius", { (const void*) &lv_obj_set_style_radius, "", "(lv.obj)ii" } },
{ "set_style_rotary_sensitivity", { (const void*) &lv_obj_set_style_rotary_sensitivity, "", "(lv.obj)ii" } },
{ "set_style_shadow_color", { (const void*) &lv_obj_set_style_shadow_color, "", "(lv.obj)(lv.color)i" } }, { "set_style_shadow_color", { (const void*) &lv_obj_set_style_shadow_color, "", "(lv.obj)(lv.color)i" } },
{ "set_style_shadow_offset_x", { (const void*) &lv_obj_set_style_shadow_offset_x, "", "(lv.obj)ii" } }, { "set_style_shadow_offset_x", { (const void*) &lv_obj_set_style_shadow_offset_x, "", "(lv.obj)ii" } },
{ "set_style_shadow_offset_y", { (const void*) &lv_obj_set_style_shadow_offset_y, "", "(lv.obj)ii" } }, { "set_style_shadow_offset_y", { (const void*) &lv_obj_set_style_shadow_offset_y, "", "(lv.obj)ii" } },
@ -595,7 +603,8 @@ const be_ntv_func_def_t lv_obj_func[] = {
{ "set_y", { (const void*) &lv_obj_set_y, "", "(lv.obj)i" } }, { "set_y", { (const void*) &lv_obj_set_y, "", "(lv.obj)i" } },
{ "stringify_id", { (const void*) &lv_obj_stringify_id, "s", "(lv.obj)ci" } }, { "stringify_id", { (const void*) &lv_obj_stringify_id, "s", "(lv.obj)ci" } },
{ "swap", { (const void*) &lv_obj_swap, "", "(lv.obj)(lv.obj)" } }, { "swap", { (const void*) &lv_obj_swap, "", "(lv.obj)(lv.obj)" } },
{ "transform_point", { (const void*) &lv_obj_transform_point, "", "(lv.obj)cbb" } }, { "transform_point", { (const void*) &lv_obj_transform_point, "", "(lv.obj)ci" } },
{ "transform_point_array", { (const void*) &lv_obj_transform_point_array, "", "(lv.obj)(lv.point_arr)ii" } },
{ "update_flag", { (const void*) &lv_obj_update_flag, "", "(lv.obj)ib" } }, { "update_flag", { (const void*) &lv_obj_update_flag, "", "(lv.obj)ib" } },
{ "update_layout", { (const void*) &lv_obj_update_layout, "", "(lv.obj)" } }, { "update_layout", { (const void*) &lv_obj_update_layout, "", "(lv.obj)" } },
{ "update_snap", { (const void*) &lv_obj_update_snap, "", "(lv.obj)i" } }, { "update_snap", { (const void*) &lv_obj_update_snap, "", "(lv.obj)i" } },
@ -614,6 +623,7 @@ const be_ntv_func_def_t lv_event_func[] = {
{ "get_layer", { (const void*) &lv_event_get_layer, "c", "(lv.event)" } }, { "get_layer", { (const void*) &lv_event_get_layer, "c", "(lv.event)" } },
{ "get_old_size", { (const void*) &lv_event_get_old_size, "lv.area", "(lv.event)" } }, { "get_old_size", { (const void*) &lv_event_get_old_size, "lv.area", "(lv.event)" } },
{ "get_param", { (const void*) &lv_event_get_param, "c", "(lv.event)" } }, { "get_param", { (const void*) &lv_event_get_param, "c", "(lv.event)" } },
{ "get_rotary_diff", { (const void*) &lv_event_get_rotary_diff, "i", "(lv.event)" } },
{ "get_scroll_anim", { (const void*) &lv_event_get_scroll_anim, "lv.anim", "(lv.event)" } }, { "get_scroll_anim", { (const void*) &lv_event_get_scroll_anim, "lv.anim", "(lv.event)" } },
{ "get_self_size_info", { (const void*) &lv_event_get_self_size_info, "c", "(lv.event)" } }, { "get_self_size_info", { (const void*) &lv_event_get_self_size_info, "c", "(lv.event)" } },
{ "get_target", { (const void*) &lv_event_get_target, "c", "(lv.event)" } }, { "get_target", { (const void*) &lv_event_get_target, "c", "(lv.event)" } },
@ -640,6 +650,7 @@ const be_ntv_func_def_t lv_display_func[] = {
{ "get_dpi", { (const void*) &lv_display_get_dpi, "i", "(lv.display)" } }, { "get_dpi", { (const void*) &lv_display_get_dpi, "i", "(lv.display)" } },
{ "get_driver_data", { (const void*) &lv_display_get_driver_data, "c", "(lv.display)" } }, { "get_driver_data", { (const void*) &lv_display_get_driver_data, "c", "(lv.display)" } },
{ "get_event_count", { (const void*) &lv_display_get_event_count, "i", "(lv.display)" } }, { "get_event_count", { (const void*) &lv_display_get_event_count, "i", "(lv.display)" } },
{ "get_event_dsc", { (const void*) &lv_display_get_event_dsc, "lv.event_dsc", "(lv.display)i" } },
{ "get_hor_res", { (const void*) &lv_display_get_horizontal_resolution, "i", "(lv.display)" } }, { "get_hor_res", { (const void*) &lv_display_get_horizontal_resolution, "i", "(lv.display)" } },
{ "get_horizontal_resolution", { (const void*) &lv_display_get_horizontal_resolution, "i", "(lv.display)" } }, { "get_horizontal_resolution", { (const void*) &lv_display_get_horizontal_resolution, "i", "(lv.display)" } },
{ "get_inactive_time", { (const void*) &lv_display_get_inactive_time, "i", "(lv.display)" } }, { "get_inactive_time", { (const void*) &lv_display_get_inactive_time, "i", "(lv.display)" } },
@ -696,6 +707,7 @@ const be_ntv_func_def_t lv_indev_func[] = {
{ "get_display", { (const void*) &lv_indev_get_display, "lv.display", "(lv.indev)" } }, { "get_display", { (const void*) &lv_indev_get_display, "lv.display", "(lv.indev)" } },
{ "get_driver_data", { (const void*) &lv_indev_get_driver_data, "c", "(lv.indev)" } }, { "get_driver_data", { (const void*) &lv_indev_get_driver_data, "c", "(lv.indev)" } },
{ "get_event_count", { (const void*) &lv_indev_get_event_count, "i", "(lv.indev)" } }, { "get_event_count", { (const void*) &lv_indev_get_event_count, "i", "(lv.indev)" } },
{ "get_event_dsc", { (const void*) &lv_indev_get_event_dsc, "lv.event_dsc", "(lv.indev)i" } },
{ "get_gesture_dir", { (const void*) &lv_indev_get_gesture_dir, "i", "(lv.indev)" } }, { "get_gesture_dir", { (const void*) &lv_indev_get_gesture_dir, "i", "(lv.indev)" } },
{ "get_group", { (const void*) &lv_indev_get_group, "lv.group", "(lv.indev)" } }, { "get_group", { (const void*) &lv_indev_get_group, "lv.group", "(lv.indev)" } },
{ "get_key", { (const void*) &lv_indev_get_key, "i", "(lv.indev)" } }, { "get_key", { (const void*) &lv_indev_get_key, "i", "(lv.indev)" } },
@ -987,6 +999,7 @@ const be_ntv_func_def_t lv_dropdown_func[] = {
const be_ntv_func_def_t lv_image_func[] = { const be_ntv_func_def_t lv_image_func[] = {
{ "get_angle", { (const void*) &lv_image_get_rotation, "i", "(lv.obj)" } }, { "get_angle", { (const void*) &lv_image_get_rotation, "i", "(lv.obj)" } },
{ "get_antialias", { (const void*) &lv_image_get_antialias, "b", "(lv.obj)" } }, { "get_antialias", { (const void*) &lv_image_get_antialias, "b", "(lv.obj)" } },
{ "get_bitmap_map_src", { (const void*) &lv_image_get_bitmap_map_src, "lv.image_dsc", "(lv.obj)" } },
{ "get_blend_mode", { (const void*) &lv_image_get_blend_mode, "i", "(lv.obj)" } }, { "get_blend_mode", { (const void*) &lv_image_get_blend_mode, "i", "(lv.obj)" } },
{ "get_inner_align", { (const void*) &lv_image_get_inner_align, "i", "(lv.obj)" } }, { "get_inner_align", { (const void*) &lv_image_get_inner_align, "i", "(lv.obj)" } },
{ "get_offset_x", { (const void*) &lv_image_get_offset_x, "i", "(lv.obj)" } }, { "get_offset_x", { (const void*) &lv_image_get_offset_x, "i", "(lv.obj)" } },
@ -1000,6 +1013,7 @@ const be_ntv_func_def_t lv_image_func[] = {
{ "get_zoom", { (const void*) &lv_image_get_scale, "i", "(lv.obj)" } }, { "get_zoom", { (const void*) &lv_image_get_scale, "i", "(lv.obj)" } },
{ "set_angle", { (const void*) &lv_image_set_rotation, "", "(lv.obj)i" } }, { "set_angle", { (const void*) &lv_image_set_rotation, "", "(lv.obj)i" } },
{ "set_antialias", { (const void*) &lv_image_set_antialias, "", "(lv.obj)b" } }, { "set_antialias", { (const void*) &lv_image_set_antialias, "", "(lv.obj)b" } },
{ "set_bitmap_map_src", { (const void*) &lv_image_set_bitmap_map_src, "", "(lv.obj)(lv.image_dsc)" } },
{ "set_blend_mode", { (const void*) &lv_image_set_blend_mode, "", "(lv.obj)i" } }, { "set_blend_mode", { (const void*) &lv_image_set_blend_mode, "", "(lv.obj)i" } },
{ "set_inner_align", { (const void*) &lv_image_set_inner_align, "", "(lv.obj)i" } }, { "set_inner_align", { (const void*) &lv_image_set_inner_align, "", "(lv.obj)i" } },
{ "set_offset_x", { (const void*) &lv_image_set_offset_x, "", "(lv.obj)i" } }, { "set_offset_x", { (const void*) &lv_image_set_offset_x, "", "(lv.obj)i" } },

View File

@ -100,6 +100,8 @@ const be_ntv_func_def_t lv_func[] = {
{ "draw_rect", { (const void*) &lv_draw_rect, "", "c(lv.draw_rect_dsc)(lv.area)" } }, { "draw_rect", { (const void*) &lv_draw_rect, "", "c(lv.draw_rect_dsc)(lv.area)" } },
{ "draw_rect_dsc_init", { (const void*) &lv_draw_rect_dsc_init, "", "(lv.draw_rect_dsc)" } }, { "draw_rect_dsc_init", { (const void*) &lv_draw_rect_dsc_init, "", "(lv.draw_rect_dsc)" } },
{ "draw_vector", { (const void*) &lv_draw_vector, "", "c" } }, { "draw_vector", { (const void*) &lv_draw_vector, "", "c" } },
{ "event_dsc_get_cb", { (const void*) &lv_event_dsc_get_cb, "lv.event_cb", "(lv.event_dsc)" } },
{ "event_dsc_get_user_data", { (const void*) &lv_event_dsc_get_user_data, "c", "(lv.event_dsc)" } },
{ "event_register_id", { (const void*) &lv_event_register_id, "i", "" } }, { "event_register_id", { (const void*) &lv_event_register_id, "i", "" } },
{ "flex_init", { (const void*) &lv_flex_init, "", "" } }, { "flex_init", { (const void*) &lv_flex_init, "", "" } },
{ "font_get_glyph_width", { (const void*) &lv_font_get_glyph_width, "i", "(lv.font)ii" } }, { "font_get_glyph_width", { (const void*) &lv_font_get_glyph_width, "i", "(lv.font)ii" } },
@ -132,6 +134,7 @@ const be_ntv_func_def_t lv_func[] = {
{ "objid_builtin_destroy", { (const void*) &lv_objid_builtin_destroy, "", "" } }, { "objid_builtin_destroy", { (const void*) &lv_objid_builtin_destroy, "", "" } },
{ "pct", { (const void*) &lv_pct, "i", "i" } }, { "pct", { (const void*) &lv_pct, "i", "i" } },
{ "pct_to_px", { (const void*) &lv_pct_to_px, "i", "ii" } }, { "pct_to_px", { (const void*) &lv_pct_to_px, "i", "ii" } },
{ "point_array_transform", { (const void*) &lv_point_array_transform, "", "ciiiicb" } },
{ "point_from_precise", { (const void*) &lv_point_from_precise, "i", "(lv.point_precise)" } }, { "point_from_precise", { (const void*) &lv_point_from_precise, "i", "(lv.point_precise)" } },
{ "point_precise_set", { (const void*) &lv_point_precise_set, "", "(lv.point_precise)ii" } }, { "point_precise_set", { (const void*) &lv_point_precise_set, "", "(lv.point_precise)ii" } },
{ "point_precise_swap", { (const void*) &lv_point_precise_swap, "", "(lv.point_precise)(lv.point_precise)" } }, { "point_precise_swap", { (const void*) &lv_point_precise_swap, "", "(lv.point_precise)(lv.point_precise)" } },
@ -206,6 +209,7 @@ const be_ntv_func_def_t lv_func[] = {
{ "vector_path_copy", { (const void*) &lv_vector_path_copy, "", "cc" } }, { "vector_path_copy", { (const void*) &lv_vector_path_copy, "", "cc" } },
{ "vector_path_create", { (const void*) &lv_vector_path_create, "c", "i" } }, { "vector_path_create", { (const void*) &lv_vector_path_create, "c", "i" } },
{ "vector_path_delete", { (const void*) &lv_vector_path_delete, "", "c" } }, { "vector_path_delete", { (const void*) &lv_vector_path_delete, "", "c" } },
{ "vector_path_get_bounding", { (const void*) &lv_vector_path_get_bounding, "", "c(lv.area)" } },
{ "version_info", { (const void*) &lv_version_info, "s", "" } }, { "version_info", { (const void*) &lv_version_info, "s", "" } },
{ "version_major", { (const void*) &lv_version_major, "i", "" } }, { "version_major", { (const void*) &lv_version_major, "i", "" } },
{ "version_minor", { (const void*) &lv_version_minor, "i", "" } }, { "version_minor", { (const void*) &lv_version_minor, "i", "" } },
@ -308,6 +312,7 @@ const be_const_member_t lv0_constants[] = {
{ "COLOR_FORMAT_A2", be_cconst_int(LV_COLOR_FORMAT_A2) }, { "COLOR_FORMAT_A2", be_cconst_int(LV_COLOR_FORMAT_A2) },
{ "COLOR_FORMAT_A4", be_cconst_int(LV_COLOR_FORMAT_A4) }, { "COLOR_FORMAT_A4", be_cconst_int(LV_COLOR_FORMAT_A4) },
{ "COLOR_FORMAT_A8", be_cconst_int(LV_COLOR_FORMAT_A8) }, { "COLOR_FORMAT_A8", be_cconst_int(LV_COLOR_FORMAT_A8) },
{ "COLOR_FORMAT_ARGB8565", be_cconst_int(LV_COLOR_FORMAT_ARGB8565) },
{ "COLOR_FORMAT_ARGB8888", be_cconst_int(LV_COLOR_FORMAT_ARGB8888) }, { "COLOR_FORMAT_ARGB8888", be_cconst_int(LV_COLOR_FORMAT_ARGB8888) },
{ "COLOR_FORMAT_I1", be_cconst_int(LV_COLOR_FORMAT_I1) }, { "COLOR_FORMAT_I1", be_cconst_int(LV_COLOR_FORMAT_I1) },
{ "COLOR_FORMAT_I2", be_cconst_int(LV_COLOR_FORMAT_I2) }, { "COLOR_FORMAT_I2", be_cconst_int(LV_COLOR_FORMAT_I2) },
@ -374,10 +379,6 @@ const be_const_member_t lv0_constants[] = {
{ "DISP_ROTATION_180", be_cconst_int(LV_DISPLAY_ROTATION_180) }, { "DISP_ROTATION_180", be_cconst_int(LV_DISPLAY_ROTATION_180) },
{ "DISP_ROTATION_270", be_cconst_int(LV_DISPLAY_ROTATION_270) }, { "DISP_ROTATION_270", be_cconst_int(LV_DISPLAY_ROTATION_270) },
{ "DISP_ROTATION_90", be_cconst_int(LV_DISPLAY_ROTATION_90) }, { "DISP_ROTATION_90", be_cconst_int(LV_DISPLAY_ROTATION_90) },
{ "DRAW_LETTER_BITMAP_FORMAT_A8", be_cconst_int(LV_DRAW_LETTER_BITMAP_FORMAT_A8) },
{ "DRAW_LETTER_BITMAP_FORMAT_IMAGE", be_cconst_int(LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE) },
{ "DRAW_LETTER_BITMAP_FORMAT_INVALID", be_cconst_int(LV_DRAW_LETTER_BITMAP_FORMAT_INVALID) },
{ "DRAW_LETTER_VECTOR_FORMAT", be_cconst_int(LV_DRAW_LETTER_VECTOR_FORMAT) },
{ "DRAW_TASK_STATE_IN_PROGRESS", be_cconst_int(LV_DRAW_TASK_STATE_IN_PROGRESS) }, { "DRAW_TASK_STATE_IN_PROGRESS", be_cconst_int(LV_DRAW_TASK_STATE_IN_PROGRESS) },
{ "DRAW_TASK_STATE_QUEUED", be_cconst_int(LV_DRAW_TASK_STATE_QUEUED) }, { "DRAW_TASK_STATE_QUEUED", be_cconst_int(LV_DRAW_TASK_STATE_QUEUED) },
{ "DRAW_TASK_STATE_READY", be_cconst_int(LV_DRAW_TASK_STATE_READY) }, { "DRAW_TASK_STATE_READY", be_cconst_int(LV_DRAW_TASK_STATE_READY) },
@ -415,6 +416,8 @@ const be_const_member_t lv0_constants[] = {
{ "EVENT_DRAW_TASK_ADDED", be_cconst_int(LV_EVENT_DRAW_TASK_ADDED) }, { "EVENT_DRAW_TASK_ADDED", be_cconst_int(LV_EVENT_DRAW_TASK_ADDED) },
{ "EVENT_FLUSH_FINISH", be_cconst_int(LV_EVENT_FLUSH_FINISH) }, { "EVENT_FLUSH_FINISH", be_cconst_int(LV_EVENT_FLUSH_FINISH) },
{ "EVENT_FLUSH_START", be_cconst_int(LV_EVENT_FLUSH_START) }, { "EVENT_FLUSH_START", be_cconst_int(LV_EVENT_FLUSH_START) },
{ "EVENT_FLUSH_WAIT_FINISH", be_cconst_int(LV_EVENT_FLUSH_WAIT_FINISH) },
{ "EVENT_FLUSH_WAIT_START", be_cconst_int(LV_EVENT_FLUSH_WAIT_START) },
{ "EVENT_FOCUSED", be_cconst_int(LV_EVENT_FOCUSED) }, { "EVENT_FOCUSED", be_cconst_int(LV_EVENT_FOCUSED) },
{ "EVENT_GESTURE", be_cconst_int(LV_EVENT_GESTURE) }, { "EVENT_GESTURE", be_cconst_int(LV_EVENT_GESTURE) },
{ "EVENT_GET_SELF_SIZE", be_cconst_int(LV_EVENT_GET_SELF_SIZE) }, { "EVENT_GET_SELF_SIZE", be_cconst_int(LV_EVENT_GET_SELF_SIZE) },
@ -441,6 +444,7 @@ const be_const_member_t lv0_constants[] = {
{ "EVENT_RENDER_READY", be_cconst_int(LV_EVENT_RENDER_READY) }, { "EVENT_RENDER_READY", be_cconst_int(LV_EVENT_RENDER_READY) },
{ "EVENT_RENDER_START", be_cconst_int(LV_EVENT_RENDER_START) }, { "EVENT_RENDER_START", be_cconst_int(LV_EVENT_RENDER_START) },
{ "EVENT_RESOLUTION_CHANGED", be_cconst_int(LV_EVENT_RESOLUTION_CHANGED) }, { "EVENT_RESOLUTION_CHANGED", be_cconst_int(LV_EVENT_RESOLUTION_CHANGED) },
{ "EVENT_ROTARY", be_cconst_int(LV_EVENT_ROTARY) },
{ "EVENT_SCREEN_LOADED", be_cconst_int(LV_EVENT_SCREEN_LOADED) }, { "EVENT_SCREEN_LOADED", be_cconst_int(LV_EVENT_SCREEN_LOADED) },
{ "EVENT_SCREEN_LOAD_START", be_cconst_int(LV_EVENT_SCREEN_LOAD_START) }, { "EVENT_SCREEN_LOAD_START", be_cconst_int(LV_EVENT_SCREEN_LOAD_START) },
{ "EVENT_SCREEN_UNLOADED", be_cconst_int(LV_EVENT_SCREEN_UNLOADED) }, { "EVENT_SCREEN_UNLOADED", be_cconst_int(LV_EVENT_SCREEN_UNLOADED) },
@ -537,7 +541,7 @@ const be_const_member_t lv0_constants[] = {
{ "IMAGE_FLAGS_USER6", be_cconst_int(LV_IMAGE_FLAGS_USER6) }, { "IMAGE_FLAGS_USER6", be_cconst_int(LV_IMAGE_FLAGS_USER6) },
{ "IMAGE_FLAGS_USER7", be_cconst_int(LV_IMAGE_FLAGS_USER7) }, { "IMAGE_FLAGS_USER7", be_cconst_int(LV_IMAGE_FLAGS_USER7) },
{ "IMAGE_FLAGS_USER8", be_cconst_int(LV_IMAGE_FLAGS_USER8) }, { "IMAGE_FLAGS_USER8", be_cconst_int(LV_IMAGE_FLAGS_USER8) },
{ "IMAGE_FLAGS_VECTORS", be_cconst_int(LV_IMAGE_FLAGS_VECTORS) }, { "IMAGE_HEADER_MAGIC", be_cconst_int(LV_IMAGE_HEADER_MAGIC) },
{ "IMAGE_SRC_FILE", be_cconst_int(LV_IMAGE_SRC_FILE) }, { "IMAGE_SRC_FILE", be_cconst_int(LV_IMAGE_SRC_FILE) },
{ "IMAGE_SRC_SYMBOL", be_cconst_int(LV_IMAGE_SRC_SYMBOL) }, { "IMAGE_SRC_SYMBOL", be_cconst_int(LV_IMAGE_SRC_SYMBOL) },
{ "IMAGE_SRC_UNKNOWN", be_cconst_int(LV_IMAGE_SRC_UNKNOWN) }, { "IMAGE_SRC_UNKNOWN", be_cconst_int(LV_IMAGE_SRC_UNKNOWN) },
@ -628,6 +632,10 @@ const be_const_member_t lv0_constants[] = {
{ "OBJ_FLAG_USER_4", be_cconst_int(LV_OBJ_FLAG_USER_4) }, { "OBJ_FLAG_USER_4", be_cconst_int(LV_OBJ_FLAG_USER_4) },
{ "OBJ_FLAG_WIDGET_1", be_cconst_int(LV_OBJ_FLAG_WIDGET_1) }, { "OBJ_FLAG_WIDGET_1", be_cconst_int(LV_OBJ_FLAG_WIDGET_1) },
{ "OBJ_FLAG_WIDGET_2", be_cconst_int(LV_OBJ_FLAG_WIDGET_2) }, { "OBJ_FLAG_WIDGET_2", be_cconst_int(LV_OBJ_FLAG_WIDGET_2) },
{ "OBJ_POINT_TRANSFORM_FLAG_INVERSE", be_cconst_int(LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE) },
{ "OBJ_POINT_TRANSFORM_FLAG_INVERSE_RECURSIVE", be_cconst_int(LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE_RECURSIVE) },
{ "OBJ_POINT_TRANSFORM_FLAG_NONE", be_cconst_int(LV_OBJ_POINT_TRANSFORM_FLAG_NONE) },
{ "OBJ_POINT_TRANSFORM_FLAG_RECURSIVE", be_cconst_int(LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE) },
{ "OBJ_TREE_WALK_END", be_cconst_int(LV_OBJ_TREE_WALK_END) }, { "OBJ_TREE_WALK_END", be_cconst_int(LV_OBJ_TREE_WALK_END) },
{ "OBJ_TREE_WALK_NEXT", be_cconst_int(LV_OBJ_TREE_WALK_NEXT) }, { "OBJ_TREE_WALK_NEXT", be_cconst_int(LV_OBJ_TREE_WALK_NEXT) },
{ "OBJ_TREE_WALK_SKIP_CHILDREN", be_cconst_int(LV_OBJ_TREE_WALK_SKIP_CHILDREN) }, { "OBJ_TREE_WALK_SKIP_CHILDREN", be_cconst_int(LV_OBJ_TREE_WALK_SKIP_CHILDREN) },
@ -765,6 +773,7 @@ const be_const_member_t lv0_constants[] = {
{ "STYLE_BG_MAIN_OPA", be_cconst_int(LV_STYLE_BG_MAIN_OPA) }, { "STYLE_BG_MAIN_OPA", be_cconst_int(LV_STYLE_BG_MAIN_OPA) },
{ "STYLE_BG_MAIN_STOP", be_cconst_int(LV_STYLE_BG_MAIN_STOP) }, { "STYLE_BG_MAIN_STOP", be_cconst_int(LV_STYLE_BG_MAIN_STOP) },
{ "STYLE_BG_OPA", be_cconst_int(LV_STYLE_BG_OPA) }, { "STYLE_BG_OPA", be_cconst_int(LV_STYLE_BG_OPA) },
{ "STYLE_BITMAP_MASK_SRC", be_cconst_int(LV_STYLE_BITMAP_MASK_SRC) },
{ "STYLE_BLEND_MODE", be_cconst_int(LV_STYLE_BLEND_MODE) }, { "STYLE_BLEND_MODE", be_cconst_int(LV_STYLE_BLEND_MODE) },
{ "STYLE_BORDER_COLOR", be_cconst_int(LV_STYLE_BORDER_COLOR) }, { "STYLE_BORDER_COLOR", be_cconst_int(LV_STYLE_BORDER_COLOR) },
{ "STYLE_BORDER_OPA", be_cconst_int(LV_STYLE_BORDER_OPA) }, { "STYLE_BORDER_OPA", be_cconst_int(LV_STYLE_BORDER_OPA) },
@ -829,6 +838,7 @@ const be_const_member_t lv0_constants[] = {
{ "STYLE_RADIUS", be_cconst_int(LV_STYLE_RADIUS) }, { "STYLE_RADIUS", be_cconst_int(LV_STYLE_RADIUS) },
{ "STYLE_RES_FOUND", be_cconst_int(LV_STYLE_RES_FOUND) }, { "STYLE_RES_FOUND", be_cconst_int(LV_STYLE_RES_FOUND) },
{ "STYLE_RES_NOT_FOUND", be_cconst_int(LV_STYLE_RES_NOT_FOUND) }, { "STYLE_RES_NOT_FOUND", be_cconst_int(LV_STYLE_RES_NOT_FOUND) },
{ "STYLE_ROTARY_SENSITIVITY", be_cconst_int(LV_STYLE_ROTARY_SENSITIVITY) },
{ "STYLE_SHADOW_COLOR", be_cconst_int(LV_STYLE_SHADOW_COLOR) }, { "STYLE_SHADOW_COLOR", be_cconst_int(LV_STYLE_SHADOW_COLOR) },
{ "STYLE_SHADOW_OFFSET_X", be_cconst_int(LV_STYLE_SHADOW_OFFSET_X) }, { "STYLE_SHADOW_OFFSET_X", be_cconst_int(LV_STYLE_SHADOW_OFFSET_X) },
{ "STYLE_SHADOW_OFFSET_Y", be_cconst_int(LV_STYLE_SHADOW_OFFSET_Y) }, { "STYLE_SHADOW_OFFSET_Y", be_cconst_int(LV_STYLE_SHADOW_OFFSET_Y) },

View File

@ -254,6 +254,11 @@ LV_COVER_RES_NOT_COVER
LV_COVER_RES_MASKED LV_COVER_RES_MASKED
// File: ../../lvgl/src/core/lv_obj_pos.h // File: ../../lvgl/src/core/lv_obj_pos.h
LV_OBJ_POINT_TRANSFORM_FLAG_NONE
LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE
LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE
LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE_RECURSIVE
// File: ../../lvgl/src/core/lv_obj_property.h // File: ../../lvgl/src/core/lv_obj_property.h
// File: ../../lvgl/src/core/lv_obj_scroll.h // File: ../../lvgl/src/core/lv_obj_scroll.h
LV_SCROLLBAR_MODE_OFF LV_SCROLLBAR_MODE_OFF
@ -324,11 +329,6 @@ LV_DRAW_TASK_STATE_READY
LV_STRIDE_AUTO LV_STRIDE_AUTO
// File: ../../lvgl/src/draw/lv_draw_image.h // File: ../../lvgl/src/draw/lv_draw_image.h
// File: ../../lvgl/src/draw/lv_draw_label.h // File: ../../lvgl/src/draw/lv_draw_label.h
LV_DRAW_LETTER_BITMAP_FORMAT_INVALID
LV_DRAW_LETTER_BITMAP_FORMAT_A8
LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE
LV_DRAW_LETTER_VECTOR_FORMAT
// File: ../../lvgl/src/draw/lv_draw_line.h // File: ../../lvgl/src/draw/lv_draw_line.h
// File: ../../lvgl/src/draw/lv_draw_mask.h // File: ../../lvgl/src/draw/lv_draw_mask.h
// File: ../../lvgl/src/draw/lv_draw_rect.h // File: ../../lvgl/src/draw/lv_draw_rect.h
@ -377,12 +377,17 @@ LV_VECTOR_GRADIENT_SPREAD_REFLECT
LV_VECTOR_GRADIENT_STYLE_LINEAR LV_VECTOR_GRADIENT_STYLE_LINEAR
LV_VECTOR_GRADIENT_STYLE_RADIAL LV_VECTOR_GRADIENT_STYLE_RADIAL
// File: ../../lvgl/src/draw/lv_image_buf.h // File: ../../lvgl/src/draw/lv_image_decoder.h
LV_IMAGE_SRC_VARIABLE
LV_IMAGE_SRC_FILE
LV_IMAGE_SRC_SYMBOL
LV_IMAGE_SRC_UNKNOWN
// File: ../../lvgl/src/draw/lv_image_dsc.h
LV_IMAGE_FLAGS_PREMULTIPLIED LV_IMAGE_FLAGS_PREMULTIPLIED
LV_IMAGE_FLAGS_MODIFIABLE
LV_IMAGE_FLAGS_VECTORS
LV_IMAGE_FLAGS_COMPRESSED LV_IMAGE_FLAGS_COMPRESSED
LV_IMAGE_FLAGS_ALLOCATED LV_IMAGE_FLAGS_ALLOCATED
LV_IMAGE_FLAGS_MODIFIABLE
LV_IMAGE_FLAGS_USER1 LV_IMAGE_FLAGS_USER1
LV_IMAGE_FLAGS_USER2 LV_IMAGE_FLAGS_USER2
LV_IMAGE_FLAGS_USER3 LV_IMAGE_FLAGS_USER3
@ -396,12 +401,7 @@ LV_IMAGE_COMPRESS_NONE
LV_IMAGE_COMPRESS_RLE LV_IMAGE_COMPRESS_RLE
LV_IMAGE_COMPRESS_LZ4 LV_IMAGE_COMPRESS_LZ4
// File: ../../lvgl/src/draw/lv_image_decoder.h LV_IMAGE_HEADER_MAGIC
LV_IMAGE_SRC_VARIABLE
LV_IMAGE_SRC_FILE
LV_IMAGE_SRC_SYMBOL
LV_IMAGE_SRC_UNKNOWN
// File: ../../lvgl/src/layouts/flex/lv_flex.h // File: ../../lvgl/src/layouts/flex/lv_flex.h
LV_FLEX_ALIGN_START LV_FLEX_ALIGN_START
LV_FLEX_ALIGN_END LV_FLEX_ALIGN_END
@ -512,6 +512,7 @@ LV_COLOR_FORMAT_I4
LV_COLOR_FORMAT_I8 LV_COLOR_FORMAT_I8
LV_COLOR_FORMAT_A8 LV_COLOR_FORMAT_A8
LV_COLOR_FORMAT_RGB565 LV_COLOR_FORMAT_RGB565
LV_COLOR_FORMAT_ARGB8565
LV_COLOR_FORMAT_RGB565A8 LV_COLOR_FORMAT_RGB565A8
LV_COLOR_FORMAT_RGB888 LV_COLOR_FORMAT_RGB888
LV_COLOR_FORMAT_ARGB8888 LV_COLOR_FORMAT_ARGB8888
@ -555,6 +556,7 @@ LV_EVENT_SCROLL_END
LV_EVENT_SCROLL LV_EVENT_SCROLL
LV_EVENT_GESTURE LV_EVENT_GESTURE
LV_EVENT_KEY LV_EVENT_KEY
LV_EVENT_ROTARY
LV_EVENT_FOCUSED LV_EVENT_FOCUSED
LV_EVENT_DEFOCUSED LV_EVENT_DEFOCUSED
LV_EVENT_LEAVE LV_EVENT_LEAVE
@ -597,6 +599,8 @@ LV_EVENT_RENDER_START
LV_EVENT_RENDER_READY LV_EVENT_RENDER_READY
LV_EVENT_FLUSH_START LV_EVENT_FLUSH_START
LV_EVENT_FLUSH_FINISH LV_EVENT_FLUSH_FINISH
LV_EVENT_FLUSH_WAIT_START
LV_EVENT_FLUSH_WAIT_FINISH
LV_EVENT_VSYNC LV_EVENT_VSYNC
LV_EVENT_PREPROCESS LV_EVENT_PREPROCESS
@ -775,6 +779,8 @@ LV_STYLE_TRANSFORM_PIVOT_X
LV_STYLE_TRANSFORM_PIVOT_Y LV_STYLE_TRANSFORM_PIVOT_Y
LV_STYLE_TRANSFORM_SKEW_X LV_STYLE_TRANSFORM_SKEW_X
LV_STYLE_TRANSFORM_SKEW_Y LV_STYLE_TRANSFORM_SKEW_Y
LV_STYLE_BITMAP_MASK_SRC
LV_STYLE_ROTARY_SENSITIVITY
LV_STYLE_FLEX_FLOW LV_STYLE_FLEX_FLOW
LV_STYLE_FLEX_MAIN_PLACE LV_STYLE_FLEX_MAIN_PLACE
LV_STYLE_FLEX_CROSS_PLACE LV_STYLE_FLEX_CROSS_PLACE

View File

@ -100,16 +100,18 @@ lv_result_t lv_obj_send_event(lv_obj_t * obj, lv_event_code_t event_code, void *
lv_result_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e) lv_result_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e)
lv_obj_t * lv_event_get_current_target_obj(lv_event_t * e) lv_obj_t * lv_event_get_current_target_obj(lv_event_t * e)
lv_obj_t * lv_event_get_target_obj(lv_event_t * e) lv_obj_t * lv_event_get_target_obj(lv_event_t * e)
void lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data) lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data)
uint32_t lv_obj_get_event_count(lv_obj_t * obj) uint32_t lv_obj_get_event_count(lv_obj_t * obj)
lv_event_dsc_t * lv_obj_get_event_dsc(lv_obj_t * obj, uint32_t index) lv_event_dsc_t * lv_obj_get_event_dsc(lv_obj_t * obj, uint32_t index)
bool lv_obj_remove_event(lv_obj_t * obj, uint32_t index) bool lv_obj_remove_event(lv_obj_t * obj, uint32_t index)
bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb) bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb)
bool lv_obj_remove_event_dsc(lv_obj_t * obj, lv_event_dsc_t * dsc)
uint32_t lv_obj_remove_event_cb_with_user_data(lv_obj_t * obj, lv_event_cb_t event_cb, void * user_data) uint32_t lv_obj_remove_event_cb_with_user_data(lv_obj_t * obj, lv_event_cb_t event_cb, void * user_data)
lv_indev_t * lv_event_get_indev(lv_event_t * e) lv_indev_t * lv_event_get_indev(lv_event_t * e)
lv_layer_t * lv_event_get_layer(lv_event_t * e) lv_layer_t * lv_event_get_layer(lv_event_t * e)
const lv_area_t * lv_event_get_old_size(lv_event_t * e) const lv_area_t * lv_event_get_old_size(lv_event_t * e)
uint32_t lv_event_get_key(lv_event_t * e) uint32_t lv_event_get_key(lv_event_t * e)
int32_t lv_event_get_rotary_diff(lv_event_t * e)
lv_anim_t * lv_event_get_scroll_anim(lv_event_t * e) lv_anim_t * lv_event_get_scroll_anim(lv_event_t * e)
void lv_event_set_ext_draw_size(lv_event_t * e, int32_t size) void lv_event_set_ext_draw_size(lv_event_t * e, int32_t size)
lv_point_t * lv_event_get_self_size_info(lv_event_t * e) lv_point_t * lv_event_get_self_size_info(lv_event_t * e)
@ -154,8 +156,9 @@ bool lv_obj_refresh_self_size(lv_obj_t * obj)
void lv_obj_refr_pos(lv_obj_t * obj) void lv_obj_refr_pos(lv_obj_t * obj)
void lv_obj_move_to(lv_obj_t * obj, int32_t x, int32_t y) void lv_obj_move_to(lv_obj_t * obj, int32_t x, int32_t y)
void lv_obj_move_children_by(lv_obj_t * obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) void lv_obj_move_children_by(lv_obj_t * obj, int32_t x_diff, int32_t y_diff, bool ignore_floating)
void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, bool recursive, bool inv) void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, lv_obj_point_transform_flag_t flags)
void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, bool recursive, bool inv) void lv_obj_transform_point_array(const lv_obj_t * obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags)
void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, lv_obj_point_transform_flag_t flags)
void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area) void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area)
void lv_obj_invalidate(const lv_obj_t * obj) void lv_obj_invalidate(const lv_obj_t * obj)
bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area) bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
@ -336,6 +339,8 @@ static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(cons
static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t * obj, uint32_t part) static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t * obj, uint32_t part)
static inline uint16_t lv_obj_get_style_layout(const lv_obj_t * obj, uint32_t part) static inline uint16_t lv_obj_get_style_layout(const lv_obj_t * obj, uint32_t part)
static inline lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t * obj, uint32_t part) static inline lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t * obj, uint32_t part)
static inline const lv_image_dsc_t * lv_obj_get_style_bitmap_mask_src(const lv_obj_t * obj, uint32_t part)
static inline uint32_t lv_obj_get_style_rotary_sensitivity(const lv_obj_t * obj, uint32_t part)
static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, uint32_t part) static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, uint32_t part)
static inline lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t * obj, uint32_t part) static inline lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t * obj, uint32_t part)
static inline lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t * obj, uint32_t part) static inline lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t * obj, uint32_t part)
@ -444,6 +449,8 @@ void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t
void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector) void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector)
void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector) void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector)
void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector) void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector)
void lv_obj_set_style_bitmap_mask_src(lv_obj_t * obj, const lv_image_dsc_t * value, lv_style_selector_t selector)
void lv_obj_set_style_rotary_sensitivity(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector) void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector)
void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector) void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector) void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector)
@ -545,6 +552,7 @@ void lv_display_set_user_data(lv_display_t * disp, void * user_data)
void lv_display_set_driver_data(lv_display_t * disp, void * driver_data) void lv_display_set_driver_data(lv_display_t * disp, void * driver_data)
void * lv_display_get_user_data(lv_display_t * disp) void * lv_display_get_user_data(lv_display_t * disp)
void * lv_display_get_driver_data(lv_display_t * disp) void * lv_display_get_driver_data(lv_display_t * disp)
lv_draw_buf_t * lv_display_get_buf_active(lv_display_t * disp)
static inline int32_t lv_dpx(int32_t n) static inline int32_t lv_dpx(int32_t n)
static inline int32_t lv_display_dpx(const lv_display_t * disp, int32_t n) static inline int32_t lv_display_dpx(const lv_display_t * disp, int32_t n)
@ -568,11 +576,13 @@ void * lv_draw_layer_go_to_xy(lv_layer_t * layer, int32_t x, int32_t y)
// ../../lvgl/src/draw/lv_draw_arc.h // ../../lvgl/src/draw/lv_draw_arc.h
void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t * dsc) void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t * dsc)
lv_draw_arc_dsc_t * lv_draw_task_get_arc_dsc(lv_draw_task_t * task)
void lv_draw_arc(lv_layer_t * layer, const lv_draw_arc_dsc_t * dsc) void lv_draw_arc(lv_layer_t * layer, const lv_draw_arc_dsc_t * dsc)
void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t * area) void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t * area)
// ../../lvgl/src/draw/lv_draw_label.h // ../../lvgl/src/draw/lv_draw_label.h
void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc) void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
lv_draw_label_dsc_t * lv_draw_task_get_label_dsc(lv_draw_task_t * task)
void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc) void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc)
void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords) void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords)
void lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, const lv_point_t * point, uint32_t unicode_letter) void lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, const lv_point_t * point, uint32_t unicode_letter)
@ -580,21 +590,27 @@ void lv_draw_label_iterate_characters(lv_draw_unit_t * draw_unit, const lv_draw_
// ../../lvgl/src/draw/lv_draw_line.h // ../../lvgl/src/draw/lv_draw_line.h
void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc) void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
lv_draw_line_dsc_t * lv_draw_task_get_line_dsc(lv_draw_task_t * task)
void lv_draw_line(lv_layer_t * layer, const lv_draw_line_dsc_t * dsc) void lv_draw_line(lv_layer_t * layer, const lv_draw_line_dsc_t * dsc)
// ../../lvgl/src/draw/lv_draw_mask.h // ../../lvgl/src/draw/lv_draw_mask.h
void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc) void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc)
lv_draw_mask_rect_dsc_t * lv_draw_task_get_mask_rect_dsc(lv_draw_task_t * task)
void lv_draw_mask_rect(lv_layer_t * layer, const lv_draw_mask_rect_dsc_t * dsc) void lv_draw_mask_rect(lv_layer_t * layer, const lv_draw_mask_rect_dsc_t * dsc)
// ../../lvgl/src/draw/lv_draw_rect.h // ../../lvgl/src/draw/lv_draw_rect.h
void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc) void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc)
void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t * dsc) void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t * dsc)
lv_draw_fill_dsc_t * lv_draw_task_get_fill_dsc(lv_draw_task_t * task)
void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc) void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc)
lv_draw_border_dsc_t * lv_draw_task_get_border_dsc(lv_draw_task_t * task)
void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc) void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc)
lv_draw_box_shadow_dsc_t * lv_draw_task_get_box_shadow_dsc(lv_draw_task_t * task)
void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords) void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords)
// ../../lvgl/src/draw/lv_draw_triangle.h // ../../lvgl/src/draw/lv_draw_triangle.h
void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t * draw_dsc) void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t * draw_dsc)
lv_draw_triangle_dsc_t * lv_draw_task_get_triangle_dsc(lv_draw_task_t * task)
void lv_draw_triangle(lv_layer_t * layer, const lv_draw_triangle_dsc_t * draw_dsc) void lv_draw_triangle(lv_layer_t * layer, const lv_draw_triangle_dsc_t * draw_dsc)
// ../../lvgl/src/draw/lv_draw_vector.h // ../../lvgl/src/draw/lv_draw_vector.h
@ -604,6 +620,8 @@ void lv_matrix_scale(lv_matrix_t * matrix, float scale_x, float scale_y)
void lv_matrix_rotate(lv_matrix_t * matrix, float degree) void lv_matrix_rotate(lv_matrix_t * matrix, float degree)
void lv_matrix_skew(lv_matrix_t * matrix, float skew_x, float skew_y) void lv_matrix_skew(lv_matrix_t * matrix, float skew_x, float skew_y)
void lv_matrix_multiply(lv_matrix_t * matrix, const lv_matrix_t * matrix2) void lv_matrix_multiply(lv_matrix_t * matrix, const lv_matrix_t * matrix2)
void lv_matrix_transform_point(const lv_matrix_t * matrix, lv_fpoint_t * point)
void lv_matrix_transform_path(const lv_matrix_t * matrix, lv_vector_path_t * path)
lv_vector_path_t * lv_vector_path_create(lv_vector_path_quality_t quality) lv_vector_path_t * lv_vector_path_create(lv_vector_path_quality_t quality)
void lv_vector_path_copy(lv_vector_path_t * target_path, const lv_vector_path_t * path) void lv_vector_path_copy(lv_vector_path_t * target_path, const lv_vector_path_t * path)
void lv_vector_path_clear(lv_vector_path_t * path) void lv_vector_path_clear(lv_vector_path_t * path)
@ -613,8 +631,10 @@ void lv_vector_path_line_to(lv_vector_path_t * path, const lv_fpoint_t * p)
void lv_vector_path_quad_to(lv_vector_path_t * path, const lv_fpoint_t * p1, const lv_fpoint_t * p2) void lv_vector_path_quad_to(lv_vector_path_t * path, const lv_fpoint_t * p1, const lv_fpoint_t * p2)
void lv_vector_path_cubic_to(lv_vector_path_t * path, const lv_fpoint_t * p1, const lv_fpoint_t * p2, const lv_fpoint_t * p3) void lv_vector_path_cubic_to(lv_vector_path_t * path, const lv_fpoint_t * p1, const lv_fpoint_t * p2, const lv_fpoint_t * p3)
void lv_vector_path_close(lv_vector_path_t * path) void lv_vector_path_close(lv_vector_path_t * path)
void lv_vector_path_get_bounding(const lv_vector_path_t * path, lv_area_t * area)
void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry) void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry)
void lv_vector_path_append_circle(lv_vector_path_t * path, const lv_fpoint_t * c, float rx, float ry) void lv_vector_path_append_circle(lv_vector_path_t * path, const lv_fpoint_t * c, float rx, float ry)
void lv_vector_path_append_arc(lv_vector_path_t * path, const lv_fpoint_t * c, float radius, float start_angle, float sweep, bool pie)
void lv_vector_path_append_path(lv_vector_path_t * path, const lv_vector_path_t * subpath) void lv_vector_path_append_path(lv_vector_path_t * path, const lv_vector_path_t * subpath)
lv_vector_dsc_t * lv_vector_dsc_create(lv_layer_t * layer) lv_vector_dsc_t * lv_vector_dsc_create(lv_layer_t * layer)
void lv_vector_dsc_delete(lv_vector_dsc_t * dsc) void lv_vector_dsc_delete(lv_vector_dsc_t * dsc)
@ -661,17 +681,17 @@ void lv_indev_delete(lv_indev_t * indev)
lv_indev_t * lv_indev_get_next(lv_indev_t * indev) lv_indev_t * lv_indev_get_next(lv_indev_t * indev)
void lv_indev_read(lv_indev_t * indev) void lv_indev_read(lv_indev_t * indev)
void lv_indev_read_timer_cb(lv_timer_t * timer) void lv_indev_read_timer_cb(lv_timer_t * timer)
void lv_indev_enable(lv_indev_t * indev, bool en) void lv_indev_enable(lv_indev_t * indev, bool enable)
lv_indev_t * lv_indev_active(void) lv_indev_t * lv_indev_active(void)
void lv_indev_set_type(lv_indev_t * indev, lv_indev_type_t indev_type) void lv_indev_set_type(lv_indev_t * indev, lv_indev_type_t indev_type)
void lv_indev_set_read_cb(lv_indev_t * indev, lv_indev_read_cb_t read_cb) void lv_indev_set_read_cb(lv_indev_t * indev, lv_indev_read_cb_t read_cb)
void lv_indev_set_user_data(lv_indev_t * indev, void * user_data) void lv_indev_set_user_data(lv_indev_t * indev, void * user_data)
void lv_indev_set_driver_data(lv_indev_t * indev, void * driver_data) void lv_indev_set_driver_data(lv_indev_t * indev, void * driver_data)
void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp)
lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev) lv_indev_type_t lv_indev_get_type(const lv_indev_t * indev)
lv_indev_read_cb_t lv_indev_get_read_cb(lv_indev_t * indev) lv_indev_read_cb_t lv_indev_get_read_cb(lv_indev_t * indev)
lv_indev_state_t lv_indev_get_state(const lv_indev_t * indev) lv_indev_state_t lv_indev_get_state(const lv_indev_t * indev)
lv_group_t * lv_indev_get_group(const lv_indev_t * indev) lv_group_t * lv_indev_get_group(const lv_indev_t * indev)
void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp)
lv_display_t * lv_indev_get_display(const lv_indev_t * indev) lv_display_t * lv_indev_get_display(const lv_indev_t * indev)
void * lv_indev_get_user_data(const lv_indev_t * indev) void * lv_indev_get_user_data(const lv_indev_t * indev)
void * lv_indev_get_driver_data(const lv_indev_t * indev) void * lv_indev_get_driver_data(const lv_indev_t * indev)
@ -719,11 +739,13 @@ void lv_qrcode_set_dark_color(lv_obj_t * obj, lv_color_t color)
void lv_qrcode_set_light_color(lv_obj_t * obj, lv_color_t color) void lv_qrcode_set_light_color(lv_obj_t * obj, lv_color_t color)
lv_result_t lv_qrcode_update(lv_obj_t * obj, const void * data, uint32_t data_len) lv_result_t lv_qrcode_update(lv_obj_t * obj, const void * data, uint32_t data_len)
// ../../lvgl/src/lv_api_map.h // ../../lvgl/src/lv_api_map_v8.h
static inline uint32_t lv_task_handler(void) static inline uint32_t lv_task_handler(void)
static inline void lv_obj_move_foreground(lv_obj_t * obj) static inline void lv_obj_move_foreground(lv_obj_t * obj)
static inline void lv_obj_move_background(lv_obj_t * obj) static inline void lv_obj_move_background(lv_obj_t * obj)
// ../../lvgl/src/lv_api_map_v9_0.h
// ../../lvgl/src/misc/lv_anim.h // ../../lvgl/src/misc/lv_anim.h
void lv_anim_init(lv_anim_t * a) void lv_anim_init(lv_anim_t * a)
static inline void lv_anim_set_var(lv_anim_t * a, void * var) static inline void lv_anim_set_var(lv_anim_t * a, void * var)
@ -774,7 +796,8 @@ uint32_t lv_area_get_size(const lv_area_t * area_p)
void lv_area_increase(lv_area_t * area, int32_t w_extra, int32_t h_extra) void lv_area_increase(lv_area_t * area, int32_t w_extra, int32_t h_extra)
void lv_area_move(lv_area_t * area, int32_t x_ofs, int32_t y_ofs) void lv_area_move(lv_area_t * area, int32_t x_ofs, int32_t y_ofs)
void lv_area_align(const lv_area_t * base, lv_area_t * to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) void lv_area_align(const lv_area_t * base, lv_area_t * to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y)
void lv_point_transform(lv_point_t * p, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t * pivot, bool zoom_first) void lv_point_transform(lv_point_t * point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t * pivot, bool zoom_first)
void lv_point_array_transform(lv_point_t * points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t * pivot, bool zoom_first)
static inline lv_point_t lv_point_from_precise(const lv_point_precise_t * p) static inline lv_point_t lv_point_from_precise(const lv_point_precise_t * p)
static inline lv_point_precise_t lv_point_to_precise(const lv_point_t * p) static inline lv_point_precise_t lv_point_to_precise(const lv_point_t * p)
static inline void lv_point_set(lv_point_t * p, int32_t x, int32_t y) static inline void lv_point_set(lv_point_t * p, int32_t x, int32_t y)
@ -817,7 +840,8 @@ static inline void lv_color_filter_dsc_init(lv_color_filter_dsc_t * dsc, lv_colo
// ../../lvgl/src/misc/lv_event.h // ../../lvgl/src/misc/lv_event.h
lv_result_t lv_event_send(lv_event_list_t * list, lv_event_t * e, bool preprocess) lv_result_t lv_event_send(lv_event_list_t * list, lv_event_t * e, bool preprocess)
void lv_event_add(lv_event_list_t * list, lv_event_cb_t cb, lv_event_code_t filter, void * user_data) lv_event_dsc_t * lv_event_add(lv_event_list_t * list, lv_event_cb_t cb, lv_event_code_t filter, void * user_data)
bool lv_event_remove_dsc(lv_event_list_t * list, lv_event_dsc_t * dsc)
uint32_t lv_event_get_count(lv_event_list_t * list) uint32_t lv_event_get_count(lv_event_list_t * list)
lv_event_dsc_t * lv_event_get_dsc(lv_event_list_t * list, uint32_t index) lv_event_dsc_t * lv_event_get_dsc(lv_event_list_t * list, uint32_t index)
lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t * dsc) lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t * dsc)
@ -948,6 +972,8 @@ void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t
void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value) void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value)
void lv_style_set_layout(lv_style_t * style, uint16_t value) void lv_style_set_layout(lv_style_t * style, uint16_t value)
void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value) void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value)
void lv_style_set_bitmap_mask_src(lv_style_t * style, const lv_image_dsc_t * value)
void lv_style_set_rotary_sensitivity(lv_style_t * style, uint32_t value)
void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value) void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value)
void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value) void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value)
void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value) void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value)
@ -1108,7 +1134,7 @@ lv_obj_t * lv_canvas_create(lv_obj_t * parent)
void lv_canvas_set_buffer(lv_obj_t * obj, void * buf, int32_t w, int32_t h, lv_color_format_t cf) void lv_canvas_set_buffer(lv_obj_t * obj, void * buf, int32_t w, int32_t h, lv_color_format_t cf)
void lv_canvas_set_draw_buf(lv_obj_t * obj, lv_draw_buf_t * draw_buf) void lv_canvas_set_draw_buf(lv_obj_t * obj, lv_draw_buf_t * draw_buf)
void lv_canvas_set_px(lv_obj_t * obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa) void lv_canvas_set_px(lv_obj_t * obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa)
void lv_canvas_set_palette(lv_obj_t * canvas, uint8_t id, lv_color32_t c) void lv_canvas_set_palette(lv_obj_t * obj, uint8_t index, lv_color32_t color)
lv_draw_buf_t * lv_canvas_get_draw_buf(lv_obj_t * obj) lv_draw_buf_t * lv_canvas_get_draw_buf(lv_obj_t * obj)
lv_color32_t lv_canvas_get_px(lv_obj_t * obj, int32_t x, int32_t y) lv_color32_t lv_canvas_get_px(lv_obj_t * obj, int32_t x, int32_t y)
lv_image_dsc_t * lv_canvas_get_image(lv_obj_t * canvas) lv_image_dsc_t * lv_canvas_get_image(lv_obj_t * canvas)
@ -1197,6 +1223,7 @@ void lv_image_set_scale_y(lv_obj_t * obj, uint32_t zoom)
void lv_image_set_blend_mode(lv_obj_t * obj, lv_blend_mode_t blend_mode) void lv_image_set_blend_mode(lv_obj_t * obj, lv_blend_mode_t blend_mode)
void lv_image_set_antialias(lv_obj_t * obj, bool antialias) void lv_image_set_antialias(lv_obj_t * obj, bool antialias)
void lv_image_set_inner_align(lv_obj_t * obj, lv_image_align_t align) void lv_image_set_inner_align(lv_obj_t * obj, lv_image_align_t align)
void lv_image_set_bitmap_map_src(lv_obj_t * obj, const lv_image_dsc_t * src)
const void * lv_image_get_src(lv_obj_t * obj) const void * lv_image_get_src(lv_obj_t * obj)
int32_t lv_image_get_offset_x(lv_obj_t * obj) int32_t lv_image_get_offset_x(lv_obj_t * obj)
int32_t lv_image_get_offset_y(lv_obj_t * obj) int32_t lv_image_get_offset_y(lv_obj_t * obj)
@ -1208,6 +1235,7 @@ int32_t lv_image_get_scale_y(lv_obj_t * obj)
lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t * obj) lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t * obj)
bool lv_image_get_antialias(lv_obj_t * obj) bool lv_image_get_antialias(lv_obj_t * obj)
lv_image_align_t lv_image_get_inner_align(lv_obj_t * obj) lv_image_align_t lv_image_get_inner_align(lv_obj_t * obj)
const lv_image_dsc_t * lv_image_get_bitmap_map_src(lv_obj_t * obj)
// ../../lvgl/src/widgets/imagebutton/lv_imagebutton.h // ../../lvgl/src/widgets/imagebutton/lv_imagebutton.h
lv_obj_t * lv_imagebutton_create(lv_obj_t * parent) lv_obj_t * lv_imagebutton_create(lv_obj_t * parent)

View File

@ -192,10 +192,10 @@ const be_ctypes_structure_t be_lv_image_header = {
}}; }};
const be_ctypes_structure_t be_lv_draw_image_dsc = { const be_ctypes_structure_t be_lv_draw_image_dsc = {
84, /* size in bytes */ 100, /* size in bytes */
29, /* number of elements */ 33, /* number of elements */
be_ctypes_instance_mappings, be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[29]) { (const be_ctypes_structure_item_t[33]) {
{ "antialias", 77, 4, 1, ctypes_bf, 0 }, { "antialias", 77, 4, 1, ctypes_bf, 0 },
{ "base_dsc_size", 20, 0, 0, ctypes_u32, 0 }, { "base_dsc_size", 20, 0, 0, ctypes_u32, 0 },
{ "base_id1", 8, 0, 0, ctypes_u32, 0 }, { "base_id1", 8, 0, 0, ctypes_u32, 0 },
@ -213,6 +213,10 @@ const be_ctypes_structure_t be_lv_draw_image_dsc = {
{ "header_stride", 40, 0, 0, ctypes_u16, 0 }, { "header_stride", 40, 0, 0, ctypes_u16, 0 },
{ "header_w", 36, 0, 0, ctypes_u16, 0 }, { "header_w", 36, 0, 0, ctypes_u16, 0 },
{ "opa", 76, 0, 0, ctypes_u8, 0 }, { "opa", 76, 0, 0, ctypes_u8, 0 },
{ "original_area_x1", 80, 0, 0, ctypes_i32, 0 },
{ "original_area_x2", 88, 0, 0, ctypes_i32, 0 },
{ "original_area_y1", 84, 0, 0, ctypes_i32, 0 },
{ "original_area_y2", 92, 0, 0, ctypes_i32, 0 },
{ "pivot_x", 64, 0, 0, ctypes_i32, 0 }, { "pivot_x", 64, 0, 0, ctypes_i32, 0 },
{ "pivot_y", 68, 0, 0, ctypes_i32, 0 }, { "pivot_y", 68, 0, 0, ctypes_i32, 0 },
{ "recolor", 72, 0, 0, ctypes_u24, 1 }, { "recolor", 72, 0, 0, ctypes_u24, 1 },
@ -223,7 +227,7 @@ const be_ctypes_structure_t be_lv_draw_image_dsc = {
{ "skew_x", 56, 0, 0, ctypes_i32, 0 }, { "skew_x", 56, 0, 0, ctypes_i32, 0 },
{ "skew_y", 60, 0, 0, ctypes_i32, 0 }, { "skew_y", 60, 0, 0, ctypes_i32, 0 },
{ "src", 28, 0, 0, ctypes_ptr32, 0 }, { "src", 28, 0, 0, ctypes_ptr32, 0 },
{ "sup", 80, 0, 0, ctypes_ptr32, 0 }, { "sup", 96, 0, 0, ctypes_ptr32, 0 },
{ "tile", 77, 5, 1, ctypes_bf, 0 }, { "tile", 77, 5, 1, ctypes_bf, 0 },
}}; }};
@ -260,42 +264,6 @@ const be_ctypes_structure_t be_lv_draw_label_dsc = {
{ "text_local", 76, 6, 1, ctypes_bf, 0 }, { "text_local", 76, 6, 1, ctypes_bf, 0 },
}}; }};
const be_ctypes_structure_t be_lv_meter_scale = {
40, /* size in bytes */
14, /* number of elements */
be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[14]) {
{ "angle_range", 34, 0, 0, ctypes_u16, 0 },
{ "label_gap", 20, 0, 0, ctypes_i16, 0 },
{ "max", 28, 0, 0, ctypes_i32, 0 },
{ "min", 24, 0, 0, ctypes_i32, 0 },
{ "r_mod", 32, 0, 0, ctypes_i16, 0 },
{ "rotation", 36, 0, 0, ctypes_i16, 0 },
{ "tick_cnt", 4, 0, 0, ctypes_u16, 0 },
{ "tick_color", 0, 0, 0, ctypes_u24, 1 },
{ "tick_length", 6, 0, 0, ctypes_u16, 0 },
{ "tick_major_color", 10, 0, 0, ctypes_u24, 1 },
{ "tick_major_length", 16, 0, 0, ctypes_u16, 0 },
{ "tick_major_nth", 14, 0, 0, ctypes_u16, 0 },
{ "tick_major_width", 18, 0, 0, ctypes_u16, 0 },
{ "tick_width", 8, 0, 0, ctypes_u16, 0 },
}};
const be_ctypes_structure_t be_lv_meter_indicator = {
28, /* size in bytes */
8, /* number of elements */
be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[8]) {
{ "data0", 16, 0, 0, ctypes_ptr32, 0 },
{ "data1", 20, 0, 0, ctypes_ptr32, 0 },
{ "data2", 24, 0, 0, ctypes_ptr32, 0 },
{ "end_value", 12, 0, 0, ctypes_i32, 0 },
{ "opa", 5, 0, 0, ctypes_u8, 0 },
{ "scale", 0, 0, 0, ctypes_ptr32, 0 },
{ "start_value", 8, 0, 0, ctypes_i32, 0 },
{ "type", 4, 0, 0, ctypes_u8, 0 },
}};
const be_ctypes_structure_t be_lv_chart_series = { const be_ctypes_structure_t be_lv_chart_series = {
20, /* size in bytes */ 20, /* size in bytes */
9, /* number of elements */ 9, /* number of elements */
@ -362,10 +330,10 @@ const be_ctypes_structure_t be_lv_event = {
}}; }};
const be_ctypes_structure_t be_lv_image_dsc = { const be_ctypes_structure_t be_lv_image_dsc = {
20, /* size in bytes */ 24, /* size in bytes */
9, /* number of elements */ 10, /* number of elements */
be_ctypes_instance_mappings, be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[9]) { (const be_ctypes_structure_item_t[10]) {
{ "data", 16, 0, 0, ctypes_ptr32, 0 }, { "data", 16, 0, 0, ctypes_ptr32, 0 },
{ "data_size", 12, 0, 0, ctypes_u32, 0 }, { "data_size", 12, 0, 0, ctypes_u32, 0 },
{ "header_cf", 1, 0, 0, ctypes_u8, 0 }, { "header_cf", 1, 0, 0, ctypes_u8, 0 },
@ -375,6 +343,7 @@ const be_ctypes_structure_t be_lv_image_dsc = {
{ "header_reserved_2", 10, 0, 0, ctypes_u16, 0 }, { "header_reserved_2", 10, 0, 0, ctypes_u16, 0 },
{ "header_stride", 8, 0, 0, ctypes_u16, 0 }, { "header_stride", 8, 0, 0, ctypes_u16, 0 },
{ "header_w", 4, 0, 0, ctypes_u16, 0 }, { "header_w", 4, 0, 0, ctypes_u16, 0 },
{ "reserved", 20, 0, 0, ctypes_ptr32, 0 },
}}; }};
const be_ctypes_structure_t be_lv_style_transition_dsc = { const be_ctypes_structure_t be_lv_style_transition_dsc = {
@ -412,6 +381,16 @@ const be_ctypes_structure_t be_lv_timer_ntv = {
{ "user_data", 12, 0, 0, ctypes_ptr32, 0 }, { "user_data", 12, 0, 0, ctypes_ptr32, 0 },
}}; }};
const be_ctypes_structure_t be_lv_event_dsc = {
12, /* size in bytes */
3, /* number of elements */
be_ctypes_instance_mappings,
(const be_ctypes_structure_item_t[3]) {
{ "cb", 0, 0, 0, ctypes_ptr32, 0 },
{ "filter", 8, 0, 0, ctypes_u32, 0 },
{ "user_data", 4, 0, 0, ctypes_ptr32, 0 },
}};
const be_ctypes_structure_t be_lv_ts_calibration = { const be_ctypes_structure_t be_lv_ts_calibration = {
20, /* size in bytes */ 20, /* size in bytes */
5, /* number of elements */ 5, /* number of elements */
@ -440,12 +419,11 @@ static be_define_ctypes_class(lv_draw_label_dsc, &be_lv_draw_label_dsc, &be_clas
static be_define_ctypes_class(lv_draw_line_dsc, &be_lv_draw_line_dsc, &be_class_ctypes_bytes, "lv_draw_line_dsc"); static be_define_ctypes_class(lv_draw_line_dsc, &be_lv_draw_line_dsc, &be_class_ctypes_bytes, "lv_draw_line_dsc");
static be_define_ctypes_class(lv_draw_rect_dsc, &be_lv_draw_rect_dsc, &be_class_ctypes_bytes, "lv_draw_rect_dsc"); static be_define_ctypes_class(lv_draw_rect_dsc, &be_lv_draw_rect_dsc, &be_class_ctypes_bytes, "lv_draw_rect_dsc");
static be_define_ctypes_class(lv_event, &be_lv_event, &be_class_ctypes_bytes, "lv_event"); static be_define_ctypes_class(lv_event, &be_lv_event, &be_class_ctypes_bytes, "lv_event");
static be_define_ctypes_class(lv_event_dsc, &be_lv_event_dsc, &be_class_ctypes_bytes, "lv_event_dsc");
static be_define_ctypes_class(lv_grad_dsc, &be_lv_grad_dsc, &be_class_ctypes_bytes, "lv_grad_dsc"); static be_define_ctypes_class(lv_grad_dsc, &be_lv_grad_dsc, &be_class_ctypes_bytes, "lv_grad_dsc");
static be_define_ctypes_class(lv_gradient_stop, &be_lv_gradient_stop, &be_class_ctypes_bytes, "lv_gradient_stop"); static be_define_ctypes_class(lv_gradient_stop, &be_lv_gradient_stop, &be_class_ctypes_bytes, "lv_gradient_stop");
static be_define_ctypes_class(lv_image_dsc, &be_lv_image_dsc, &be_class_ctypes_bytes, "lv_image_dsc"); static be_define_ctypes_class(lv_image_dsc, &be_lv_image_dsc, &be_class_ctypes_bytes, "lv_image_dsc");
static be_define_ctypes_class(lv_image_header, &be_lv_image_header, &be_class_ctypes_bytes, "lv_image_header"); static be_define_ctypes_class(lv_image_header, &be_lv_image_header, &be_class_ctypes_bytes, "lv_image_header");
static be_define_ctypes_class(lv_meter_indicator, &be_lv_meter_indicator, &be_class_ctypes_bytes, "lv_meter_indicator");
static be_define_ctypes_class(lv_meter_scale, &be_lv_meter_scale, &be_class_ctypes_bytes, "lv_meter_scale");
static be_define_ctypes_class(lv_obj_class, &be_lv_obj_class, &be_class_ctypes_bytes, "lv_obj_class"); static be_define_ctypes_class(lv_obj_class, &be_lv_obj_class, &be_class_ctypes_bytes, "lv_obj_class");
static be_define_ctypes_class(lv_point, &be_lv_point, &be_class_ctypes_bytes, "lv_point"); static be_define_ctypes_class(lv_point, &be_lv_point, &be_class_ctypes_bytes, "lv_point");
static be_define_ctypes_class(lv_point_precise, &be_lv_point_precise, &be_class_ctypes_bytes, "lv_point_precise"); static be_define_ctypes_class(lv_point_precise, &be_lv_point_precise, &be_class_ctypes_bytes, "lv_point_precise");
@ -465,12 +443,11 @@ be_ctypes_class_by_name_t be_ctypes_lvgl_classes[] = {
{ "lv_draw_line_dsc", &be_class_lv_draw_line_dsc }, { "lv_draw_line_dsc", &be_class_lv_draw_line_dsc },
{ "lv_draw_rect_dsc", &be_class_lv_draw_rect_dsc }, { "lv_draw_rect_dsc", &be_class_lv_draw_rect_dsc },
{ "lv_event", &be_class_lv_event }, { "lv_event", &be_class_lv_event },
{ "lv_event_dsc", &be_class_lv_event_dsc },
{ "lv_grad_dsc", &be_class_lv_grad_dsc }, { "lv_grad_dsc", &be_class_lv_grad_dsc },
{ "lv_gradient_stop", &be_class_lv_gradient_stop }, { "lv_gradient_stop", &be_class_lv_gradient_stop },
{ "lv_image_dsc", &be_class_lv_image_dsc }, { "lv_image_dsc", &be_class_lv_image_dsc },
{ "lv_image_header", &be_class_lv_image_header }, { "lv_image_header", &be_class_lv_image_header },
{ "lv_meter_indicator", &be_class_lv_meter_indicator },
{ "lv_meter_scale", &be_class_lv_meter_scale },
{ "lv_obj_class", &be_class_lv_obj_class }, { "lv_obj_class", &be_class_lv_obj_class },
{ "lv_point", &be_class_lv_point }, { "lv_point", &be_class_lv_point },
{ "lv_point_precise", &be_class_lv_point_precise }, { "lv_point_precise", &be_class_lv_point_precise },

View File

@ -82,7 +82,7 @@ lv_area = ct.structure(lv_area, "lv_area")
# lv_opa_t opa; /**< The opacity of the color*/ # lv_opa_t opa; /**< The opacity of the color*/
# uint8_t frac; /**< The stop position in 1/255 unit */ # uint8_t frac; /**< The stop position in 1/255 unit */
# } lv_gradient_stop_t; # } lv_gradient_stop_t;
lv_gradient_stop = [ # valid LVGL9 lv_gradient_stop = [ # valid LVGL91
[lv_color, "color"], [lv_color, "color"],
[lv_opa, "opa"], [lv_opa, "opa"],
[uint8_t, "frac"], [uint8_t, "frac"],
@ -95,7 +95,7 @@ lv_gradient_stop = ct.structure(lv_gradient_stop, "lv_gradient_stop")
# lv_grad_dir_t dir : 3; /**< The gradient direction. # lv_grad_dir_t dir : 3; /**< The gradient direction.
# * Any of LV_GRAD_DIR_HOR, LV_GRAD_DIR_VER, LV_GRAD_DIR_NONE */ # * Any of LV_GRAD_DIR_HOR, LV_GRAD_DIR_VER, LV_GRAD_DIR_NONE */
# } lv_grad_dsc_t; # } lv_grad_dsc_t;
lv_grad_dsc = [ # valid LVGL9 lv_grad_dsc = [ # valid LVGL91
# since it's an array and not two structures, we need to explicitly unroll it here or the alignment is wrong # since it's an array and not two structures, we need to explicitly unroll it here or the alignment is wrong
# [lv_gradient_stop, "stops_0"], # [lv_gradient_stop, "stops_0"],
[lv_color, "stops_0_color"], [lv_color, "stops_0_color"],
@ -121,7 +121,7 @@ lv_grad_dsc = ct.structure(lv_grad_dsc, "lv_grad_dsc")
# size_t dsc_size; # size_t dsc_size;
# void * user_data; # void * user_data;
# } lv_draw_dsc_base_t; # } lv_draw_dsc_base_t;
lv_draw_dsc_base = [ # valid LVGL9 lv_draw_dsc_base = [ # valid LVGL91
[ptr, "obj"], [ptr, "obj"],
[uint32_t, "part"], [uint32_t, "part"],
[uint32_t, "id1"], [uint32_t, "id1"],
@ -171,7 +171,7 @@ lv_draw_dsc_base = ct.structure(lv_draw_dsc_base, "lv_draw_dsc_base")
# int32_t shadow_spread; # int32_t shadow_spread;
# lv_opa_t shadow_opa; # lv_opa_t shadow_opa;
# } lv_draw_rect_dsc_t; # } lv_draw_rect_dsc_t;
lv_draw_rect_dsc = [ # valid LVGL9 lv_draw_rect_dsc = [ # valid LVGL91
[lv_draw_dsc_base, "base"], [lv_draw_dsc_base, "base"],
[int32_t, "radius"], [int32_t, "radius"],
@ -227,7 +227,7 @@ lv_draw_rect_dsc = ct.structure(lv_draw_rect_dsc, "lv_draw_rect_dsc")
# uint8_t round_end : 1; # uint8_t round_end : 1;
# uint8_t raw_end : 1; /*Do not bother with perpendicular line ending if it's not visible for any reason*/ # uint8_t raw_end : 1; /*Do not bother with perpendicular line ending if it's not visible for any reason*/
# } lv_draw_line_dsc_t; # } lv_draw_line_dsc_t;
lv_draw_line_dsc = [ # valid LVGL9 lv_draw_line_dsc = [ # valid LVGL91
[lv_draw_dsc_base, "base"], [lv_draw_dsc_base, "base"],
[lv_point_precise, "p1"], [lv_point_precise, "p1"],
@ -257,7 +257,7 @@ lv_draw_line_dsc = ct.structure(lv_draw_line_dsc, "lv_draw_line_dsc")
# lv_opa_t opa; # lv_opa_t opa;
# uint8_t rounded : 1; # uint8_t rounded : 1;
# } lv_draw_arc_dsc_t; # } lv_draw_arc_dsc_t;
lv_draw_arc_dsc = [ # valid LVGL8.3 lv_draw_arc_dsc = [ # valid LVGL91
[lv_draw_dsc_base, "base"], [lv_draw_dsc_base, "base"],
[lv_color, "color"], [lv_color, "color"],
@ -283,8 +283,7 @@ lv_draw_arc_dsc = ct.structure(lv_draw_arc_dsc, "lv_draw_arc_dsc")
# uint32_t stride: 16; /*Number of bytes in a row*/ # uint32_t stride: 16; /*Number of bytes in a row*/
# uint32_t reserved_2: 16; /*Reserved to be used later*/ # uint32_t reserved_2: 16; /*Reserved to be used later*/
# } lv_image_header_t; # } lv_image_header_t;
lv_image_header = [ # valid LVGL91
lv_image_header = [ # valid LVGL9
[uint8_t, "magic"], [uint8_t, "magic"],
[uint8_t, "cf"], [uint8_t, "cf"],
[uint16_t, "flags"], [uint16_t, "flags"],
@ -315,11 +314,16 @@ lv_image_header = ct.structure(lv_image_header, "lv_image_header")
# lv_opa_t opa; # lv_opa_t opa;
# lv_blend_mode_t blend_mode : 4; # lv_blend_mode_t blend_mode : 4;
# uint16_t antialias : 1; # uint16_t antialias : 1;
# uint16_t tile : 1; # uint16_t tile : 1;
# lv_draw_image_sup_t * sup; # lv_draw_image_sup_t * sup;
# /** Might be used to indicate the original size of the image if only a small portion is rendered now.
# * Used when a part of a layer is rendered to show the total layer size*/
# lv_area_t original_area;
# const lv_image_dsc_t * bitmap_mask_src;
# } lv_draw_image_dsc_t; # } lv_draw_image_dsc_t;
lv_draw_image_dsc = [ # valid LVGL9 lv_draw_image_dsc = [ # valid LVGL91
[lv_draw_dsc_base, "base"], [lv_draw_dsc_base, "base"],
[ptr, "src"], [ptr, "src"],
@ -339,12 +343,14 @@ lv_draw_image_dsc = [ # valid LVGL9
[uint8_t_4, "blend_mode"], [uint8_t_4, "blend_mode"],
[uint8_t_1, "antialias"], [uint8_t_1, "antialias"],
[uint8_t_1, "tile"], [uint8_t_1, "tile"],
[lv_area, "original_area"],
[ptr, "sup"], [ptr, "sup"],
] ]
lv_draw_image_dsc = ct.structure(lv_draw_image_dsc, "lv_draw_image_dsc") lv_draw_image_dsc = ct.structure(lv_draw_image_dsc, "lv_draw_image_dsc")
# typedef struct { # typedef struct {
# lv_draw_dsc_base_t base; # lv_draw_dsc_base_t base;
# const char * text; # const char * text;
# const lv_font_t * font; # const lv_font_t * font;
# uint32_t sel_start; # uint32_t sel_start;
@ -368,7 +374,7 @@ lv_draw_image_dsc = ct.structure(lv_draw_image_dsc, "lv_draw_image_dsc")
# uint8_t text_local : 1; # uint8_t text_local : 1;
# lv_draw_label_hint_t * hint; # lv_draw_label_hint_t * hint;
# } lv_draw_label_dsc_t; # } lv_draw_label_dsc_t;
lv_draw_label_dsc = [ # valid LVGL9 lv_draw_label_dsc = [ # valid LVGL91
[lv_draw_dsc_base, "base"], [lv_draw_dsc_base, "base"],
[ptr, "text"], [ptr, "text"],
[ptr, "font"], [ptr, "font"],
@ -392,273 +398,6 @@ lv_draw_label_dsc = [ # valid LVGL9
] ]
lv_draw_label_dsc = ct.structure(lv_draw_label_dsc, "lv_draw_label_dsc") lv_draw_label_dsc = ct.structure(lv_draw_label_dsc, "lv_draw_label_dsc")
# lv_obj_draw_part_dsc = [ # valid LVGL8.3
# [ptr, "draw_ctx"],
# [ptr, "class_p"],
# [uint32_t, "type"],
# [ptr, "draw_area"],
# [ptr, "rect_dsc"],
# [ptr, "label_dsc"],
# [ptr, "line_dsc"],
# [ptr, "img_dsc"],
# [ptr, "arc_dsc"],
# [ptr, "p1"],
# [ptr, "p2"],
# [ptr, "text"],
# [uint32_t, "text_length"],
# [uint32_t, "part"],
# [uint32_t, "id"],
# [lv_coord_t, "radius"],
# [int32_t, "value"],
# [ptr, "sub_part_ptr"],
# ]
# lv_obj_draw_part_dsc = ct.structure(lv_obj_draw_part_dsc, "lv_obj_draw_part_dsc")
# lv_draw_layer_ctx = [ # valid LVGL8.3
# [lv_area, "area_full"],
# [lv_area, "area_act"],
# [lv_coord_t, "max_row_with_alpha"],
# [lv_coord_t, "max_row_with_no_alpha"],
# [ptr, "buf"],
# [ptr, "clip_area"],
# [ptr, "buf_area"],
# [ptr, "buf"],
# [uint8_t, "screen_transp"],
# ]
# lv_draw_layer_ctx = ct.structure(lv_draw_layer_ctx, "lv_draw_layer_ctx")
#- --------- lv_mask --------- -#
# lv_draw_mask_xcb = ptr # callback
# lv_draw_mask_type = ct.u8
# lv_draw_mask_line_side = ct.u8
# lv_draw_mask_common_dsc = [ # valid LVGL8.3
# [lv_draw_mask_xcb, "cb"],
# [lv_draw_mask_type, "type"],
# ]
# lv_draw_mask_common_dsc = ct.structure(lv_draw_mask_common_dsc, "lv_draw_mask_common_dsc")
# lv_draw_mask_line_param_cfg = [ # valid LVGL8.3
# #/*First point */
# [lv_point, "p1"],
# #/*Second point*/
# [lv_point, "p2"],
# #/*Which side to keep?*/
# [uint8_t_2, "side"],
# ]
# lv_draw_mask_line_param_cfg = ct.structure(lv_draw_mask_line_param_cfg, "lv_draw_mask_line_param_cfg")
# lv_draw_mask_line_param = [ # valid LVGL8.3
# #/*The first element must be the common descriptor*/
# [lv_draw_mask_common_dsc, "dsc"],
# [lv_draw_mask_line_param_cfg, "cfg"],
# #/*A point of the line*/
# [lv_point, "origo"],
# #/* X / (1024*Y) steepness (X is 0..1023 range). What is the change of X in 1024 Y?*/
# [int32_t, "xy_steep"],
# #/* Y / (1024*X) steepness (Y is 0..1023 range). What is the change of Y in 1024 X?*/
# [int32_t, "yx_steep"],
# #/*Helper which stores yx_steep for flat lines and xy_steep for steep (non flat) lines */
# [int32_t, "steep"],
# #/*Steepness in 1 px in 0..255 range. Used only by flat lines. */
# [int32_t, "spx"],
# #/*1: It's a flat line? (Near to horizontal)*/
# [uint8_t_1, "flat"],
# #/* Invert the mask. The default is: Keep the left part.
# # * It is used to select left/right/top/bottom*/
# [uint8_t_1, "inv"],
# ]
# lv_draw_mask_line_param = ct.structure(lv_draw_mask_line_param, "lv_draw_mask_line_param")
# lv_draw_mask_angle_param_cfg = [ # valid LVGL8.3
# [lv_point, "vertex_p"],
# [lv_coord_t, "start_angle"],
# [lv_coord_t, "end_angle"],
# ]
# lv_draw_mask_angle_param_cfg = ct.structure(lv_draw_mask_angle_param_cfg, "lv_draw_mask_angle_param_cfg")
# lv_draw_mask_angle_param = [ # valid LVGL8.3
# #/*The first element must be the common descriptor*/
# [lv_draw_mask_common_dsc, "dsc"],
# [lv_draw_mask_angle_param_cfg, "cfg"],
# [lv_draw_mask_line_param, "start_line"],
# [lv_draw_mask_line_param, "end_line"],
# [uint16_t, "delta_deg"],
# ]
# lv_draw_mask_angle_param = ct.structure(lv_draw_mask_angle_param, "lv_draw_mask_angle_param")
# lv_draw_mask_radius_param_cfg = [ # valid LVGL8.3
# [lv_area, "rect"],
# [lv_coord_t, "radius"],
# [uint8_t_1, "outer"],
# ]
# lv_draw_mask_radius_param_cfg = ct.structure(lv_draw_mask_radius_param_cfg, "lv_draw_mask_radius_param_cfg")
# lv_draw_mask_radius_circle_dsc = [ # valid LVGL8.3
# [ptr, "buf"],
# [ptr, "cir_opa"],
# [ptr, "x_start_on_y"],
# [ptr, "opa_start_on_y"],
# [int32_t, "life"],
# [uint32_t, "used_cnt"],
# [lv_coord_t, "radius"],
# ]
# lv_draw_mask_radius_circle_dsc = ct.structure(lv_draw_mask_radius_circle_dsc, "lv_draw_mask_radius_circle_dsc")
# lv_draw_mask_radius_param = [ # valid LVGL8.3
# #/*The first element must be the common descriptor*/
# [lv_draw_mask_common_dsc, "dsc"],
# [lv_draw_mask_radius_param_cfg, "cfg"],
# [lv_draw_mask_radius_circle_dsc, "circle"],
# ]
# lv_draw_mask_radius_param = ct.structure(lv_draw_mask_radius_param, "lv_draw_mask_radius_param")
# lv_draw_mask_fade_param_cfg = [ # valid LVGL8.3
# [lv_area, "coords"],
# [lv_coord_t, "y_top"],
# [lv_coord_t, "y_bottom"],
# [lv_opa, "opa_top"],
# [lv_opa, "opa_bottom"],
# ]
# lv_draw_mask_fade_param_cfg = ct.structure(lv_draw_mask_fade_param_cfg, "lv_draw_mask_fade_param_cfg")
# lv_draw_mask_fade_param = [ # valid LVGL8.3
# # /*The first element must be the common descriptor*/
# [lv_draw_mask_common_dsc, "dsc"],
# [lv_draw_mask_fade_param_cfg, "cfg"],
# ]
# lv_draw_mask_fade_param = ct.structure(lv_draw_mask_fade_param, "lv_draw_mask_fade_param")
# lv_draw_mask_map_param_cfg = [ # valid LVGL8.3
# [lv_area, "coords"],
# [ptr, "map"],
# ]
# lv_draw_mask_map_param_cfg = ct.structure(lv_draw_mask_map_param_cfg, "lv_draw_mask_map_param_cfg")
# lv_draw_mask_map_param = [ # valid LVGL8.3
# [lv_draw_mask_common_dsc, "dsc"],
# [lv_draw_mask_map_param_cfg, "cfg"],
# ]
# lv_draw_mask_map_param = ct.structure(lv_draw_mask_map_param, "lv_draw_mask_map_param")
# lv_draw_mask_polygon_param_cfg = [ # valid LVGL8.3
# [ptr, "points"],
# [uint16_t, "point_cnt"],
# ]
# lv_draw_mask_polygon_param_cfg = ct.structure(lv_draw_mask_polygon_param_cfg, "lv_draw_mask_polygon_param_cfg")
# lv_draw_mask_polygon_param = [ # valid LVGL8.3
# [lv_draw_mask_common_dsc, "dsc"],
# [lv_draw_mask_polygon_param_cfg, "cfg"],
# ]
# lv_draw_mask_polygon_param = ct.structure(lv_draw_mask_polygon_param, "lv_draw_mask_polygon_param")
# lv_draw_mask_saved = [ # valid LVGL8.3
# [ptr, "param"],
# [ptr, "custom_id"],
# ]
# lv_draw_mask_saved = ct.structure(lv_draw_mask_saved, "lv_draw_mask_saved")
# lv_meter
# lv_meter_scale_t
lv_meter_scale = [ # valid LVGL8.3
[lv_color, "tick_color"],
[uint16_t, "tick_cnt"],
[uint16_t, "tick_length"],
[uint16_t, "tick_width"],
[lv_color, "tick_major_color"],
[uint16_t, "tick_major_nth"],
[uint16_t, "tick_major_length"],
[uint16_t, "tick_major_width"],
[int16_t, "label_gap"],
[int32_t, "min"],
[int32_t, "max"],
[int16_t, "r_mod"],
[uint16_t, "angle_range"],
[int16_t, "rotation"],
]
lv_meter_scale = ct.structure(lv_meter_scale, "lv_meter_scale")
# lv_meter_indicator_t
lv_meter_indicator = [ # valid LVGL8.3
[ptr, "scale"],
[lv_meter_indicator_type_t, "type"],
[lv_opa, "opa"],
[int32_t, "start_value"],
[int32_t, "end_value"],
# more unions here that we can hardly manage simply
[ptr, "data0"],
[ptr, "data1"],
[ptr, "data2"],
]
lv_meter_indicator = ct.structure(lv_meter_indicator, "lv_meter_indicator")
# # variants
# lv_meter_indicator_needle_img = [ # valid LVGL8.2
# [ptr, "scale"],
# [lv_meter_indicator_type_t, "type"],
# [lv_opa, "opa"],
# [int32_t, "start_value"],
# [int32_t, "end_value"],
# # specifc portion
# [ptr, "src"],
# [lv_point, "pivot"],
# ]
# lv_meter_indicator_needle_img = ct.structure(lv_meter_indicator_needle_img, "lv_meter_indicator_needle_img")
# lv_meter_indicator_needle_line = [ # valid LVGL8.2
# [ptr, "scale"],
# [lv_meter_indicator_type_t, "type"],
# [lv_opa, "opa"],
# [int32_t, "start_value"],
# [int32_t, "end_value"],
# # specifc portion
# [uint16_t, "width"],
# [int16_t, "r_mod"],
# [lv_color, "color"],
# ]
# lv_meter_indicator_needle_line = ct.structure(lv_meter_indicator_needle_line, "lv_meter_indicator_needle_line")
# lv_meter_indicator_arc = [ # valid LVGL8.2
# [ptr, "scale"],
# [lv_meter_indicator_type_t, "type"],
# [lv_opa, "opa"],
# [int32_t, "start_value"],
# [int32_t, "end_value"],
# # specifc portion
# [uint16_t, "width"],
# [ptr, "src"],
# [lv_color, "color"],
# [int16_t, "r_mod"],
# ]
# lv_meter_indicator_arc = ct.structure(lv_meter_indicator_arc, "lv_meter_indicator_arc")
# lv_meter_indicator_scale_lines = [ # valid LVGL8.2
# [ptr, "scale"],
# [lv_meter_indicator_type_t, "type"],
# [lv_opa, "opa"],
# [int32_t, "start_value"],
# [int32_t, "end_value"],
# # specifc portion
# [int16_t, "width_mod"],
# [lv_color, "color_start"],
# [lv_color, "color_end"],
# [uint8_t_1, "local_grad"],
# ]
# lv_meter_indicator_scale_lines = ct.structure(lv_meter_indicator_scale_lines, "lv_meter_indicator_scale_lines")
# typedef struct { # typedef struct {
# int32_t * x_points; # int32_t * x_points;
# int32_t * y_points; # int32_t * y_points;
@ -670,7 +409,7 @@ lv_meter_indicator = ct.structure(lv_meter_indicator, "lv_meter_indicator")
# uint32_t x_axis_sec : 1; # uint32_t x_axis_sec : 1;
# uint32_t y_axis_sec : 1; # uint32_t y_axis_sec : 1;
# } lv_chart_series_t; # } lv_chart_series_t;
lv_chart_series = [ # valid LVGL9 lv_chart_series = [ # valid LVGL91
[ptr, "x_points"], [ptr, "x_points"],
[ptr, "y_points"], [ptr, "y_points"],
[lv_color, "color"], [lv_color, "color"],
@ -691,7 +430,7 @@ lv_chart_series = ct.structure(lv_chart_series, "lv_chart_series")
# lv_dir_t dir; # lv_dir_t dir;
# uint32_t pos_set: 1; /*1: pos is set; 0: point_id is set*/ # uint32_t pos_set: 1; /*1: pos is set; 0: point_id is set*/
# } lv_chart_cursor_t; # } lv_chart_cursor_t;
lv_chart_cursor = [ # valid LVGL9 lv_chart_cursor = [ # valid LVGL91
[lv_point, "pos"], [lv_point, "pos"],
[int32_t, "point_id"], [int32_t, "point_id"],
[lv_color, "color"], [lv_color, "color"],
@ -701,17 +440,6 @@ lv_chart_cursor = [ # valid LVGL9
] ]
lv_chart_cursor = ct.structure(lv_chart_cursor, "lv_chart_cursor") lv_chart_cursor = ct.structure(lv_chart_cursor, "lv_chart_cursor")
# lv_chart_tick_dsc = [ # valid LVGL8.3
# [lv_coord_t, "major_len"],
# [lv_coord_t, "minor_len"],
# [lv_coord_t, "draw_size"],
# [uint16_t_15, "minor_cnt"],
# [uint16_t_15, "major_cnt"],
# [uint8_t_1, "label_en"],
# ]
# lv_chart_tick_dsc = ct.structure(lv_chart_tick_dsc, "lv_chart_tick_dsc")
#- --------- class system --------- -# #- --------- class system --------- -#
lv_obj_class_ptr = ptr lv_obj_class_ptr = ptr
lv_obj_ptr = ptr lv_obj_ptr = ptr
@ -746,7 +474,7 @@ lv_event_code = ct.i32
# uint32_t instance_size : 16; # uint32_t instance_size : 16;
# uint32_t theme_inheritable : 1; /**< Value from ::lv_obj_class_theme_inheritable_t*/ # uint32_t theme_inheritable : 1; /**< Value from ::lv_obj_class_theme_inheritable_t*/
# }; # };
lv_obj_class = [ # valid LVGL9 lv_obj_class = [ # valid LVGL91
[lv_obj_class_ptr, "base_class"], [lv_obj_class_ptr, "base_class"],
[constructor_cb, "constructor_cb"], [constructor_cb, "constructor_cb"],
[destructor_cb, "destructor_cb"], [destructor_cb, "destructor_cb"],
@ -773,7 +501,7 @@ lv_obj_class = ct.structure(lv_obj_class, "lv_obj_class")
# uint8_t stop_processing : 1; # uint8_t stop_processing : 1;
# uint8_t stop_bubbling : 1; # uint8_t stop_bubbling : 1;
# }; # };
lv_event = [ # valid LVGL9 lv_event = [ # valid LVGL91
[lv_obj_ptr, "target"], [lv_obj_ptr, "target"],
[lv_obj_ptr, "current_target"], [lv_obj_ptr, "current_target"],
[lv_event_code, "code"], [lv_event_code, "code"],
@ -790,19 +518,22 @@ lv_event = ct.structure(lv_event, "lv_event")
# lv_image structures # lv_image structures
# typedef struct { # typedef struct {
# lv_image_header_t header; /**< A header describing the basics of the image*/ # lv_image_header_t header; /**< A header describing the basics of the image*/
# uint32_t data_size; /**< Size of the image in bytes*/ # uint32_t data_size; /**< Size of the image in bytes*/
# const uint8_t * data; /**< Pointer to the data of the image*/ # const uint8_t * data; /**< Pointer to the data of the image*/
# const void * reserved; /**< A reserved field to make it has same size as lv_draw_buf_t*/
# } lv_image_dsc_t; # } lv_image_dsc_t;
lv_image_dsc = [ # valid LVGL9 lv_image_dsc = [ # valid LVGL91
[lv_image_header, "header"], [lv_image_header, "header"],
[uint32_t, "data_size"], [uint32_t, "data_size"],
[ptr, "data"], [ptr, "data"],
[ptr, "reserved"],
] ]
lv_image_dsc = ct.structure(lv_image_dsc, "lv_image_dsc") lv_image_dsc = ct.structure(lv_image_dsc, "lv_image_dsc")
####################################################################### #######################################################################
# lv_style # lv_style
# typedef struct { # typedef struct {
# const lv_style_prop_t * props; /**< An array with the properties to animate.*/ # const lv_style_prop_t * props; /**< An array with the properties to animate.*/
# void * user_data; /**< A custom user data that will be passed to the animation's user_data */ # void * user_data; /**< A custom user data that will be passed to the animation's user_data */
@ -810,7 +541,7 @@ lv_image_dsc = ct.structure(lv_image_dsc, "lv_image_dsc")
# uint32_t time; /**< Duration of the transition in [ms]*/ # uint32_t time; /**< Duration of the transition in [ms]*/
# uint32_t delay; /**< Delay before the transition in [ms]*/ # uint32_t delay; /**< Delay before the transition in [ms]*/
# } lv_style_transition_dsc_t; # } lv_style_transition_dsc_t;
lv_style_transition_dsc = [ # valid LVGL9 lv_style_transition_dsc = [ # valid LVGL91
[ptr, "props"], [ptr, "props"],
[ptr, "user_data"], [ptr, "user_data"],
[ptr, "path_xcb"], [ptr, "path_xcb"],
@ -821,18 +552,12 @@ lv_style_transition_dsc = ct.structure(lv_style_transition_dsc, "lv_style_transi
####################################################################### #######################################################################
# lv_color # lv_color
# lv_color_hsv = [ # valid LVGL8
# [uint16_t, "h"],
# [uint8_t, "s"],
# [uint8_t, "v"],
# ]
# lv_color_hsv = ct.structure(lv_color_hsv, "lv_color_hsv")
# typedef struct _lv_color_filter_dsc_t { # typedef struct _lv_color_filter_dsc_t {
# lv_color_filter_cb_t filter_cb; # lv_color_filter_cb_t filter_cb;
# void * user_data; # void * user_data;
# } lv_color_filter_dsc_t; # } lv_color_filter_dsc_t;
lv_color_filter_dsc = [ # valid LVGL9 lv_color_filter_dsc = [ # valid LVGL91
[ptr, "filter_cb"], [ptr, "filter_cb"],
[ptr, "user_data"], [ptr, "user_data"],
] ]
@ -850,7 +575,7 @@ lv_color_filter_dsc = ct.structure(lv_color_filter_dsc, "lv_color_filter_dsc")
# uint32_t paused : 1; # uint32_t paused : 1;
# uint32_t auto_delete : 1; # uint32_t auto_delete : 1;
# }; # };
lv_timer_ntv = [ # valid LVGL9 lv_timer_ntv = [ # valid LVGL91
[uint32_t, "period"], [uint32_t, "period"],
[uint32_t, "last_run"], [uint32_t, "last_run"],
[ptr, "timer_cb"], [ptr, "timer_cb"],
@ -861,115 +586,25 @@ lv_timer_ntv = [ # valid LVGL9
] ]
lv_timer_ntv = ct.structure(lv_timer_ntv, "lv_timer_ntv") lv_timer_ntv = ct.structure(lv_timer_ntv, "lv_timer_ntv")
# #######################################################################
# lv_anim native structure, is superseded by lv_anim
# /** Describes an animation*/
# struct _lv_anim_t {
# void * var; /**<Variable to animate*/
# lv_anim_exec_xcb_t exec_cb; /**< Function to execute to animate*/
# lv_anim_custom_exec_cb_t custom_exec_cb;/**< Function to execute to animate,
# same purpose as exec_cb but different parameters*/
# lv_anim_start_cb_t start_cb; /**< Call it when the animation is starts (considering `delay`)*/
# lv_anim_completed_cb_t completed_cb; /**< Call it when the animation is fully completed*/
# lv_anim_deleted_cb_t deleted_cb; /**< Call it when the animation is deleted*/
# lv_anim_get_value_cb_t get_value_cb; /**< Get the current value in relative mode*/
# void * user_data; /**< Custom user data*/
# lv_anim_path_cb_t path_cb; /**< Describe the path (curve) of animations*/
# int32_t start_value; /**< Start value*/
# int32_t current_value; /**< Current value*/
# int32_t end_value; /**< End value*/
# int32_t duration; /**< Animation time in ms*/
# int32_t act_time; /**< Current time in animation. Set to negative to make delay.*/
# uint32_t playback_delay; /**< Wait before play back*/
# uint32_t playback_duration; /**< Duration of playback animation*/
# uint32_t repeat_delay; /**< Wait before repeat*/
# uint16_t repeat_cnt; /**< Repeat count for the animation*/
# union _lv_anim_path_para_t {
# lv_anim_bezier3_para_t bezier3; /**< Parameter used when path is custom_bezier*/
# } parameter;
# uint8_t early_apply : 1; /**< 1: Apply start value immediately even is there is `delay`*/
# /*Animation system use these - user shouldn't set*/
# uint32_t last_timer_run;
# uint8_t playback_now : 1; /**< Play back is in progress*/
# uint8_t run_round : 1; /**< Indicates the animation has run in this round*/
# uint8_t start_cb_called : 1; /**< Indicates that the `start_cb` was already called*/
# };
# typedef struct _lv_anim_bezier3_para_t {
# int16_t x1;
# int16_t y1;
# int16_t x2;
# int16_t y2;
# } lv_anim_bezier3_para_t; /**< Parameter used when path is custom_bezier*/
# lv_anim_ntv = [ # valid LVGL8.3
# [ptr, "var"],
# [ptr, "exec_cb"],
# [ptr, "custom_exec_cb"],
# [ptr, "start_cb"],
# [ptr, "completed_cb"],
# [ptr, "deleted_cb"],
# [ptr, "get_value_cb"],
# [ptr, "user_data"],
# [ptr, "path_cb"],
# [int32_t, "start_value"],
# [int32_t, "current_value"],
# [int32_t, "end_value"],
# [int32_t, "duration"],
# [int32_t, "act_time"],
# [uint32_t, "playback_delay"],
# [uint32_t, "playback_duration"],
# [uint32_t, "repeat_delay"],
# [uint32_t, "repeat_cnt"],
# [int16_t, "bezier3_x1"],
# [int16_t, "bezier3_y1"],
# [int16_t, "bezier3_x2"],
# [int16_t, "bezier3_y2"],
# [uint8_t_1, "early_apply"],
# [uint32_t, "last_timer_run"],
# [uint8_t_1, "playback_now"],
# [uint8_t_1, "run_round"],
# [uint8_t_1, "start_cb_called"],
# ]
# lv_anim_ntv = ct.structure(lv_anim_ntv, "lv_anim_ntv")
####################################################################### #######################################################################
# lv_draw_ctx # lv_event_dsc
# lv_draw_ctx = [ # valid LVGL8.3 # typedef struct {
# [ptr, "buf"], # lv_event_cb_t cb;
# [lv_area, "buf_area"], # void * user_data;
# [lv_area, "clip_area"], # uint32_t filter;
# [ptr, "draw_rect"], # } lv_event_dsc_t;
# [ptr, "draw_arc"], lv_event_dsc = [ # valid LVGL91
# [ptr, "draw_img_decoded"], [ptr, "cb"],
# [ptr, "draw_img"], [ptr, "user_data"],
# [ptr, "draw_letter"], [uint32_t, "filter"],
# [ptr, "draw_line"], ]
# [ptr, "draw_polygon"], lv_event_dsc = ct.structure(lv_event_dsc, "lv_event_dsc")
# [ptr, "draw_transform"],
# [ptr, "draw_bg"],
# [ptr, "wait_for_finish"],
# [ptr, "buffer_copy"],
# [ptr, "layer_init"],
# [ptr, "layer_adjust"],
# [ptr, "layer_blend"],
# [ptr, "layer_destroy"],
# [uint32_t, "layer_instance_size"],
# [ptr, "user_data"],
# ]
# lv_draw_ctx = ct.structure(lv_draw_ctx, "lv_draw_ctx")
####################################################################### #######################################################################
# Special structure used to calibrate resistive touchscreens # Special structure used to calibrate resistive touchscreens
####################################################################### #######################################################################
lv_ts_calibration = [ # valid LVGL8.3 lv_ts_calibration = [ # valid LVGL91
[lv_coord_t, "raw_x"], [lv_coord_t, "raw_x"],
[lv_coord_t, "raw_y"], [lv_coord_t, "raw_y"],
[lv_coord_t, "x"], [lv_coord_t, "x"],

View File

@ -244,7 +244,7 @@ class type_mapper_class:
skipping_type = [ skipping_type = [
"bvm *", # Berry "bvm *", # Berry
"lv_global_t *", # reading globals is not useful in Berry "lv_global_t *", # reading globals is not useful in Berry
"lv_event_dsc_t *", # internal implementation, use functions instead # "lv_event_dsc_t *", # internal implementation, use functions instead
"lv_draw_task_t *", # skip low-level tasks for now "lv_draw_task_t *", # skip low-level tasks for now
"lv_draw_buf_t *", # low-level "lv_draw_buf_t *", # low-level
"lv_calendar_date_t *", # skip calendar for now "lv_calendar_date_t *", # skip calendar for now
@ -365,6 +365,7 @@ class type_mapper_class:
"lv_menu_mode_header_t": "i", "lv_menu_mode_header_t": "i",
"lv_menu_mode_root_back_button_t": "i", "lv_menu_mode_root_back_button_t": "i",
"lv_point_precise_t []": "lv_point_arr", "lv_point_precise_t []": "lv_point_arr",
"lv_obj_point_transform_flag_t": "i",
"int32_t *": "lv_int_arr", "int32_t *": "lv_int_arr",
"int32_t []": "lv_int_arr", "int32_t []": "lv_int_arr",
@ -410,6 +411,7 @@ class type_mapper_class:
"lv_draw_arc_dsc_t *": "lv_draw_arc_dsc", "lv_draw_arc_dsc_t *": "lv_draw_arc_dsc",
"lv_point_precise_t *": "lv_point_precise", "lv_point_precise_t *": "lv_point_precise",
"lv_draw_image_dsc_t *": "lv_draw_image_dsc", "lv_draw_image_dsc_t *": "lv_draw_image_dsc",
"lv_event_dsc_t *": "lv_event_dsc",
"_lv_obj_t *": "lv_obj", "_lv_obj_t *": "lv_obj",
"lv_obj_t *": "lv_obj", "lv_obj_t *": "lv_obj",

View File

@ -2,7 +2,7 @@
<a href="https://github.com/sponsors/lvgl" target="_blank"><img align="left" src="https://lvgl.io/assets/images/sponsor.png" height="32px"></a> <a href="https://github.com/sponsors/lvgl" target="_blank"><img align="left" src="https://lvgl.io/assets/images/sponsor.png" height="32px"></a>
<p align="right"> <p align="right">
<b>English</b> | <a href="./docs/README_zh.rst">中文</a> | <a href="./docs/README_pt_BR.md">Português do Brasil</a> | <a href="./docs/README_jp.md">日本語</a> <b>English</b> | <a href="./docs/README_zh.rst">中文</a> | <a href="./docs/README_pt_BR.rst">Português do Brasil</a> | <a href="./docs/README_jp.rst">日本語</a>
</p> </p>
<br> <br>
@ -24,8 +24,7 @@
<a href="https://docs.lvgl.io/" title="Detailed documentation with 100+ examples">Docs</a> | <a href="https://docs.lvgl.io/" title="Detailed documentation with 100+ examples">Docs</a> |
<a href="https://forum.lvgl.io" title="Get help and help others">Forum</a> | <a href="https://forum.lvgl.io" title="Get help and help others">Forum</a> |
<a href="https://lvgl.io/demos" title="Demos running in your browser">Demos</a> | <a href="https://lvgl.io/demos" title="Demos running in your browser">Demos</a> |
<a href="https://lvgl.io/services" title="Graphics design, UI implementation and consulting">Services</a> | <a href="https://lvgl.io/services" title="Graphics design, UI implementation and consulting">Services</a>
<a href="https://squareline.io/" title="UI Editor for LVGL">SquareLine Studio</a>
</p> </p>
<br> <br>
@ -37,9 +36,6 @@ LVGL is the most popular free and open source embedded graphics library to creat
**Feature Rich**<br> **Feature Rich**<br>
It has all the features to create modern and beautiful GUIs: 30+ built-in widgets, a powerful style system, web inspired layout managers, and a typography system supporting many languages. To integrate LVGL into your platform, all you need is at least 32kB RAM and 128 kB Flash, a C compiler, a frame buffer, and at least an 1/10 screen sized buffer for rendering. It has all the features to create modern and beautiful GUIs: 30+ built-in widgets, a powerful style system, web inspired layout managers, and a typography system supporting many languages. To integrate LVGL into your platform, all you need is at least 32kB RAM and 128 kB Flash, a C compiler, a frame buffer, and at least an 1/10 screen sized buffer for rendering.
**UI Editor**<br>
SquareLine Studio is a professional yet affordable drag and drop UI editor for LVGL. It runs on Windows, Linux and MacOS too and you can try it out even without registering to the website.
**Services**<br> **Services**<br>
Our team is ready to help you with graphics design, UI implementation and consulting services. Contact us if you need some support during the development of your next GUI project. Our team is ready to help you with graphics design, UI implementation and consulting services. Contact us if you need some support during the development of your next GUI project.
@ -73,7 +69,6 @@ Our team is ready to help you with graphics design, UI implementation and consul
**Docs, Tools, and Services** **Docs, Tools, and Services**
- Detailed [Documentation](https://docs.lvgl.io/) with [100+ simple examples](https://docs.lvgl.io/master/index.html) - Detailed [Documentation](https://docs.lvgl.io/) with [100+ simple examples](https://docs.lvgl.io/master/index.html)
- [SquareLine Studio](https://squareline.io/) - A professional and easy-to-use UI editor software to speed up and simplify the UI development.
- [Services](https://lvgl.io/services) such as User interface design, Implementation and Consulting to make UI development simpler and faster. - [Services](https://lvgl.io/services) such as User interface design, Implementation and Consulting to make UI development simpler and faster.
## :heart: Sponsor ## :heart: Sponsor
@ -444,11 +439,6 @@ This list will guide you to get started with LVGL step-by-step.
9. If you have questions go to the [Forum](http://forum.lvgl.io/) 9. If you have questions go to the [Forum](http://forum.lvgl.io/)
10. Read the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) guide to see how you can help to improve LVGL (15 minutes) 10. Read the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) guide to see how you can help to improve LVGL (15 minutes)
**Go for More**
11. Download and try out [SquareLine Studio](https://squareline.io/).
12. Contact us for [Services](https://lvgl.io/services).
## :handshake: Services ## :handshake: Services
LVGL LLC was established to provide a solid background for LVGL library and to offer several type of services to help you in UI development. With 15+ years of experience in the user interface and graphics industry we can help you the bring your UI to the next level. LVGL LLC was established to provide a solid background for LVGL library and to offer several type of services to help you in UI development. With 15+ years of experience in the user interface and graphics industry we can help you the bring your UI to the next level.
@ -469,7 +459,7 @@ LVGL is an open project and contribution is very welcome. There are many ways to
For a detailed description of contribution opportunities visit the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) section of the documentation. For a detailed description of contribution opportunities visit the [Contributing](https://docs.lvgl.io/master/CONTRIBUTING.html) section of the documentation.
More than 300 people already left their fingerprint in LVGL. Be one them! See your here! :slightly_smiling_face: More than 300 people already left their fingerprint in LVGL. Be one them! See you here! :slightly_smiling_face:
<a href="https://github.com/lvgl/lvgl/graphs/contributors"> <a href="https://github.com/lvgl/lvgl/graphs/contributors">
<img src="https://contrib.rocks/image?repo=lvgl/lvgl&max=48" /> <img src="https://contrib.rocks/image?repo=lvgl/lvgl&max=48" />

View File

@ -1,6 +1,6 @@
{ {
"name": "lvgl", "name": "lvgl",
"version": "9.0.0", "version": "9.1.0",
"keywords": "graphics, gui, embedded, tft, lvgl", "keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.", "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": { "repository": {

View File

@ -1,5 +1,5 @@
name=lvgl name=lvgl
version=9.0.0 version=9.1.0
author=kisvegabor author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems sentence=Full-featured Graphics Library for Embedded Systems

View File

@ -1,6 +1,6 @@
/** /**
* @file lv_conf.h * @file lv_conf.h
* Configuration file for v9.0.0 * Configuration file for v9.1.0
*/ */
/* /*
@ -17,6 +17,11 @@
#ifndef LV_CONF_H #ifndef LV_CONF_H
#define LV_CONF_H #define LV_CONF_H
/*If you need to include anything here, do it inside the `__ASSEMBLY__` guard */
#if 0 && defined(__ASSEMBLY__)
#include "my_include.h"
#endif
/*==================== /*====================
COLOR SETTINGS COLOR SETTINGS
*====================*/ *====================*/
@ -54,7 +59,7 @@
#undef LV_MEM_POOL_INCLUDE #undef LV_MEM_POOL_INCLUDE
#undef LV_MEM_POOL_ALLOC #undef LV_MEM_POOL_ALLOC
#endif #endif
#endif /*LV_USE_MALLOC == LV_STDLIB_BUILTIN*/ #endif /*LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN*/
/*==================== /*====================
HAL SETTINGS HAL SETTINGS
@ -94,6 +99,14 @@
/*Align the start address of draw_buf addresses to this bytes*/ /*Align the start address of draw_buf addresses to this bytes*/
#define LV_DRAW_BUF_ALIGN 4 #define LV_DRAW_BUF_ALIGN 4
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks.
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#define LV_DRAW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
#define LV_USE_DRAW_SW 1 #define LV_USE_DRAW_SW 1
#if LV_USE_DRAW_SW == 1 #if LV_USE_DRAW_SW == 1
/* Set the number of draw unit. /* Set the number of draw unit.
@ -104,14 +117,9 @@
/* Use Arm-2D to accelerate the sw render */ /* Use Arm-2D to accelerate the sw render */
#define LV_USE_DRAW_ARM2D_SYNC 0 #define LV_USE_DRAW_ARM2D_SYNC 0
/* If a widget has `style_opa < 255` (not `bg_opa`, `text_opa` etc) or not NORMAL blend mode /* Enable native helium assembly to be compiled */
* it is buffered into a "simple" layer before rendering. The widget can be buffered in smaller chunks. #define LV_USE_NATIVE_HELIUM_ASM 0
* "Transformed layers" (if `transform_angle/zoom` are set) use larger buffers
* and can't be drawn in chunks. */
/*The target buffer size for simple layer chunks.*/
#define LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE (24 * 1024) /*[bytes]*/
/* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only /* 0: use a simple renderer capable of drawing only simple rectangles with gradient, images, texts, and straight lines only
* 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */ * 1: use a complex renderer capable of drawing rounded corners, shadow, skew lines, and arcs too */
#define LV_DRAW_SW_COMPLEX 1 #define LV_DRAW_SW_COMPLEX 1
@ -176,6 +184,19 @@
/* Enable VG-Lite assert. */ /* Enable VG-Lite assert. */
#define LV_VG_LITE_USE_ASSERT 0 #define LV_VG_LITE_USE_ASSERT 0
/* VG-Lite flush commit trigger threshold. GPU will try to batch these many draw tasks. */
#define LV_VG_LITE_FLUSH_MAX_COUNT 8
/* Enable border to simulate shadow
* NOTE: which usually improves performance,
* but does not guarantee the same rendering quality as the software. */
#define LV_VG_LITE_USE_BOX_SHADOW 0
/* VG-Lite gradient image maximum cache number.
* NOTE: The memory usage of a single gradient image is 4K bytes.
*/
#define LV_VG_LITE_GRAD_CACHE_SIZE 32
#endif #endif
/*======================= /*=======================
@ -310,6 +331,9 @@
/*Enable 16 pixels alignment*/ /*Enable 16 pixels alignment*/
#define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1 #define LV_VG_LITE_THORVG_16PIXELS_ALIGN 1
/*Buffer address alignment*/
#define LV_VG_LITE_THORVG_BUF_ADDR_ALIGN 64
/*Enable multi-thread render*/ /*Enable multi-thread render*/
#define LV_VG_LITE_THORVG_THREAD_RENDER 0 #define LV_VG_LITE_THORVG_THREAD_RENDER 0
@ -627,6 +651,12 @@
#define LV_FS_MEMFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/ #define LV_FS_MEMFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#endif #endif
/*API for LittleFs. */
#define LV_USE_FS_LITTLEFS 0
#if LV_USE_FS_LITTLEFS
#define LV_FS_LITTLEFS_LETTER '\0' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#endif
/*LODEPNG decoder library*/ /*LODEPNG decoder library*/
#define LV_USE_LODEPNG 0 #define LV_USE_LODEPNG 0
@ -667,16 +697,11 @@
/*FreeType library*/ /*FreeType library*/
#define LV_USE_FREETYPE 0 #define LV_USE_FREETYPE 0
#if LV_USE_FREETYPE #if LV_USE_FREETYPE
/*Memory used by FreeType to cache characters in kilobytes*/
#define LV_FREETYPE_CACHE_SIZE 768
/*Let FreeType to use LVGL memory and file porting*/ /*Let FreeType to use LVGL memory and file porting*/
#define LV_FREETYPE_USE_LVGL_PORT 0 #define LV_FREETYPE_USE_LVGL_PORT 0
/* Maximum number of opened FT_Face/FT_Size objects managed by this cache instance. */ /*Cache count of the glyphs in FreeType. It means the number of glyphs that can be cached.
/* (0:use system defaults) */ *The higher the value, the more memory will be used.*/
#define LV_FREETYPE_CACHE_FT_FACES 8
#define LV_FREETYPE_CACHE_FT_SIZES 8
#define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256 #define LV_FREETYPE_CACHE_FT_GLYPH_CNT 256
#endif #endif
@ -699,9 +724,6 @@
/* Enable ThorVG by assuming that its installed and linked to the project */ /* Enable ThorVG by assuming that its installed and linked to the project */
#define LV_USE_THORVG_EXTERNAL 0 #define LV_USE_THORVG_EXTERNAL 0
/*Enable LZ4 compress/decompress lib*/
#define LV_USE_LZ4 0
/*Use lvgl built-in LZ4 lib*/ /*Use lvgl built-in LZ4 lib*/
#define LV_USE_LZ4_INTERNAL 0 #define LV_USE_LZ4_INTERNAL 0
@ -740,7 +762,7 @@
#endif #endif
/*1: Show the used memory and the memory fragmentation /*1: Show the used memory and the memory fragmentation
* Requires `LV_USE_BUILTIN_MALLOC = 1` * Requires `LV_USE_STDLIB_MALLOC = LV_STDLIB_BUILTIN`
* Requires `LV_USE_SYSMON = 1`*/ * Requires `LV_USE_SYSMON = 1`*/
#define LV_USE_MEM_MONITOR 0 #define LV_USE_MEM_MONITOR 0
#if LV_USE_MEM_MONITOR #if LV_USE_MEM_MONITOR
@ -826,11 +848,12 @@
/*Use SDL to open window on PC and handle mouse and keyboard*/ /*Use SDL to open window on PC and handle mouse and keyboard*/
#define LV_USE_SDL 0 #define LV_USE_SDL 0
#if LV_USE_SDL #if LV_USE_SDL
#define LV_SDL_INCLUDE_PATH <SDL2/SDL.h> #define LV_SDL_INCLUDE_PATH <SDL2/SDL.h>
#define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/ #define LV_SDL_RENDER_MODE LV_DISPLAY_RENDER_MODE_DIRECT /*LV_DISPLAY_RENDER_MODE_DIRECT is recommended for best performance*/
#define LV_SDL_BUF_COUNT 1 /*1 or 2*/ #define LV_SDL_BUF_COUNT 1 /*1 or 2*/
#define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/ #define LV_SDL_FULLSCREEN 0 /*1: Make the window full screen by default*/
#define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/ #define LV_SDL_DIRECT_EXIT 1 /*1: Exit the application when all SDL windows are closed*/
#define LV_SDL_MOUSEWHEEL_MODE LV_SDL_MOUSEWHEEL_MODE_ENCODER /*LV_SDL_MOUSEWHEEL_MODE_ENCODER/CROWN*/
#endif #endif
/*Use X11 to open window on Linux desktop and handle mouse and keyboard*/ /*Use X11 to open window on Linux desktop and handle mouse and keyboard*/
@ -883,6 +906,20 @@
/*Driver for evdev input devices*/ /*Driver for evdev input devices*/
#define LV_USE_EVDEV 0 #define LV_USE_EVDEV 0
/*Driver for libinput input devices*/
#define LV_USE_LIBINPUT 0
#if LV_USE_LIBINPUT
#define LV_LIBINPUT_BSD 0
/*Full keyboard support*/
#define LV_LIBINPUT_XKB 0
#if LV_LIBINPUT_XKB
/*"setxkbmap -query" can help find the right values for your keyboard*/
#define LV_LIBINPUT_XKB_KEY_MAP { .rules = NULL, .model = "pc101", .layout = "us", .variant = NULL, .options = NULL }
#endif
#endif
/*Drivers for LCD devices connected via SPI/parallel port*/ /*Drivers for LCD devices connected via SPI/parallel port*/
#define LV_USE_ST7735 0 #define LV_USE_ST7735 0
#define LV_USE_ST7789 0 #define LV_USE_ST7789 0
@ -907,9 +944,6 @@
/*Show some widget. It might be required to increase `LV_MEM_SIZE` */ /*Show some widget. It might be required to increase `LV_MEM_SIZE` */
#define LV_USE_DEMO_WIDGETS 0 #define LV_USE_DEMO_WIDGETS 0
#if LV_USE_DEMO_WIDGETS
#define LV_DEMO_WIDGETS_SLIDESHOW 0
#endif
/*Demonstrate the usage of encoder and keyboard*/ /*Demonstrate the usage of encoder and keyboard*/
#define LV_USE_DEMO_KEYPAD_AND_ENCODER 0 #define LV_USE_DEMO_KEYPAD_AND_ENCODER 0

View File

@ -14,7 +14,7 @@ extern "C" {
* CURRENT VERSION OF LVGL * CURRENT VERSION OF LVGL
***************************/ ***************************/
#define LVGL_VERSION_MAJOR 9 #define LVGL_VERSION_MAJOR 9
#define LVGL_VERSION_MINOR 0 #define LVGL_VERSION_MINOR 1
#define LVGL_VERSION_PATCH 0 #define LVGL_VERSION_PATCH 0
#define LVGL_VERSION_INFO "" #define LVGL_VERSION_INFO ""
@ -109,13 +109,15 @@ extern "C" {
#include "src/layouts/lv_layout.h" #include "src/layouts/lv_layout.h"
#include "src/draw/lv_draw.h" #include "src/draw/lv_draw.h"
#include "src/draw/lv_draw_buf.h"
#include "src/draw/lv_draw_vector.h" #include "src/draw/lv_draw_vector.h"
#include "src/themes/lv_theme.h" #include "src/themes/lv_theme.h"
#include "src/drivers/lv_drivers.h" #include "src/drivers/lv_drivers.h"
#include "src/lv_api_map.h" #include "src/lv_api_map_v8.h"
#include "src/lv_api_map_v9_0.h"
#include "src/core/lv_global.h" #include "src/core/lv_global.h"
/********************* /*********************

View File

@ -27,7 +27,6 @@ extern "C" {
#include "../misc/lv_color_op.h" #include "../misc/lv_color_op.h"
#include "../misc/lv_ll.h" #include "../misc/lv_ll.h"
#include "../misc/lv_log.h" #include "../misc/lv_log.h"
#include "../misc/lv_profiler_builtin.h"
#include "../misc/lv_style.h" #include "../misc/lv_style.h"
#include "../misc/lv_timer.h" #include "../misc/lv_timer.h"
#include "../others/sysmon/lv_sysmon.h" #include "../others/sysmon/lv_sysmon.h"
@ -57,6 +56,14 @@ struct _snippet_stack;
struct _lv_freetype_context_t; struct _lv_freetype_context_t;
#endif #endif
#if LV_USE_PROFILER && LV_USE_PROFILER_BUILTIN
struct _lv_profiler_builtin_ctx_t;
#endif
#if LV_USE_NUTTX
struct _lv_nuttx_ctx_t;
#endif
typedef struct _lv_global_t { typedef struct _lv_global_t {
bool inited; bool inited;
bool deinit_in_progress; /**< Can be used e.g. in the LV_EVENT_DELETE to deinit the drivers too */ bool deinit_in_progress; /**< Can be used e.g. in the LV_EVENT_DELETE to deinit the drivers too */
@ -84,7 +91,6 @@ typedef struct _lv_global_t {
uint32_t memory_zero; uint32_t memory_zero;
uint32_t math_rand_seed; uint32_t math_rand_seed;
lv_area_transform_cache_t area_trans_cache;
lv_event_t * event_header; lv_event_t * event_header;
uint32_t event_last_register_id; uint32_t event_last_register_id;
@ -153,6 +159,10 @@ typedef struct _lv_global_t {
lv_fs_drv_t win32_fs_drv; lv_fs_drv_t win32_fs_drv;
#endif #endif
#if LV_USE_FS_LITTLEFS
lv_fs_drv_t littlefs_fs_drv;
#endif
#if LV_USE_FREETYPE #if LV_USE_FREETYPE
struct _lv_freetype_context_t * ft_context; struct _lv_freetype_context_t * ft_context;
#endif #endif
@ -170,7 +180,7 @@ typedef struct _lv_global_t {
#endif #endif
#if LV_USE_PROFILER && LV_USE_PROFILER_BUILTIN #if LV_USE_PROFILER && LV_USE_PROFILER_BUILTIN
lv_profiler_builtin_ctx_t profiler_context; struct _lv_profiler_builtin_ctx_t * profiler_context;
#endif #endif
#if LV_USE_FILE_EXPLORER != 0 #if LV_USE_FILE_EXPLORER != 0
@ -193,6 +203,11 @@ typedef struct _lv_global_t {
void * objid_array; void * objid_array;
uint32_t objid_count; uint32_t objid_count;
#endif #endif
#if LV_USE_NUTTX
struct _lv_nuttx_ctx_t * nuttx_ctx;
#endif
void * user_data; void * user_data;
} lv_global_t; } lv_global_t;

View File

@ -75,6 +75,7 @@ lv_group_t * lv_group_create(void)
void lv_group_delete(lv_group_t * group) void lv_group_delete(lv_group_t * group)
{ {
/*Defocus the currently focused object*/ /*Defocus the currently focused object*/
LV_ASSERT_NULL(group);
if(group->obj_focus != NULL) { if(group->obj_focus != NULL) {
lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group)); lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group));
lv_obj_invalidate(*group->obj_focus); lv_obj_invalidate(*group->obj_focus);
@ -172,8 +173,9 @@ void lv_group_swap_obj(lv_obj_t * obj1, lv_obj_t * obj2)
else if((*obj_i) == obj2)(*obj_i) = obj1; else if((*obj_i) == obj2)(*obj_i) = obj1;
} }
if(*g1->obj_focus == obj1) lv_group_focus_obj(obj2); lv_obj_t * focused = lv_group_get_focused(g1);
else if(*g1->obj_focus == obj2) lv_group_focus_obj(obj1); if(focused == obj1) lv_group_focus_obj(obj2);
else if(focused == obj2) lv_group_focus_obj(obj1);
} }
@ -220,6 +222,8 @@ void lv_group_remove_obj(lv_obj_t * obj)
void lv_group_remove_all_objs(lv_group_t * group) void lv_group_remove_all_objs(lv_group_t * group)
{ {
LV_ASSERT_NULL(group);
/*Defocus the currently focused object*/ /*Defocus the currently focused object*/
if(group->obj_focus != NULL) { if(group->obj_focus != NULL) {
lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group)); lv_obj_send_event(*group->obj_focus, LV_EVENT_DEFOCUSED, get_indev(group));
@ -271,6 +275,8 @@ void lv_group_focus_obj(lv_obj_t * obj)
void lv_group_focus_next(lv_group_t * group) void lv_group_focus_next(lv_group_t * group)
{ {
LV_ASSERT_NULL(group);
bool focus_changed = focus_next_core(group, _lv_ll_get_head, _lv_ll_get_next); bool focus_changed = focus_next_core(group, _lv_ll_get_head, _lv_ll_get_next);
if(group->edge_cb) { if(group->edge_cb) {
if(!focus_changed) if(!focus_changed)
@ -280,6 +286,8 @@ void lv_group_focus_next(lv_group_t * group)
void lv_group_focus_prev(lv_group_t * group) void lv_group_focus_prev(lv_group_t * group)
{ {
LV_ASSERT_NULL(group);
bool focus_changed = focus_next_core(group, _lv_ll_get_tail, _lv_ll_get_prev); bool focus_changed = focus_next_core(group, _lv_ll_get_tail, _lv_ll_get_prev);
if(group->edge_cb) { if(group->edge_cb) {
if(!focus_changed) if(!focus_changed)
@ -289,12 +297,16 @@ void lv_group_focus_prev(lv_group_t * group)
void lv_group_focus_freeze(lv_group_t * group, bool en) void lv_group_focus_freeze(lv_group_t * group, bool en)
{ {
LV_ASSERT_NULL(group);
if(en == false) group->frozen = 0; if(en == false) group->frozen = 0;
else group->frozen = 1; else group->frozen = 1;
} }
lv_result_t lv_group_send_data(lv_group_t * group, uint32_t c) lv_result_t lv_group_send_data(lv_group_t * group, uint32_t c)
{ {
LV_ASSERT_NULL(group);
lv_obj_t * act = lv_group_get_focused(group); lv_obj_t * act = lv_group_get_focused(group);
if(act == NULL) return LV_RESULT_OK; if(act == NULL) return LV_RESULT_OK;
@ -305,17 +317,21 @@ lv_result_t lv_group_send_data(lv_group_t * group, uint32_t c)
void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb) void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb)
{ {
if(group == NULL) return;
group->focus_cb = focus_cb; group->focus_cb = focus_cb;
} }
void lv_group_set_edge_cb(lv_group_t * group, lv_group_edge_cb_t edge_cb) void lv_group_set_edge_cb(lv_group_t * group, lv_group_edge_cb_t edge_cb)
{ {
LV_ASSERT_NULL(group);
group->edge_cb = edge_cb; group->edge_cb = edge_cb;
} }
void lv_group_set_editing(lv_group_t * group, bool edit) void lv_group_set_editing(lv_group_t * group, bool edit)
{ {
if(group == NULL) return; LV_ASSERT_NULL(group);
uint8_t en_val = edit ? 1 : 0; uint8_t en_val = edit ? 1 : 0;
if(en_val == group->editing) return; /*Do not set the same mode again*/ if(en_val == group->editing) return; /*Do not set the same mode again*/
@ -333,11 +349,13 @@ void lv_group_set_editing(lv_group_t * group, bool edit)
void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy) void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy)
{ {
LV_ASSERT_NULL(group);
group->refocus_policy = policy & 0x01; group->refocus_policy = policy & 0x01;
} }
void lv_group_set_wrap(lv_group_t * group, bool en) void lv_group_set_wrap(lv_group_t * group, bool en)
{ {
LV_ASSERT_NULL(group);
group->wrap = en ? 1 : 0; group->wrap = en ? 1 : 0;
} }
@ -375,6 +393,7 @@ bool lv_group_get_wrap(lv_group_t * group)
uint32_t lv_group_get_obj_count(lv_group_t * group) uint32_t lv_group_get_obj_count(lv_group_t * group)
{ {
LV_ASSERT_NULL(group);
return _lv_ll_get_len(&group->obj_ll); return _lv_ll_get_len(&group->obj_ll);
} }

View File

@ -25,7 +25,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
#define LV_OBJ_DEF_WIDTH (LV_DPX(100)) #define LV_OBJ_DEF_WIDTH (LV_DPX(100))
#define LV_OBJ_DEF_HEIGHT (LV_DPX(50)) #define LV_OBJ_DEF_HEIGHT (LV_DPX(50))
#define STYLE_TRANSITION_MAX 32 #define STYLE_TRANSITION_MAX 32
@ -424,19 +424,18 @@ static void lv_obj_draw(lv_event_t * e)
info->res = LV_COVER_RES_NOT_COVER; info->res = LV_COVER_RES_NOT_COVER;
return; return;
} }
const lv_grad_dsc_t * grad_dsc = lv_obj_get_style_bg_grad(obj, 0); }
if(grad_dsc) { const lv_grad_dsc_t * grad_dsc = lv_obj_get_style_bg_grad(obj, 0);
uint32_t i; if(grad_dsc) {
for(i = 0; i < grad_dsc->stops_count; i++) { uint32_t i;
if(grad_dsc->stops[i].opa < LV_OPA_MAX) { for(i = 0; i < grad_dsc->stops_count; i++) {
info->res = LV_COVER_RES_NOT_COVER; if(grad_dsc->stops[i].opa < LV_OPA_MAX) {
return; info->res = LV_COVER_RES_NOT_COVER;
} return;
} }
} }
} }
info->res = LV_COVER_RES_COVER; info->res = LV_COVER_RES_COVER;
} }
else if(code == LV_EVENT_DRAW_MAIN) { else if(code == LV_EVENT_DRAW_MAIN) {
lv_layer_t * layer = lv_event_get_layer(e); lv_layer_t * layer = lv_event_get_layer(e);
@ -741,7 +740,7 @@ static void update_obj_state(lv_obj_t * obj, lv_state_t new_state)
lv_obj_invalidate(obj); lv_obj_invalidate(obj);
obj->state = new_state; obj->state = new_state;
_lv_obj_update_layer_type(obj);
_lv_obj_style_transition_dsc_t * ts = lv_malloc_zeroed(sizeof(_lv_obj_style_transition_dsc_t) * STYLE_TRANSITION_MAX); _lv_obj_style_transition_dsc_t * ts = lv_malloc_zeroed(sizeof(_lv_obj_style_transition_dsc_t) * STYLE_TRANSITION_MAX);
uint32_t tsi = 0; uint32_t tsi = 0;
uint32_t i; uint32_t i;

View File

@ -15,7 +15,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
/********************** /**********************
* TYPEDEFS * TYPEDEFS

View File

@ -15,7 +15,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
/********************** /**********************
* TYPEDEFS * TYPEDEFS
@ -292,8 +292,6 @@ void lv_obj_refresh_ext_draw_size(lv_obj_t * obj)
int32_t s_new = 0; int32_t s_new = 0;
lv_obj_send_event(obj, LV_EVENT_REFR_EXT_DRAW_SIZE, &s_new); lv_obj_send_event(obj, LV_EVENT_REFR_EXT_DRAW_SIZE, &s_new);
if(s_new != s_old) lv_obj_invalidate(obj);
/*Store the result if the special attrs already allocated*/ /*Store the result if the special attrs already allocated*/
if(obj->spec_attr) { if(obj->spec_attr) {
obj->spec_attr->ext_draw_size = s_new; obj->spec_attr->ext_draw_size = s_new;

View File

@ -13,7 +13,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
/********************** /**********************
* TYPEDEFS * TYPEDEFS
@ -92,13 +92,12 @@ lv_result_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e)
return res; return res;
} }
void lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data)
void * user_data)
{ {
LV_ASSERT_OBJ(obj, MY_CLASS); LV_ASSERT_OBJ(obj, MY_CLASS);
lv_obj_allocate_spec_attr(obj); lv_obj_allocate_spec_attr(obj);
lv_event_add(&obj->spec_attr->event_list, event_cb, filter, user_data); return lv_event_add(&obj->spec_attr->event_list, event_cb, filter, user_data);
} }
uint32_t lv_obj_get_event_count(lv_obj_t * obj) uint32_t lv_obj_get_event_count(lv_obj_t * obj)
@ -139,6 +138,14 @@ bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb)
return false; return false;
} }
bool lv_obj_remove_event_dsc(lv_obj_t * obj, lv_event_dsc_t * dsc)
{
LV_ASSERT_NULL(obj);
LV_ASSERT_NULL(dsc);
if(obj->spec_attr == NULL) return false;
return lv_event_remove_dsc(&obj->spec_attr->event_list, dsc);
}
uint32_t lv_obj_remove_event_cb_with_user_data(lv_obj_t * obj, lv_event_cb_t event_cb, void * user_data) uint32_t lv_obj_remove_event_cb_with_user_data(lv_obj_t * obj, lv_event_cb_t event_cb, void * user_data)
{ {
LV_ASSERT_NULL(obj); LV_ASSERT_NULL(obj);
@ -235,6 +242,19 @@ uint32_t lv_event_get_key(lv_event_t * e)
} }
} }
int32_t lv_event_get_rotary_diff(lv_event_t * e)
{
if(e->code == LV_EVENT_ROTARY) {
int32_t * r = lv_event_get_param(e);
if(r) return *r;
else return 0;
}
else {
LV_LOG_WARN("Not interpreted with this event code");
return 0;
}
}
lv_anim_t * lv_event_get_scroll_anim(lv_event_t * e) lv_anim_t * lv_event_get_scroll_anim(lv_event_t * e)
{ {
if(e->code == LV_EVENT_SCROLL_BEGIN) { if(e->code == LV_EVENT_SCROLL_BEGIN) {

View File

@ -99,9 +99,9 @@ lv_obj_t * lv_event_get_target_obj(lv_event_t * e);
* @param filter an event code (e.g. `LV_EVENT_CLICKED`) on which the event should be called. `LV_EVENT_ALL` can be used to receive all the events. * @param filter an event code (e.g. `LV_EVENT_CLICKED`) on which the event should be called. `LV_EVENT_ALL` can be used to receive all the events.
* @param event_cb the new event function * @param event_cb the new event function
* @param user_data custom data data will be available in `event_cb` * @param user_data custom data data will be available in `event_cb`
* @return handler to the event. It can be used in `lv_obj_remove_event_dsc`.
*/ */
void lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, lv_event_dsc_t * lv_obj_add_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data);
void * user_data);
uint32_t lv_obj_get_event_count(lv_obj_t * obj); uint32_t lv_obj_get_event_count(lv_obj_t * obj);
@ -111,6 +111,8 @@ bool lv_obj_remove_event(lv_obj_t * obj, uint32_t index);
bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb); bool lv_obj_remove_event_cb(lv_obj_t * obj, lv_event_cb_t event_cb);
bool lv_obj_remove_event_dsc(lv_obj_t * obj, lv_event_dsc_t * dsc);
/** /**
* Remove an event_cb with user_data * Remove an event_cb with user_data
* @param obj pointer to a obj * @param obj pointer to a obj
@ -149,6 +151,13 @@ const lv_area_t * lv_event_get_old_size(lv_event_t * e);
*/ */
uint32_t lv_event_get_key(lv_event_t * e); uint32_t lv_event_get_key(lv_event_t * e);
/**
* Get the signed rotary encoder diff. passed as parameter to an event. Can be used in `LV_EVENT_ROTARY`
* @param e pointer to an event
* @return the triggering key or NULL if called on an unrelated event
*/
int32_t lv_event_get_rotary_diff(lv_event_t * e);
/** /**
* Get the animation descriptor of a scrolling. Can be used in `LV_EVENT_SCROLL_BEGIN` * Get the animation descriptor of a scrolling. Can be used in `LV_EVENT_SCROLL_BEGIN`
* @param e pointer to an event * @param e pointer to an event

View File

@ -15,7 +15,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
#define update_layout_mutex LV_GLOBAL_DEFAULT()->layout_update_mutex #define update_layout_mutex LV_GLOBAL_DEFAULT()->layout_update_mutex
/********************** /**********************
@ -28,7 +28,7 @@
static int32_t calc_content_width(lv_obj_t * obj); static int32_t calc_content_width(lv_obj_t * obj);
static int32_t calc_content_height(lv_obj_t * obj); static int32_t calc_content_height(lv_obj_t * obj);
static void layout_update_core(lv_obj_t * obj); static void layout_update_core(lv_obj_t * obj);
static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv); static void transform_point_array(const lv_obj_t * obj, lv_point_t * p, size_t p_count, bool inv);
/********************** /**********************
* STATIC VARIABLES * STATIC VARIABLES
@ -762,36 +762,40 @@ void lv_obj_move_children_by(lv_obj_t * obj, int32_t x_diff, int32_t y_diff, boo
} }
} }
void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, bool recursive, bool inv) void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, lv_obj_point_transform_flag_t flags)
{
lv_obj_transform_point_array(obj, p, 1, flags);
}
void lv_obj_transform_point_array(const lv_obj_t * obj, lv_point_t points[], size_t count,
lv_obj_point_transform_flag_t flags)
{ {
if(obj) { if(obj) {
lv_layer_type_t layer_type = _lv_obj_get_layer_type(obj); lv_layer_type_t layer_type = _lv_obj_get_layer_type(obj);
bool do_tranf = layer_type == LV_LAYER_TYPE_TRANSFORM; bool do_tranf = layer_type == LV_LAYER_TYPE_TRANSFORM;
if(inv) { bool recursive = flags & LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE;
if(recursive) lv_obj_transform_point(lv_obj_get_parent(obj), p, recursive, inv); bool inverse = flags & LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE;
if(do_tranf) transform_point(obj, p, inv); if(inverse) {
if(recursive) lv_obj_transform_point_array(lv_obj_get_parent(obj), points, count, flags);
if(do_tranf) transform_point_array(obj, points, count, inverse);
} }
else { else {
if(do_tranf) transform_point(obj, p, inv); if(do_tranf) transform_point_array(obj, points, count, inverse);
if(recursive) lv_obj_transform_point(lv_obj_get_parent(obj), p, recursive, inv); if(recursive) lv_obj_transform_point_array(lv_obj_get_parent(obj), points, count, flags);
} }
} }
} }
void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, bool recursive, void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, lv_obj_point_transform_flag_t flags)
bool inv)
{ {
lv_point_t p[4] = { lv_point_t p[4] = {
{area->x1, area->y1}, {area->x1, area->y1},
{area->x1, area->y2}, {area->x1, area->y2 + 1},
{area->x2, area->y1}, {area->x2 + 1, area->y1},
{area->x2, area->y2}, {area->x2 + 1, area->y2 + 1},
}; };
lv_obj_transform_point(obj, &p[0], recursive, inv); lv_obj_transform_point_array(obj, p, 4, flags);
lv_obj_transform_point(obj, &p[1], recursive, inv);
lv_obj_transform_point(obj, &p[2], recursive, inv);
lv_obj_transform_point(obj, &p[3], recursive, inv);
area->x1 = LV_MIN4(p[0].x, p[1].x, p[2].x, p[3].x); area->x1 = LV_MIN4(p[0].x, p[1].x, p[2].x, p[3].x);
area->x2 = LV_MAX4(p[0].x, p[1].x, p[2].x, p[3].x); area->x2 = LV_MAX4(p[0].x, p[1].x, p[2].x, p[3].x);
@ -808,7 +812,13 @@ void lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area)
lv_area_t area_tmp; lv_area_t area_tmp;
lv_area_copy(&area_tmp, area); lv_area_copy(&area_tmp, area);
if(!lv_obj_area_is_visible(obj, &area_tmp)) return; if(!lv_obj_area_is_visible(obj, &area_tmp)) return;
if(obj->spec_attr && obj->spec_attr->layer_type == LV_LAYER_TYPE_TRANSFORM) {
/*Make the area slightly larger to avoid rounding errors.
*5 is an empirical value*/
lv_area_increase(&area_tmp, 5, 5);
}
_lv_inv_area(lv_obj_get_display(obj), &area_tmp); _lv_inv_area(lv_obj_get_display(obj), &area_tmp);
} }
@ -853,7 +863,7 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
/*The area is not on the object*/ /*The area is not on the object*/
if(!_lv_area_intersect(area, area, &obj_coords)) return false; if(!_lv_area_intersect(area, area, &obj_coords)) return false;
lv_obj_get_transformed_area(obj, area, true, false); lv_obj_get_transformed_area(obj, area, LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE);
/*Truncate recursively to the parents*/ /*Truncate recursively to the parents*/
lv_obj_t * parent = lv_obj_get_parent(obj); lv_obj_t * parent = lv_obj_get_parent(obj);
@ -868,7 +878,7 @@ bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area)
lv_area_increase(&parent_coords, parent_ext_size, parent_ext_size); lv_area_increase(&parent_coords, parent_ext_size, parent_ext_size);
} }
lv_obj_get_transformed_area(parent, &parent_coords, true, false); lv_obj_get_transformed_area(parent, &parent_coords, LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE);
if(!_lv_area_intersect(area, area, &parent_coords)) return false; if(!_lv_area_intersect(area, area, &parent_coords)) return false;
parent = lv_obj_get_parent(parent); parent = lv_obj_get_parent(parent);
@ -1118,11 +1128,13 @@ static void layout_update_core(lv_obj_t * obj)
} }
} }
static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv) static void transform_point_array(const lv_obj_t * obj, lv_point_t * p, size_t p_count, bool inv)
{ {
int32_t angle = lv_obj_get_style_transform_rotation(obj, 0); int32_t angle = lv_obj_get_style_transform_rotation(obj, 0);
int32_t scale_x = lv_obj_get_style_transform_scale_x_safe(obj, 0); int32_t scale_x = lv_obj_get_style_transform_scale_x_safe(obj, 0);
int32_t scale_y = lv_obj_get_style_transform_scale_y_safe(obj, 0); int32_t scale_y = lv_obj_get_style_transform_scale_y_safe(obj, 0);
if(scale_x == 0) scale_x = 1;
if(scale_y == 0) scale_y = 1;
if(angle == 0 && scale_x == LV_SCALE_NONE && scale_y == LV_SCALE_NONE) return; if(angle == 0 && scale_x == LV_SCALE_NONE && scale_y == LV_SCALE_NONE) return;
@ -1143,9 +1155,9 @@ static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv)
if(inv) { if(inv) {
angle = -angle; angle = -angle;
scale_x = (256 * 256) / scale_x; scale_x = (256 * 256 + scale_x - 1) / scale_x;
scale_y = (256 * 256) / scale_y; scale_y = (256 * 256 + scale_y - 1) / scale_y;
} }
lv_point_transform(p, angle, scale_x, scale_y, &pivot, !inv); lv_point_array_transform(p, p_count, angle, scale_x, scale_y, &pivot, !inv);
} }

View File

@ -23,6 +23,20 @@ extern "C" {
* TYPEDEFS * TYPEDEFS
**********************/ **********************/
typedef enum {
/** No flags */
LV_OBJ_POINT_TRANSFORM_FLAG_NONE = 0x00,
/** Consider the transformation properties of the parents too */
LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE = 0x01,
/** Execute the inverse of the transformation (-angle and 1/zoom) */
LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE = 0x02,
/** Both inverse and recursive*/
LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE_RECURSIVE = 0x03,
} lv_obj_point_transform_flag_t;
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
@ -335,19 +349,27 @@ void lv_obj_move_children_by(lv_obj_t * obj, int32_t x_diff, int32_t y_diff, boo
* Transform a point using the angle and zoom style properties of an object * Transform a point using the angle and zoom style properties of an object
* @param obj pointer to an object whose style properties should be used * @param obj pointer to an object whose style properties should be used
* @param p a point to transform, the result will be written back here too * @param p a point to transform, the result will be written back here too
* @param recursive consider the transformation properties of the parents too * @param flags OR-ed valued of :cpp:enum:`lv_obj_point_transform_flag_t`
* @param inv do the inverse of the transformation (-angle and 1/zoom)
*/ */
void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, bool recursive, bool inv); void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, lv_obj_point_transform_flag_t flags);
/**
* Transform an array of points using the angle and zoom style properties of an object
* @param obj pointer to an object whose style properties should be used
* @param points the array of points to transform, the result will be written back here too
* @param count number of points in the array
* @param flags OR-ed valued of :cpp:enum:`lv_obj_point_transform_flag_t`
*/
void lv_obj_transform_point_array(const lv_obj_t * obj, lv_point_t points[], size_t count,
lv_obj_point_transform_flag_t flags);
/** /**
* Transform an area using the angle and zoom style properties of an object * Transform an area using the angle and zoom style properties of an object
* @param obj pointer to an object whose style properties should be used * @param obj pointer to an object whose style properties should be used
* @param area an area to transform, the result will be written back here too * @param area an area to transform, the result will be written back here too
* @param recursive consider the transformation properties of the parents too * @param flags OR-ed valued of :cpp:enum:`lv_obj_point_transform_flag_t`
* @param inv do the inverse of the transformation (-angle and 1/zoom)
*/ */
void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, bool recursive, bool inv); void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, lv_obj_point_transform_flag_t flags);
/** /**
* Mark an area of an object as invalid. * Mark an area of an object as invalid.

View File

@ -15,7 +15,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
#define SCROLL_ANIM_TIME_MIN 200 /*ms*/ #define SCROLL_ANIM_TIME_MIN 200 /*ms*/
#define SCROLL_ANIM_TIME_MAX 400 /*ms*/ #define SCROLL_ANIM_TIME_MAX 400 /*ms*/
#define SCROLLBAR_MIN_SIZE (LV_DPX(10)) #define SCROLLBAR_MIN_SIZE (LV_DPX(10))
@ -91,25 +91,25 @@ void lv_obj_set_scroll_snap_y(lv_obj_t * obj, lv_scroll_snap_t align)
lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t * obj) lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t * obj)
{ {
if(obj->spec_attr) return obj->spec_attr->scrollbar_mode; if(obj->spec_attr) return (lv_scrollbar_mode_t) obj->spec_attr->scrollbar_mode;
else return LV_SCROLLBAR_MODE_AUTO; else return LV_SCROLLBAR_MODE_AUTO;
} }
lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj) lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj)
{ {
if(obj->spec_attr) return obj->spec_attr->scroll_dir; if(obj->spec_attr) return (lv_dir_t) obj->spec_attr->scroll_dir;
else return LV_DIR_ALL; else return LV_DIR_ALL;
} }
lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t * obj) lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t * obj)
{ {
if(obj->spec_attr) return obj->spec_attr->scroll_snap_x; if(obj->spec_attr) return (lv_scroll_snap_t) obj->spec_attr->scroll_snap_x;
else return LV_SCROLL_SNAP_NONE; else return LV_SCROLL_SNAP_NONE;
} }
lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t * obj) lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t * obj)
{ {
if(obj->spec_attr) return obj->spec_attr->scroll_snap_y; if(obj->spec_attr) return (lv_scroll_snap_t) obj->spec_attr->scroll_snap_y;
else return LV_SCROLL_SNAP_NONE; else return LV_SCROLL_SNAP_NONE;
} }

View File

@ -15,7 +15,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
#define style_refr LV_GLOBAL_DEFAULT()->style_refresh #define style_refr LV_GLOBAL_DEFAULT()->style_refresh
#define style_trans_ll_p &(LV_GLOBAL_DEFAULT()->style_trans_ll) #define style_trans_ll_p &(LV_GLOBAL_DEFAULT()->style_trans_ll)
#define _style_custom_prop_flag_lookup_table LV_GLOBAL_DEFAULT()->style_custom_prop_flag_lookup_table #define _style_custom_prop_flag_lookup_table LV_GLOBAL_DEFAULT()->style_custom_prop_flag_lookup_table
@ -300,12 +300,7 @@ void lv_obj_refresh_style(lv_obj_t * obj, lv_style_selector_t selector, lv_style
/*Cache the layer type*/ /*Cache the layer type*/
if((part == LV_PART_ANY || part == LV_PART_MAIN) && is_layer_refr) { if((part == LV_PART_ANY || part == LV_PART_MAIN) && is_layer_refr) {
lv_layer_type_t layer_type = calculate_layer_type(obj); _lv_obj_update_layer_type(obj);
if(obj->spec_attr) obj->spec_attr->layer_type = layer_type;
else if(layer_type != LV_LAYER_TYPE_NONE) {
lv_obj_allocate_spec_attr(obj);
obj->spec_attr->layer_type = layer_type;
}
} }
if(prop == LV_STYLE_PROP_ANY || is_ext_draw) { if(prop == LV_STYLE_PROP_ANY || is_ext_draw) {
@ -325,70 +320,6 @@ void lv_obj_enable_style_refresh(bool en)
style_refr = en; style_refr = en;
} }
static inline lv_style_value_t lv_style_prop_get_default_inlined(lv_style_prop_t prop)
{
const lv_color_t black = LV_COLOR_MAKE(0x00, 0x00, 0x00);
const lv_color_t white = LV_COLOR_MAKE(0xff, 0xff, 0xff);
switch(prop) {
case LV_STYLE_TRANSFORM_SCALE_X:
case LV_STYLE_TRANSFORM_SCALE_Y:
return (lv_style_value_t) {
.num = LV_SCALE_NONE
};
case LV_STYLE_BG_COLOR:
return (lv_style_value_t) {
.color = black
};
case LV_STYLE_BG_GRAD_COLOR:
case LV_STYLE_BORDER_COLOR:
case LV_STYLE_SHADOW_COLOR:
case LV_STYLE_OUTLINE_COLOR:
case LV_STYLE_ARC_COLOR:
case LV_STYLE_LINE_COLOR:
case LV_STYLE_TEXT_COLOR:
case LV_STYLE_IMAGE_RECOLOR:
return (lv_style_value_t) {
.color = white
};
case LV_STYLE_OPA:
case LV_STYLE_OPA_LAYERED:
case LV_STYLE_BORDER_OPA:
case LV_STYLE_TEXT_OPA:
case LV_STYLE_IMAGE_OPA:
case LV_STYLE_BG_GRAD_OPA:
case LV_STYLE_BG_MAIN_OPA:
case LV_STYLE_BG_IMAGE_OPA:
case LV_STYLE_OUTLINE_OPA:
case LV_STYLE_SHADOW_OPA:
case LV_STYLE_LINE_OPA:
case LV_STYLE_ARC_OPA:
return (lv_style_value_t) {
.num = LV_OPA_COVER
};
case LV_STYLE_BG_GRAD_STOP:
return (lv_style_value_t) {
.num = 255
};
case LV_STYLE_BORDER_SIDE:
return (lv_style_value_t) {
.num = LV_BORDER_SIDE_FULL
};
case LV_STYLE_TEXT_FONT:
return (lv_style_value_t) {
.ptr = LV_FONT_DEFAULT
};
case LV_STYLE_MAX_WIDTH:
case LV_STYLE_MAX_HEIGHT:
return (lv_style_value_t) {
.num = LV_COORD_MAX
};
default:
return (lv_style_value_t) {
.ptr = 0
};
}
}
lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop) lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop)
{ {
LV_ASSERT_NULL(obj) LV_ASSERT_NULL(obj)
@ -400,7 +331,7 @@ lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_
found = get_selector_style_prop(obj, selector, prop, &value_act); found = get_selector_style_prop(obj, selector, prop, &value_act);
if(found == LV_STYLE_RES_FOUND) return value_act; if(found == LV_STYLE_RES_FOUND) return value_act;
return lv_style_prop_get_default_inlined(prop); return lv_style_prop_get_default(prop);
} }
bool lv_obj_has_style_prop(const lv_obj_t * obj, lv_style_selector_t selector, lv_style_prop_t prop) bool lv_obj_has_style_prop(const lv_obj_t * obj, lv_style_selector_t selector, lv_style_prop_t prop)
@ -670,6 +601,16 @@ lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t * obj, lv_part_t part)
return opa_final; return opa_final;
} }
void _lv_obj_update_layer_type(lv_obj_t * obj)
{
lv_layer_type_t layer_type = calculate_layer_type(obj);
if(obj->spec_attr) obj->spec_attr->layer_type = layer_type;
else if(layer_type != LV_LAYER_TYPE_NONE) {
lv_obj_allocate_spec_attr(obj);
obj->spec_attr->layer_type = layer_type;
}
}
/********************** /**********************
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/
@ -754,7 +695,7 @@ static lv_style_res_t get_prop_core(const lv_obj_t * obj, lv_style_selector_t se
const lv_part_t part = lv_obj_style_get_selector_part(selector); const lv_part_t part = lv_obj_style_get_selector_part(selector);
const lv_state_t state = lv_obj_style_get_selector_state(selector); const lv_state_t state = lv_obj_style_get_selector_state(selector);
const lv_state_t state_inv = ~state; const lv_state_t state_inv = ~state;
const bool skip_trans = obj->skip_trans; const bool skip_trans = (const bool) obj->skip_trans;
int32_t weight = -1; int32_t weight = -1;
lv_style_res_t found; lv_style_res_t found;
uint32_t i; uint32_t i;
@ -932,7 +873,7 @@ static void trans_anim_cb(void * _tr, int32_t v)
break; break;
} }
lv_style_value_t old_value; lv_style_value_t old_value = {0};
bool refr = true; bool refr = true;
if(lv_style_get_prop(obj->styles[i].style, tr->prop, &old_value)) { if(lv_style_get_prop(obj->styles[i].style, tr->prop, &old_value)) {
if(value_final.ptr == old_value.ptr && lv_color_eq(value_final.color, old_value.color) && if(value_final.ptr == old_value.ptr && lv_color_eq(value_final.color, old_value.color) &&
@ -1016,6 +957,7 @@ static lv_layer_type_t calculate_layer_type(lv_obj_t * obj)
if(lv_obj_get_style_transform_skew_x(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM; if(lv_obj_get_style_transform_skew_x(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM;
if(lv_obj_get_style_transform_skew_y(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM; if(lv_obj_get_style_transform_skew_y(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM;
if(lv_obj_get_style_opa_layered(obj, 0) != LV_OPA_COVER) return LV_LAYER_TYPE_SIMPLE; if(lv_obj_get_style_opa_layered(obj, 0) != LV_OPA_COVER) return LV_LAYER_TYPE_SIMPLE;
if(lv_obj_get_style_bitmap_mask_src(obj, 0) != NULL) return LV_LAYER_TYPE_SIMPLE;
if(lv_obj_get_style_blend_mode(obj, 0) != LV_BLEND_MODE_NORMAL) return LV_LAYER_TYPE_SIMPLE; if(lv_obj_get_style_blend_mode(obj, 0) != LV_BLEND_MODE_NORMAL) return LV_LAYER_TYPE_SIMPLE;
return LV_LAYER_TYPE_NONE; return LV_LAYER_TYPE_NONE;
} }

View File

@ -352,6 +352,13 @@ static inline int32_t lv_obj_get_style_transform_scale_y_safe(const lv_obj_t * o
*/ */
lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t * obj, lv_part_t part); lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t * obj, lv_part_t part);
/**
* Update the layer type of a widget bayed on its current styles.
* The result will be stored in `obj->spec_attr->layer_type`
* @param obj the object whose layer should be updated
*/
void _lv_obj_update_layer_type(lv_obj_t * obj);
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/

View File

@ -690,8 +690,7 @@ void lv_obj_set_style_opa_layered(lv_obj_t * obj, lv_opa_t value, lv_style_selec
lv_obj_set_local_style_prop(obj, LV_STYLE_OPA_LAYERED, v, selector); lv_obj_set_local_style_prop(obj, LV_STYLE_OPA_LAYERED, v, selector);
} }
void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector)
lv_style_selector_t selector)
{ {
lv_style_value_t v = { lv_style_value_t v = {
.ptr = value .ptr = value
@ -754,8 +753,23 @@ void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_sel
}; };
lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector); lv_obj_set_local_style_prop(obj, LV_STYLE_BASE_DIR, v, selector);
} }
#if LV_USE_FLEX
void lv_obj_set_style_bitmap_mask_src(lv_obj_t * obj, const lv_image_dsc_t * value, lv_style_selector_t selector)
{
lv_style_value_t v = {
.ptr = value
};
lv_obj_set_local_style_prop(obj, LV_STYLE_BITMAP_MASK_SRC, v, selector);
}
void lv_obj_set_style_rotary_sensitivity(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector)
{
lv_style_value_t v = {
.num = (int32_t)value
};
lv_obj_set_local_style_prop(obj, LV_STYLE_ROTARY_SENSITIVITY, v, selector);
}
#if LV_USE_FLEX
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector) void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector)
{ {
@ -800,7 +814,6 @@ void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector
#if LV_USE_GRID #if LV_USE_GRID
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector) void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector)
{ {
lv_style_value_t v = { lv_style_value_t v = {

View File

@ -6,9 +6,14 @@
********************************************************************** **********************************************************************
*/ */
#ifndef LV_OBJ_STYLE_GEN_H #ifndef LV_OBJ_STYLE_GEN_H
#define LV_OBJ_STYLE_GEN_H #define LV_OBJ_STYLE_GEN_H
#ifdef __cplusplus
extern "C" {
#endif
#include "../misc/lv_area.h" #include "../misc/lv_area.h"
#include "../misc/lv_style.h" #include "../misc/lv_style.h"
#include "../core/lv_obj_style.h" #include "../core/lv_obj_style.h"
@ -225,8 +230,7 @@ static inline lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t * obj, ui
static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t * obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR));
LV_STYLE_BG_GRAD_COLOR));
return v.color; return v.color;
} }
@ -286,8 +290,7 @@ static inline lv_color_t lv_obj_get_style_bg_image_recolor(const lv_obj_t * obj,
static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t * obj, uint32_t part) static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR));
LV_STYLE_BG_IMAGE_RECOLOR));
return v.color; return v.color;
} }
@ -311,8 +314,7 @@ static inline lv_color_t lv_obj_get_style_border_color(const lv_obj_t * obj, uin
static inline lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t * obj, uint32_t part) static inline lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR));
LV_STYLE_BORDER_COLOR));
return v.color; return v.color;
} }
@ -354,8 +356,7 @@ static inline lv_color_t lv_obj_get_style_outline_color(const lv_obj_t * obj, ui
static inline lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t * obj, uint32_t part) static inline lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR));
LV_STYLE_OUTLINE_COLOR));
return v.color; return v.color;
} }
@ -403,8 +404,7 @@ static inline lv_color_t lv_obj_get_style_shadow_color(const lv_obj_t * obj, uin
static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t * obj, uint32_t part) static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR));
LV_STYLE_SHADOW_COLOR));
return v.color; return v.color;
} }
@ -428,8 +428,7 @@ static inline lv_color_t lv_obj_get_style_image_recolor(const lv_obj_t * obj, ui
static inline lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t * obj, uint32_t part) static inline lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR));
LV_STYLE_IMAGE_RECOLOR));
return v.color; return v.color;
} }
@ -637,8 +636,19 @@ static inline lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t * obj, uint
return (lv_base_dir_t)v.num; return (lv_base_dir_t)v.num;
} }
#if LV_USE_FLEX static inline const lv_image_dsc_t * lv_obj_get_style_bitmap_mask_src(const lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BITMAP_MASK_SRC);
return (const lv_image_dsc_t *)v.ptr;
}
static inline uint32_t lv_obj_get_style_rotary_sensitivity(const lv_obj_t * obj, uint32_t part)
{
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ROTARY_SENSITIVITY);
return (uint32_t)v.num;
}
#if LV_USE_FLEX
static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, uint32_t part) static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_FLOW); lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_FLOW);
@ -672,7 +682,6 @@ static inline uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, uint32_t
#endif /*LV_USE_FLEX*/ #endif /*LV_USE_FLEX*/
#if LV_USE_GRID #if LV_USE_GRID
static inline const int32_t * lv_obj_get_style_grid_column_dsc_array(const lv_obj_t * obj, uint32_t part) static inline const int32_t * lv_obj_get_style_grid_column_dsc_array(const lv_obj_t * obj, uint32_t part)
{ {
lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY); lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY);
@ -820,8 +829,7 @@ void lv_obj_set_style_radius(lv_obj_t * obj, int32_t value, lv_style_selector_t
void lv_obj_set_style_clip_corner(lv_obj_t * obj, bool value, lv_style_selector_t selector); void lv_obj_set_style_clip_corner(lv_obj_t * obj, bool value, lv_style_selector_t selector);
void lv_obj_set_style_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_opa_layered(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_opa_layered(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector);
lv_style_selector_t selector);
void lv_obj_set_style_color_filter_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_color_filter_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector);
void lv_obj_set_style_anim(lv_obj_t * obj, const lv_anim_t * value, lv_style_selector_t selector); void lv_obj_set_style_anim(lv_obj_t * obj, const lv_anim_t * value, lv_style_selector_t selector);
void lv_obj_set_style_anim_duration(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector); void lv_obj_set_style_anim_duration(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
@ -829,27 +837,32 @@ void lv_obj_set_style_transition(lv_obj_t * obj, const lv_style_transition_dsc_t
void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector); void lv_obj_set_style_blend_mode(lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector);
void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector); void lv_obj_set_style_layout(lv_obj_t * obj, uint16_t value, lv_style_selector_t selector);
void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector); void lv_obj_set_style_base_dir(lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector);
void lv_obj_set_style_bitmap_mask_src(lv_obj_t * obj, const lv_image_dsc_t * value, lv_style_selector_t selector);
void lv_obj_set_style_rotary_sensitivity(lv_obj_t * obj, uint32_t value, lv_style_selector_t selector);
#if LV_USE_FLEX #if LV_USE_FLEX
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_flow(lv_obj_t * obj, lv_flex_flow_t value, lv_style_selector_t selector); void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_main_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector); void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_cross_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector); void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_track_place(lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector); void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
void lv_obj_set_style_flex_grow(lv_obj_t * obj, uint8_t value, lv_style_selector_t selector);
#endif /*LV_USE_FLEX*/ #endif /*LV_USE_FLEX*/
#if LV_USE_GRID #if LV_USE_GRID
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
void lv_obj_set_style_grid_column_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector); void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_column_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector);
void lv_obj_set_style_grid_row_dsc_array(lv_obj_t * obj, const int32_t * value, lv_style_selector_t selector); void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_row_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_column_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_x_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_column_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector);
#endif /*LV_USE_GRID*/ #endif /*LV_USE_GRID*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_OBJ_STYLE_GEN_H */ #endif /* LV_OBJ_STYLE_GEN_H */

View File

@ -20,7 +20,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define MY_CLASS &lv_obj_class #define MY_CLASS (&lv_obj_class)
#define disp_ll_p &(LV_GLOBAL_DEFAULT()->disp_ll) #define disp_ll_p &(LV_GLOBAL_DEFAULT()->disp_ll)
#define OBJ_DUMP_STRING_LEN 128 #define OBJ_DUMP_STRING_LEN 128
@ -484,6 +484,15 @@ static void lv_obj_delete_async_cb(void * obj)
lv_obj_delete(obj); lv_obj_delete(obj);
} }
static void obj_indev_reset(lv_indev_t * indev, lv_obj_t * obj)
{
/*Wait for release to avoid accidentally triggering other obj to be clicked*/
lv_indev_wait_release(indev);
/*Reset the input device*/
lv_indev_reset(indev, obj);
}
static void obj_delete_core(lv_obj_t * obj) static void obj_delete_core(lv_obj_t * obj)
{ {
if(obj->is_deleting) if(obj->is_deleting)
@ -516,7 +525,7 @@ static void obj_delete_core(lv_obj_t * obj)
lv_indev_type_t indev_type = lv_indev_get_type(indev); lv_indev_type_t indev_type = lv_indev_get_type(indev);
if(indev_type == LV_INDEV_TYPE_POINTER || indev_type == LV_INDEV_TYPE_BUTTON) { if(indev_type == LV_INDEV_TYPE_POINTER || indev_type == LV_INDEV_TYPE_BUTTON) {
if(indev->pointer.act_obj == obj || indev->pointer.last_obj == obj || indev->pointer.scroll_obj == obj) { if(indev->pointer.act_obj == obj || indev->pointer.last_obj == obj || indev->pointer.scroll_obj == obj) {
lv_indev_reset(indev, obj); obj_indev_reset(indev, obj);
} }
if(indev->pointer.last_pressed == obj) { if(indev->pointer.last_pressed == obj) {
indev->pointer.last_pressed = NULL; indev->pointer.last_pressed = NULL;
@ -524,7 +533,7 @@ static void obj_delete_core(lv_obj_t * obj)
} }
if(indev->group == group && obj == lv_indev_get_active_obj()) { if(indev->group == group && obj == lv_indev_get_active_obj()) {
lv_indev_reset(indev, obj); obj_indev_reset(indev, obj);
} }
indev = lv_indev_get_next(indev); indev = lv_indev_get_next(indev);
} }

View File

@ -679,7 +679,13 @@ static void refr_area_part(lv_layer_t * layer)
} }
/*If the screen is transparent initialize it when the flushing is ready*/ /*If the screen is transparent initialize it when the flushing is ready*/
if(lv_color_format_has_alpha(disp_refr->color_format)) { if(lv_color_format_has_alpha(disp_refr->color_format)) {
lv_draw_buf_clear(layer->draw_buf, &disp_refr->refreshed_area); lv_area_t a = disp_refr->refreshed_area;
if(disp_refr->render_mode == LV_DISPLAY_RENDER_MODE_PARTIAL) {
/*The area always starts at 0;0*/
lv_area_move(&a, -disp_refr->refreshed_area.x1, -disp_refr->refreshed_area.y1);
}
lv_draw_buf_clear(layer->draw_buf, &a);
} }
lv_obj_t * top_act_scr = NULL; lv_obj_t * top_act_scr = NULL;
@ -820,19 +826,18 @@ static void refr_obj_and_children(lv_layer_t * layer, lv_obj_t * top_obj)
} }
static lv_result_t layer_get_area(lv_layer_t * layer, lv_obj_t * obj, lv_layer_type_t layer_type, static lv_result_t layer_get_area(lv_layer_t * layer, lv_obj_t * obj, lv_layer_type_t layer_type,
lv_area_t * layer_area_out) lv_area_t * layer_area_out, lv_area_t * obj_draw_size_out)
{ {
int32_t ext_draw_size = _lv_obj_get_ext_draw_size(obj); int32_t ext_draw_size = _lv_obj_get_ext_draw_size(obj);
lv_area_t obj_coords_ext; lv_obj_get_coords(obj, obj_draw_size_out);
lv_obj_get_coords(obj, &obj_coords_ext); lv_area_increase(obj_draw_size_out, ext_draw_size, ext_draw_size);
lv_area_increase(&obj_coords_ext, ext_draw_size, ext_draw_size);
if(layer_type == LV_LAYER_TYPE_TRANSFORM) { if(layer_type == LV_LAYER_TYPE_TRANSFORM) {
/*Get the transformed area and clip it to the current clip area. /*Get the transformed area and clip it to the current clip area.
*This area needs to be updated on the screen.*/ *This area needs to be updated on the screen.*/
lv_area_t clip_coords_for_obj; lv_area_t clip_coords_for_obj;
lv_area_t tranf_coords = obj_coords_ext; lv_area_t tranf_coords = *obj_draw_size_out;
lv_obj_get_transformed_area(obj, &tranf_coords, false, false); lv_obj_get_transformed_area(obj, &tranf_coords, LV_OBJ_POINT_TRANSFORM_FLAG_NONE);
if(!_lv_area_intersect(&clip_coords_for_obj, &layer->_clip_area, &tranf_coords)) { if(!_lv_area_intersect(&clip_coords_for_obj, &layer->_clip_area, &tranf_coords)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
} }
@ -841,8 +846,8 @@ static lv_result_t layer_get_area(lv_layer_t * layer, lv_obj_t * obj, lv_layer_t
*It will tell which area of the non-transformed widget needs to be redrawn *It will tell which area of the non-transformed widget needs to be redrawn
*in order to cover transformed area after transformation.*/ *in order to cover transformed area after transformation.*/
lv_area_t inverse_clip_coords_for_obj = clip_coords_for_obj; lv_area_t inverse_clip_coords_for_obj = clip_coords_for_obj;
lv_obj_get_transformed_area(obj, &inverse_clip_coords_for_obj, false, true); lv_obj_get_transformed_area(obj, &inverse_clip_coords_for_obj, LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE);
if(!_lv_area_intersect(&inverse_clip_coords_for_obj, &inverse_clip_coords_for_obj, &obj_coords_ext)) { if(!_lv_area_intersect(&inverse_clip_coords_for_obj, &inverse_clip_coords_for_obj, obj_draw_size_out)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
} }
@ -851,7 +856,7 @@ static lv_result_t layer_get_area(lv_layer_t * layer, lv_obj_t * obj, lv_layer_t
} }
else if(layer_type == LV_LAYER_TYPE_SIMPLE) { else if(layer_type == LV_LAYER_TYPE_SIMPLE) {
lv_area_t clip_coords_for_obj; lv_area_t clip_coords_for_obj;
if(!_lv_area_intersect(&clip_coords_for_obj, &layer->_clip_area, &obj_coords_ext)) { if(!_lv_area_intersect(&clip_coords_for_obj, &layer->_clip_area, obj_draw_size_out)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
} }
*layer_area_out = clip_coords_for_obj; *layer_area_out = clip_coords_for_obj;
@ -891,7 +896,8 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
if(opa < LV_OPA_MIN) return; if(opa < LV_OPA_MIN) return;
lv_area_t layer_area_full; lv_area_t layer_area_full;
lv_result_t res = layer_get_area(layer, obj, layer_type, &layer_area_full); lv_area_t obj_draw_size;
lv_result_t res = layer_get_area(layer, obj, layer_type, &layer_area_full, &obj_draw_size);
if(res != LV_RESULT_OK) return; if(res != LV_RESULT_OK) return;
/*Simple layers can be subdivied into smaller layers*/ /*Simple layers can be subdivied into smaller layers*/
@ -900,8 +906,8 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
if(layer_type == LV_LAYER_TYPE_SIMPLE) { if(layer_type == LV_LAYER_TYPE_SIMPLE) {
int32_t w = lv_area_get_width(&layer_area_full); int32_t w = lv_area_get_width(&layer_area_full);
uint8_t px_size = lv_color_format_get_size(disp_refr->color_format); uint8_t px_size = lv_color_format_get_size(disp_refr->color_format);
max_rgb_row_height = LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE / w / px_size; max_rgb_row_height = LV_DRAW_LAYER_SIMPLE_BUF_SIZE / w / px_size;
max_argb_row_height = LV_DRAW_SW_LAYER_SIMPLE_BUF_SIZE / w / sizeof(lv_color32_t); max_argb_row_height = LV_DRAW_LAYER_SIMPLE_BUF_SIZE / w / sizeof(lv_color32_t);
} }
lv_area_t layer_area_act; lv_area_t layer_area_act;
@ -925,10 +931,22 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
area_need_alpha ? LV_COLOR_FORMAT_ARGB8888 : LV_COLOR_FORMAT_NATIVE, &layer_area_act); area_need_alpha ? LV_COLOR_FORMAT_ARGB8888 : LV_COLOR_FORMAT_NATIVE, &layer_area_act);
lv_obj_redraw(new_layer, obj); lv_obj_redraw(new_layer, obj);
lv_point_t pivot = {
.x = lv_obj_get_style_transform_pivot_x(obj, 0),
.y = lv_obj_get_style_transform_pivot_y(obj, 0)
};
if(LV_COORD_IS_PCT(pivot.x)) {
pivot.x = (LV_COORD_GET_PCT(pivot.x) * lv_area_get_width(&obj->coords)) / 100;
}
if(LV_COORD_IS_PCT(pivot.y)) {
pivot.y = (LV_COORD_GET_PCT(pivot.y) * lv_area_get_height(&obj->coords)) / 100;
}
lv_draw_image_dsc_t layer_draw_dsc; lv_draw_image_dsc_t layer_draw_dsc;
lv_draw_image_dsc_init(&layer_draw_dsc); lv_draw_image_dsc_init(&layer_draw_dsc);
layer_draw_dsc.pivot.x = obj->coords.x1 + lv_obj_get_style_transform_pivot_x(obj, 0) - new_layer->buf_area.x1; layer_draw_dsc.pivot.x = obj->coords.x1 + pivot.x - new_layer->buf_area.x1;
layer_draw_dsc.pivot.y = obj->coords.y1 + lv_obj_get_style_transform_pivot_y(obj, 0) - new_layer->buf_area.y1; layer_draw_dsc.pivot.y = obj->coords.y1 + pivot.y - new_layer->buf_area.y1;
layer_draw_dsc.opa = opa; layer_draw_dsc.opa = opa;
layer_draw_dsc.rotation = lv_obj_get_style_transform_rotation(obj, 0); layer_draw_dsc.rotation = lv_obj_get_style_transform_rotation(obj, 0);
@ -940,6 +958,8 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
layer_draw_dsc.skew_y = lv_obj_get_style_transform_skew_y(obj, 0); layer_draw_dsc.skew_y = lv_obj_get_style_transform_skew_y(obj, 0);
layer_draw_dsc.blend_mode = lv_obj_get_style_blend_mode(obj, 0); layer_draw_dsc.blend_mode = lv_obj_get_style_blend_mode(obj, 0);
layer_draw_dsc.antialias = disp_refr->antialiasing; layer_draw_dsc.antialias = disp_refr->antialiasing;
layer_draw_dsc.bitmap_mask_src = lv_obj_get_style_bitmap_mask_src(obj, 0);
layer_draw_dsc.original_area = obj_draw_size;
layer_draw_dsc.src = new_layer; layer_draw_dsc.src = new_layer;
lv_draw_layer(layer, &layer_draw_dsc, &layer_area_act); lv_draw_layer(layer, &layer_draw_dsc, &layer_area_act);
@ -952,9 +972,9 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj)
static uint32_t get_max_row(lv_display_t * disp, int32_t area_w, int32_t area_h) static uint32_t get_max_row(lv_display_t * disp, int32_t area_w, int32_t area_h)
{ {
bool has_alpha = lv_color_format_has_alpha(disp->color_format); bool has_alpha = lv_color_format_has_alpha(disp->color_format);
uint32_t px_size_disp = lv_color_format_get_size(disp->color_format); lv_color_format_t cf = has_alpha ? LV_COLOR_FORMAT_ARGB8888 : disp->color_format;
uint8_t px_size_render = has_alpha ? sizeof(lv_color32_t) : px_size_disp; uint32_t stride = lv_draw_buf_width_to_stride(area_w, cf);
int32_t max_row = (uint32_t)disp->buf_act->data_size / LV_MAX(px_size_render, px_size_disp) / area_w; int32_t max_row = (uint32_t)disp->buf_act->data_size / stride;
if(max_row > area_h) max_row = area_h; if(max_row > area_h) max_row = area_h;
@ -1055,6 +1075,8 @@ static void wait_for_flushing(lv_display_t * disp)
LV_PROFILER_BEGIN; LV_PROFILER_BEGIN;
LV_LOG_TRACE("begin"); LV_LOG_TRACE("begin");
lv_display_send_event(disp, LV_EVENT_FLUSH_WAIT_START, NULL);
if(disp->flush_wait_cb) { if(disp->flush_wait_cb) {
disp->flush_wait_cb(disp); disp->flush_wait_cb(disp);
} }
@ -1063,6 +1085,8 @@ static void wait_for_flushing(lv_display_t * disp)
} }
disp->flushing_last = 0; disp->flushing_last = 0;
lv_display_send_event(disp, LV_EVENT_FLUSH_WAIT_FINISH, NULL);
LV_LOG_TRACE("end"); LV_LOG_TRACE("end");
LV_PROFILER_END; LV_PROFILER_END;
} }

View File

@ -61,7 +61,7 @@ void _lv_refr_deinit(void);
void lv_refr_now(lv_display_t * disp); void lv_refr_now(lv_display_t * disp);
/** /**
* Redrawn on object an all its children using the passed draw context * Redrawn on object and all its children using the passed draw context
* @param layer pointer to a layer where to draw. * @param layer pointer to a layer where to draw.
* @param obj the start object from the redraw should start * @param obj the start object from the redraw should start
*/ */

View File

@ -84,6 +84,7 @@ lv_display_t * lv_display_create(int32_t hor_res, int32_t ver_res)
disp->layer_head->color_format = disp->color_format; disp->layer_head->color_format = disp->color_format;
disp->inv_en_cnt = 1; disp->inv_en_cnt = 1;
disp->last_activity_time = lv_tick_get();
_lv_ll_init(&disp->sync_areas, sizeof(lv_area_t)); _lv_ll_init(&disp->sync_areas, sizeof(lv_area_t));
@ -406,8 +407,8 @@ void lv_display_set_buffers(lv_display_t * disp, void * buf1, void * buf2, uint3
LV_ASSERT_MSG(w != 0 && h != 0, "display resolution is 0"); LV_ASSERT_MSG(w != 0 && h != 0, "display resolution is 0");
/* buf1 or buf2 is not aligned according to LV_DRAW_BUF_ALIGN */ /* buf1 or buf2 is not aligned according to LV_DRAW_BUF_ALIGN */
LV_ASSERT_MSG(buf1 == lv_draw_buf_align(buf1, cf), "buf1 is not aligned: %p", buf1); LV_ASSERT_FORMAT_MSG(buf1 == lv_draw_buf_align(buf1, cf), "buf1 is not aligned: %p", buf1);
LV_ASSERT_MSG(buf2 == NULL || buf2 == lv_draw_buf_align(buf2, cf), "buf2 is not aligned: %p", buf2); LV_ASSERT_FORMAT_MSG(buf2 == NULL || buf2 == lv_draw_buf_align(buf2, cf), "buf2 is not aligned: %p", buf2);
uint32_t stride = lv_draw_buf_width_to_stride(w, cf); uint32_t stride = lv_draw_buf_width_to_stride(w, cf);
if(render_mode == LV_DISPLAY_RENDER_MODE_PARTIAL) { if(render_mode == LV_DISPLAY_RENDER_MODE_PARTIAL) {
@ -416,8 +417,8 @@ void lv_display_set_buffers(lv_display_t * disp, void * buf1, void * buf2, uint3
LV_ASSERT_MSG(h != 0, "the buffer is too small"); LV_ASSERT_MSG(h != 0, "the buffer is too small");
} }
else { else {
LV_ASSERT_MSG(stride * h <= buf_size, "%s mode requires screen sized buffer(s)", LV_ASSERT_FORMAT_MSG(stride * h <= buf_size, "%s mode requires screen sized buffer(s)",
render_mode == LV_DISPLAY_RENDER_MODE_FULL ? "FULL" : "DIRECT"); render_mode == LV_DISPLAY_RENDER_MODE_FULL ? "FULL" : "DIRECT");
} }
lv_draw_buf_init(&disp->_static_buf1, w, h, cf, stride, buf1, buf_size); lv_draw_buf_init(&disp->_static_buf1, w, h, cf, stride, buf1, buf_size);
@ -916,6 +917,13 @@ void * lv_display_get_driver_data(lv_display_t * disp)
return disp->driver_data; return disp->driver_data;
} }
lv_draw_buf_t * lv_display_get_buf_active(lv_display_t * disp)
{
if(!disp) disp = lv_display_get_default();
if(!disp) return NULL;
return disp->buf_act;
}
/********************** /**********************
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/

View File

@ -534,6 +534,7 @@ void lv_display_set_user_data(lv_display_t * disp, void * user_data);
void lv_display_set_driver_data(lv_display_t * disp, void * driver_data); void lv_display_set_driver_data(lv_display_t * disp, void * driver_data);
void * lv_display_get_user_data(lv_display_t * disp); void * lv_display_get_user_data(lv_display_t * disp);
void * lv_display_get_driver_data(lv_display_t * disp); void * lv_display_get_driver_data(lv_display_t * disp);
lv_draw_buf_t * lv_display_get_buf_active(lv_display_t * disp);
/********************** /**********************
* MACROS * MACROS

View File

@ -213,12 +213,10 @@ bool lv_draw_dispatch_layer(lv_display_t * disp, lv_layer_t * layer)
lv_free(layer_drawn); lv_free(layer_drawn);
} }
} }
if(t->type == LV_DRAW_TASK_TYPE_LABEL) { lv_draw_label_dsc_t * draw_label_dsc = lv_draw_task_get_label_dsc(t);
lv_draw_label_dsc_t * draw_label_dsc = t->draw_dsc; if(draw_label_dsc && draw_label_dsc->text_local) {
if(draw_label_dsc->text_local) { lv_free((void *)draw_label_dsc->text);
lv_free((void *)draw_label_dsc->text); draw_label_dsc->text = NULL;
draw_label_dsc->text = NULL;
}
} }
lv_free(t->draw_dsc); lv_free(t->draw_dsc);
@ -370,6 +368,7 @@ void * lv_draw_layer_alloc_buf(lv_layer_t * layer)
/*If the buffer of the layer is not allocated yet, allocate it now*/ /*If the buffer of the layer is not allocated yet, allocate it now*/
int32_t w = lv_area_get_width(&layer->buf_area); int32_t w = lv_area_get_width(&layer->buf_area);
int32_t h = lv_area_get_height(&layer->buf_area); int32_t h = lv_area_get_height(&layer->buf_area);
uint32_t layer_size_byte = h * lv_draw_buf_width_to_stride(w, layer->color_format);
layer->draw_buf = lv_draw_buf_create(w, h, layer->color_format, 0); layer->draw_buf = lv_draw_buf_create(w, h, layer->color_format, 0);
@ -378,13 +377,11 @@ void * lv_draw_layer_alloc_buf(lv_layer_t * layer)
return NULL; return NULL;
} }
_draw_info.used_memory_for_layers_kb += get_layer_size_kb(layer_size_byte);
LV_LOG_INFO("Layer memory used: %" LV_PRIu32 " kB\n", _draw_info.used_memory_for_layers_kb);
if(lv_color_format_has_alpha(layer->color_format)) { if(lv_color_format_has_alpha(layer->color_format)) {
lv_area_t a; lv_draw_buf_clear(layer->draw_buf, NULL);
a.x1 = 0;
a.y1 = 0;
a.x2 = w - 1;
a.y2 = h - 1;
lv_draw_buf_clear(layer->draw_buf, &a);
} }
return layer->draw_buf->data; return layer->draw_buf->data;

View File

@ -43,6 +43,11 @@ void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t * dsc)
dsc->color = lv_color_black(); dsc->color = lv_color_black();
} }
lv_draw_arc_dsc_t * lv_draw_task_get_arc_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_ARC ? (lv_draw_arc_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_arc(lv_layer_t * layer, const lv_draw_arc_dsc_t * dsc) void lv_draw_arc(lv_layer_t * layer, const lv_draw_arc_dsc_t * dsc)
{ {
if(dsc->opa <= LV_OPA_MIN) return; if(dsc->opa <= LV_OPA_MIN) return;

View File

@ -50,6 +50,13 @@ typedef struct {
*/ */
void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t * dsc); void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t * dsc);
/**
* Try to get an arc draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_ARC
*/
lv_draw_arc_dsc_t * lv_draw_task_get_arc_dsc(lv_draw_task_t * task);
/** /**
* Create an arc draw task. * Create an arc draw task.
* @param layer pointer to a layer * @param layer pointer to a layer

View File

@ -70,9 +70,20 @@ void * lv_draw_buf_align(void * data, lv_color_format_t color_format)
else return NULL; else return NULL;
} }
void lv_draw_buf_invalidate_cache(void * buf, uint32_t stride, lv_color_format_t color_format, const lv_area_t * area) void lv_draw_buf_invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area)
{ {
if(handlers.invalidate_cache_cb) handlers.invalidate_cache_cb(buf, stride, color_format, area); if(handlers.invalidate_cache_cb) {
LV_ASSERT_NULL(draw_buf);
const lv_image_header_t * header = &draw_buf->header;
lv_area_t full;
if(area == NULL) {
full = (lv_area_t) {
0, 0, header->w - 1, header->h - 1
};
area = &full;
}
handlers.invalidate_cache_cb(draw_buf, area);
}
} }
void lv_draw_buf_clear(lv_draw_buf_t * draw_buf, const lv_area_t * a) void lv_draw_buf_clear(lv_draw_buf_t * draw_buf, const lv_area_t * a)
@ -110,9 +121,20 @@ void lv_draw_buf_copy(lv_draw_buf_t * dest, const lv_area_t * dest_area,
uint8_t * src_bufc; uint8_t * src_bufc;
int32_t line_width; int32_t line_width;
/*Source and dest color format must be same. Color conversion is not supported yet.*/
LV_ASSERT_FORMAT_MSG(dest->header.cf == src->header.cf, "Color format mismatch: %d != %d",
dest->header.cf, src->header.cf);
if(dest_area == NULL) line_width = dest->header.w; if(dest_area == NULL) line_width = dest->header.w;
else line_width = lv_area_get_width(dest_area); else line_width = lv_area_get_width(dest_area);
/* For indexed image, copy the palette if we are copying full image area*/
if(dest_area == NULL || src_area == NULL) {
if(LV_COLOR_FORMAT_IS_INDEXED(dest->header.cf)) {
lv_memcpy(dest->data, src->data, LV_COLOR_INDEXED_PALETTE_SIZE(dest->header.cf) * sizeof(lv_color32_t));
}
}
/*Check source and dest area have same width*/ /*Check source and dest area have same width*/
if((src_area == NULL && line_width != src->header.w) || \ if((src_area == NULL && line_width != src->header.w) || \
(src_area != NULL && line_width != lv_area_get_width(src_area))) { (src_area != NULL && line_width != lv_area_get_width(src_area))) {
@ -121,10 +143,10 @@ void lv_draw_buf_copy(lv_draw_buf_t * dest, const lv_area_t * dest_area,
} }
if(src_area) src_bufc = lv_draw_buf_goto_xy(src, src_area->x1, src_area->y1); if(src_area) src_bufc = lv_draw_buf_goto_xy(src, src_area->x1, src_area->y1);
else src_bufc = src->data; else src_bufc = lv_draw_buf_goto_xy(src, 0, 0);
if(dest_area) dest_bufc = lv_draw_buf_goto_xy(dest, dest_area->x1, dest_area->y1); if(dest_area) dest_bufc = lv_draw_buf_goto_xy(dest, dest_area->x1, dest_area->y1);
else dest_bufc = dest->data; else dest_bufc = lv_draw_buf_goto_xy(dest, 0, 0);
int32_t start_y, end_y; int32_t start_y, end_y;
if(dest_area) { if(dest_area) {
@ -138,10 +160,10 @@ void lv_draw_buf_copy(lv_draw_buf_t * dest, const lv_area_t * dest_area,
uint32_t dest_stride = dest->header.stride; uint32_t dest_stride = dest->header.stride;
uint32_t src_stride = src->header.stride; uint32_t src_stride = src->header.stride;
line_width *= lv_color_format_get_size(dest->header.cf); /*Pixel to bytes*/ uint32_t line_bytes = (line_width * lv_color_format_get_bpp(dest->header.cf) + 7) >> 3;
for(; start_y <= end_y; start_y++) { for(; start_y <= end_y; start_y++) {
lv_memcpy(dest_bufc, src_bufc, line_width); lv_memcpy(dest_bufc, src_bufc, line_bytes);
dest_bufc += dest_stride; dest_bufc += dest_stride;
src_bufc += src_stride; src_bufc += src_stride;
} }
@ -161,7 +183,14 @@ lv_result_t lv_draw_buf_init(lv_draw_buf_t * draw_buf, uint32_t w, uint32_t h, l
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
} }
lv_image_header_init(&draw_buf->header, w, h, cf, stride, 0); lv_image_header_t * header = &draw_buf->header;
header->w = w;
header->h = h;
header->cf = cf;
header->stride = stride;
header->flags = 0;
header->magic = LV_IMAGE_HEADER_MAGIC;
draw_buf->data = lv_draw_buf_align(data, cf); draw_buf->data = lv_draw_buf_align(data, cf);
draw_buf->unaligned_data = data; draw_buf->unaligned_data = data;
draw_buf->data_size = data_size; draw_buf->data_size = data_size;
@ -230,7 +259,7 @@ lv_draw_buf_t * lv_draw_buf_reshape(lv_draw_buf_t * draw_buf, lv_color_format_t
uint32_t size = _calculate_draw_buf_size(w, h, cf, stride); uint32_t size = _calculate_draw_buf_size(w, h, cf, stride);
if(size > draw_buf->data_size) { if(size > draw_buf->data_size) {
LV_LOG_INFO("Draw buf too small for new shape"); LV_LOG_TRACE("Draw buf too small for new shape");
return NULL; return NULL;
} }
@ -262,49 +291,73 @@ void * lv_draw_buf_goto_xy(const lv_draw_buf_t * buf, uint32_t x, uint32_t y)
if(buf == NULL) return NULL; if(buf == NULL) return NULL;
uint8_t * data = buf->data; uint8_t * data = buf->data;
/*Skip palette*/
data += LV_COLOR_INDEXED_PALETTE_SIZE(buf->header.cf) * sizeof(lv_color32_t);
data += buf->header.stride * y; data += buf->header.stride * y;
if(x == 0) if(x == 0) return data;
return data;
return data + x * lv_color_format_get_size(buf->header.cf); return data + x * lv_color_format_get_size(buf->header.cf);
} }
lv_draw_buf_t * lv_draw_buf_adjust_stride(const lv_draw_buf_t * src, uint32_t stride) lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t * src, uint32_t stride)
{ {
LV_ASSERT_NULL(src); LV_ASSERT_NULL(src);
LV_ASSERT_NULL(src->data); LV_ASSERT_NULL(src->data);
if(src == NULL) return NULL; if(src == NULL) return LV_RESULT_INVALID;
if(src->data == NULL) return NULL; if(src->data == NULL) return LV_RESULT_INVALID;
const lv_image_header_t * header = &src->header; const lv_image_header_t * header = &src->header;
uint32_t w = header->w;
uint32_t h = header->h;
/*Use global stride*/ /*Use global stride*/
if(stride == 0) stride = lv_draw_buf_width_to_stride(header->w, header->cf); if(stride == 0) stride = lv_draw_buf_width_to_stride(w, header->cf);
/*Check if stride already match*/ /*Check if stride already match*/
if(header->stride == stride) return NULL; if(header->stride == stride) return LV_RESULT_OK;
/*Calculate the minimal stride allowed from bpp*/ /*Calculate the minimal stride allowed from bpp*/
uint32_t bpp = lv_color_format_get_bpp(header->cf); uint32_t bpp = lv_color_format_get_bpp(header->cf);
uint32_t min_stride = (header->w * bpp + 7) >> 3; uint32_t min_stride = (w * bpp + 7) >> 3;
if(stride < min_stride) { if(stride < min_stride) {
LV_LOG_WARN("New stride is too small. min: %" LV_PRId32, min_stride); LV_LOG_WARN("New stride is too small. min: %" LV_PRId32, min_stride);
return NULL; return LV_RESULT_INVALID;
} }
lv_draw_buf_t * dst = lv_draw_buf_create(header->w, header->h, header->cf, stride); /*Check if buffer has enough space. */
if(dst == NULL) return NULL; uint32_t new_size = _calculate_draw_buf_size(w, h, header->cf, stride);
if(new_size > src->data_size) {
uint8_t * dst_data = dst->data; return LV_RESULT_INVALID;
const uint8_t * src_data = src->data;
for(int32_t y = 0; y < src->header.h; y++) {
lv_memcpy(dst_data, src_data, min_stride);
src_data += src->header.stride;
dst_data += dst->header.stride;
} }
return dst; uint32_t offset = LV_COLOR_INDEXED_PALETTE_SIZE(header->cf) * 4;
if(stride > header->stride) {
/*Copy from the last line to the first*/
uint8_t * src_data = src->data + offset + header->stride * (h - 1);
uint8_t * dst_data = src->data + offset + stride * (h - 1);
for(uint32_t y = 0; y < h; y++) {
lv_memmove(dst_data, src_data, min_stride);
src_data -= header->stride;
dst_data -= stride;
}
}
else {
/*Copy from the first line to the last*/
uint8_t * src_data = src->data + offset;
uint8_t * dst_data = src->data + offset;
for(uint32_t y = 0; y < h; y++) {
lv_memmove(dst_data, src_data, min_stride);
src_data += header->stride;
dst_data += stride;
}
}
src->header.stride = stride;
return LV_RESULT_OK;
} }
lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf) lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf)
@ -358,6 +411,21 @@ lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf)
alpha += alpha_stride; alpha += alpha_stride;
} }
} }
else if(cf == LV_COLOR_FORMAT_ARGB8565) {
uint32_t h = draw_buf->header.h;
uint32_t w = draw_buf->header.w;
uint32_t stride = draw_buf->header.stride;
uint8_t * line = (uint8_t *)draw_buf->data;
for(uint32_t y = 0; y < h; y++) {
uint8_t * pixel = line;
for(uint32_t x = 0; x < w; x++) {
uint8_t alpha = pixel[2];
lv_color16_premultiply((lv_color16_t *)pixel, alpha);
pixel += 3;
}
line += stride;
}
}
else if(LV_COLOR_FORMAT_IS_ALPHA_ONLY(cf)) { else if(LV_COLOR_FORMAT_IS_ALPHA_ONLY(cf)) {
/*Pass*/ /*Pass*/
} }
@ -370,6 +438,20 @@ lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf)
return LV_RESULT_OK; return LV_RESULT_OK;
} }
void lv_draw_buf_set_palette(lv_draw_buf_t * draw_buf, uint8_t index, lv_color32_t color)
{
LV_ASSERT_NULL(draw_buf);
if(draw_buf == NULL) return;
if(!LV_COLOR_FORMAT_IS_INDEXED(draw_buf->header.cf)) {
LV_LOG_WARN("Not indexed color format");
return;
}
uint8_t * buf = (uint8_t *)draw_buf->data;
lv_memcpy(&buf[index * sizeof(color)], &color, sizeof(color));
}
/********************** /**********************
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/

View File

@ -15,7 +15,8 @@ extern "C" {
*********************/ *********************/
#include "../misc/lv_area.h" #include "../misc/lv_area.h"
#include "../misc/lv_color.h" #include "../misc/lv_color.h"
#include "lv_image_buf.h" #include "../stdlib/lv_string.h"
#include "lv_image_dsc.h"
/********************* /*********************
* DEFINES * DEFINES
@ -32,7 +33,7 @@ LV_EXPORT_CONST_INT(LV_STRIDE_AUTO);
typedef struct { typedef struct {
lv_image_header_t header; lv_image_header_t header;
uint32_t data_size; /*Total buf size in bytes*/ uint32_t data_size; /*Total buf size in bytes*/
void * data; uint8_t * data;
void * unaligned_data; /*Unaligned address of `data`, used internally by lvgl*/ void * unaligned_data; /*Unaligned address of `data`, used internally by lvgl*/
} lv_draw_buf_t; } lv_draw_buf_t;
@ -56,11 +57,13 @@ typedef struct {
static uint8_t buf_##name[_LV_DRAW_BUF_SIZE(_w, _h, _cf)]; \ static uint8_t buf_##name[_LV_DRAW_BUF_SIZE(_w, _h, _cf)]; \
static lv_draw_buf_t name = { \ static lv_draw_buf_t name = { \
.header = { \ .header = { \
.w = (_w), \ .magic = LV_IMAGE_HEADER_MAGIC, \
.h = (_h), \
.cf = (_cf), \ .cf = (_cf), \
.flags = LV_IMAGE_FLAGS_MODIFIABLE, \ .flags = LV_IMAGE_FLAGS_MODIFIABLE, \
.w = (_w), \
.h = (_h), \
.stride = _LV_DRAW_BUF_STRIDE(_w, _cf), \ .stride = _LV_DRAW_BUF_STRIDE(_w, _cf), \
.reserved_2 = 0, \
}, \ }, \
.data_size = sizeof(buf_##name), \ .data_size = sizeof(buf_##name), \
.data = buf_##name, \ .data = buf_##name, \
@ -73,8 +76,7 @@ typedef void (*lv_draw_buf_free_cb)(void * draw_buf);
typedef void * (*lv_draw_buf_align_cb)(void * buf, lv_color_format_t color_format); typedef void * (*lv_draw_buf_align_cb)(void * buf, lv_color_format_t color_format);
typedef void (*lv_draw_buf_invalidate_cache_cb)(void * buf, uint32_t stride, lv_color_format_t color_format, typedef void (*lv_draw_buf_invalidate_cache_cb)(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
const lv_area_t * area);
typedef uint32_t (*lv_draw_buf_width_to_stride_cb)(uint32_t w, lv_color_format_t color_format); typedef uint32_t (*lv_draw_buf_width_to_stride_cb)(uint32_t w, lv_color_format_t color_format);
@ -112,12 +114,11 @@ void * lv_draw_buf_align(void * buf, lv_color_format_t color_format);
/** /**
* Invalidate the cache of the buffer * Invalidate the cache of the buffer
* @param buf a memory address to invalidate * @param draw_buf the draw buffer needs to be invalidated
* @param stride stride of the buffer * @param area the area to invalidate in the buffer,
* @param color_format color format of the buffer * use NULL to invalidate the whole draw buffer address range
* @param area the area to invalidate in the buffer
*/ */
void lv_draw_buf_invalidate_cache(void * buf, uint32_t stride, lv_color_format_t color_format, const lv_area_t * area); void lv_draw_buf_invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
/** /**
* Calculate the stride in bytes based on a width and color format * Calculate the stride in bytes based on a width and color format
@ -195,7 +196,7 @@ lv_draw_buf_t * lv_draw_buf_reshape(lv_draw_buf_t * draw_buf, lv_color_format_t
uint32_t stride); uint32_t stride);
/** /**
* Destroy a draw buf by free the actual buffer if it's marked as LV_IMAGE_FLAGS_MODIFIABLE in header. * Destroy a draw buf by free the actual buffer if it's marked as LV_IMAGE_FLAGS_ALLOCATED in header.
* Then free the lv_draw_buf_t struct. * Then free the lv_draw_buf_t struct.
*/ */
void lv_draw_buf_destroy(lv_draw_buf_t * buf); void lv_draw_buf_destroy(lv_draw_buf_t * buf);
@ -206,9 +207,12 @@ void lv_draw_buf_destroy(lv_draw_buf_t * buf);
void * lv_draw_buf_goto_xy(const lv_draw_buf_t * buf, uint32_t x, uint32_t y); void * lv_draw_buf_goto_xy(const lv_draw_buf_t * buf, uint32_t x, uint32_t y);
/** /**
* Adjust the stride of a draw buf. * Adjust the stride of a draw buf in place.
* @param src pointer to a draw buffer
* @param stride the new stride in bytes for image. Use LV_STRIDE_AUTO for automatic calculation.
* @return LV_RESULT_OK: success or LV_RESULT_INVALID: failed
*/ */
lv_draw_buf_t * lv_draw_buf_adjust_stride(const lv_draw_buf_t * src, uint32_t stride); lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t * src, uint32_t stride);
/** /**
* Premultiply draw buffer color with alpha channel. * Premultiply draw buffer color with alpha channel.
@ -224,6 +228,16 @@ static inline bool lv_draw_buf_has_flag(lv_draw_buf_t * draw_buf, lv_image_flags
return draw_buf->header.flags & flag; return draw_buf->header.flags & flag;
} }
static inline void lv_draw_buf_set_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag)
{
draw_buf->header.flags |= flag;
}
static inline void lv_draw_buf_clear_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag)
{
draw_buf->header.flags &= ~flag;
}
/** /**
* As of now, draw buf share same definition as `lv_image_dsc_t`. * As of now, draw buf share same definition as `lv_image_dsc_t`.
* And is interchangeable with `lv_image_dsc_t`. * And is interchangeable with `lv_image_dsc_t`.
@ -237,7 +251,43 @@ static inline void lv_draw_buf_from_image(lv_draw_buf_t * buf, const lv_image_ds
static inline void lv_draw_buf_to_image(const lv_draw_buf_t * buf, lv_image_dsc_t * img) static inline void lv_draw_buf_to_image(const lv_draw_buf_t * buf, lv_image_dsc_t * img)
{ {
lv_memcpy(img, buf, sizeof(lv_image_dsc_t)); lv_memcpy((void *)img, buf, sizeof(lv_image_dsc_t));
}
/**
* Set the palette color of an indexed image. Valid only for `LV_COLOR_FORMAT_I1/2/4/8`
* @param draw_buf pointer to an image descriptor
* @param index the palette color to set:
* - for `LV_COLOR_FORMAT_I1`: 0..1
* - for `LV_COLOR_FORMAT_I2`: 0..3
* - for `LV_COLOR_FORMAT_I4`: 0..15
* - for `LV_COLOR_FORMAT_I8`: 0..255
* @param color the color to set in lv_color32_t format
*/
void lv_draw_buf_set_palette(lv_draw_buf_t * draw_buf, uint8_t index, lv_color32_t color);
/**
* @deprecated Use lv_draw_buf_set_palette instead.
*/
static inline void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c)
{
LV_LOG_WARN("Deprecated API, use lv_draw_buf_set_palette instead.");
lv_draw_buf_set_palette((lv_draw_buf_t *)dsc, id, c);
}
/**
* @deprecated Use lv_draw_buffer_create/destroy instead.
* Free the data pointer and dsc struct of an image.
*/
static inline void lv_image_buf_free(lv_image_dsc_t * dsc)
{
LV_LOG_WARN("Deprecated API, use lv_draw_buf_destroy instead.");
if(dsc != NULL) {
if(dsc->data != NULL)
lv_free((void *)dsc->data);
lv_free((void *)dsc);
}
} }
/********************** /**********************

View File

@ -51,9 +51,15 @@ void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc)
dsc->scale_x = LV_SCALE_NONE; dsc->scale_x = LV_SCALE_NONE;
dsc->scale_y = LV_SCALE_NONE; dsc->scale_y = LV_SCALE_NONE;
dsc->antialias = LV_COLOR_DEPTH > 8 ? 1 : 0; dsc->antialias = LV_COLOR_DEPTH > 8 ? 1 : 0;
dsc->original_area.x2 = LV_COORD_MIN; /*Indicate invalid area by default by setting a negative size*/
dsc->base.dsc_size = sizeof(lv_draw_image_dsc_t); dsc->base.dsc_size = sizeof(lv_draw_image_dsc_t);
} }
lv_draw_image_dsc_t * lv_draw_task_get_image_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_IMAGE ? (lv_draw_image_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_layer(lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords) void lv_draw_layer(lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords)
{ {
lv_draw_task_t * t = lv_draw_add_task(layer, coords); lv_draw_task_t * t = lv_draw_add_task(layer, coords);
@ -214,6 +220,33 @@ void _lv_draw_image_tiled_helper(lv_draw_unit_t * draw_unit, const lv_draw_image
lv_image_decoder_close(&decoder_dsc); lv_image_decoder_close(&decoder_dsc);
} }
void _lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle,
uint16_t scale_x, uint16_t scale_y, const lv_point_t * pivot)
{
if(angle == 0 && scale_x == LV_SCALE_NONE && scale_y == LV_SCALE_NONE) {
res->x1 = 0;
res->y1 = 0;
res->x2 = w - 1;
res->y2 = h - 1;
return;
}
lv_point_t p[4] = {
{0, 0},
{w, 0},
{0, h},
{w, h},
};
lv_point_transform(&p[0], angle, scale_x, scale_y, pivot, true);
lv_point_transform(&p[1], angle, scale_x, scale_y, pivot, true);
lv_point_transform(&p[2], angle, scale_x, scale_y, pivot, true);
lv_point_transform(&p[3], angle, scale_x, scale_y, pivot, true);
res->x1 = LV_MIN4(p[0].x, p[1].x, p[2].x, p[3].x);
res->x2 = LV_MAX4(p[0].x, p[1].x, p[2].x, p[3].x) - 1;
res->y1 = LV_MIN4(p[0].y, p[1].y, p[2].y, p[3].y);
res->y2 = LV_MAX4(p[0].y, p[1].y, p[2].y, p[3].y) - 1;
}
/********************** /**********************
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/

View File

@ -15,7 +15,7 @@ extern "C" {
*********************/ *********************/
#include "lv_draw.h" #include "lv_draw.h"
#include "lv_image_decoder.h" #include "lv_image_decoder.h"
#include "lv_image_buf.h" #include "lv_draw_buf.h"
#include "../misc/lv_style.h" #include "../misc/lv_style.h"
/********************* /*********************
@ -55,9 +55,14 @@ typedef struct _lv_draw_image_dsc_t {
lv_opa_t opa; lv_opa_t opa;
lv_blend_mode_t blend_mode : 4; lv_blend_mode_t blend_mode : 4;
uint16_t antialias : 1; uint16_t antialias : 1;
uint16_t tile : 1; uint16_t tile : 1;
lv_draw_image_sup_t * sup; lv_draw_image_sup_t * sup;
/** Might be used to indicate the original size of the image if only a small portion is rendered now.
* Used when a part of a layer is rendered to show the total layer size*/
lv_area_t original_area;
const lv_image_dsc_t * bitmap_mask_src;
} lv_draw_image_dsc_t; } lv_draw_image_dsc_t;
/** /**
@ -83,6 +88,13 @@ typedef void (*lv_draw_image_core_cb)(lv_draw_unit_t * draw_unit, const lv_draw_
*/ */
void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc); void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc);
/**
* Try to get an image draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_IMAGE
*/
lv_draw_image_dsc_t * lv_draw_task_get_image_dsc(lv_draw_task_t * task);
/** /**
* Create an image draw task * Create an image draw task
* @param layer pointer to a layer * @param layer pointer to a layer
@ -131,6 +143,19 @@ void _lv_draw_image_normal_helper(lv_draw_unit_t * draw_unit, const lv_draw_imag
void _lv_draw_image_tiled_helper(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, void _lv_draw_image_tiled_helper(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc,
const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb); const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb);
/**
* Get the area of a rectangle if its rotated and scaled
* @param res store the coordinates here
* @param w width of the rectangle to transform
* @param h height of the rectangle to transform
* @param angle angle of rotation
* @param scale_x zoom in x direction, (256 no zoom)
* @param scale_y zoom in y direction, (256 no zoom)
* @param pivot x,y pivot coordinates of rotation
*/
void _lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle,
uint16_t scale_x, uint16_t scale_y, const lv_point_t * pivot);
#ifdef __cplusplus #ifdef __cplusplus
} /*extern "C"*/ } /*extern "C"*/
#endif #endif

View File

@ -61,12 +61,17 @@ void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc)
dsc->base.dsc_size = sizeof(lv_draw_label_dsc_t); dsc->base.dsc_size = sizeof(lv_draw_label_dsc_t);
} }
lv_draw_label_dsc_t * lv_draw_task_get_label_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_LABEL ? (lv_draw_label_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc) void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc)
{ {
lv_memzero(dsc, sizeof(lv_draw_glyph_dsc_t)); lv_memzero(dsc, sizeof(lv_draw_glyph_dsc_t));
} }
LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, void LV_ATTRIBUTE_FAST_MEM lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords) const lv_area_t * coords)
{ {
if(dsc->opa <= LV_OPA_MIN) return; if(dsc->opa <= LV_OPA_MIN) return;
@ -93,7 +98,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_layer_t * layer, const lv_draw_label
LV_PROFILER_END; LV_PROFILER_END;
} }
LV_ATTRIBUTE_FAST_MEM void lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, void LV_ATTRIBUTE_FAST_MEM lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc,
const lv_point_t * point, uint32_t unicode_letter) const lv_point_t * point, uint32_t unicode_letter)
{ {
if(dsc->opa <= LV_OPA_MIN) return; if(dsc->opa <= LV_OPA_MIN) return;
@ -401,7 +406,7 @@ static void draw_letter(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * dsc,
if(g.resolved_font) { if(g.resolved_font) {
lv_draw_buf_t * draw_buf = NULL; lv_draw_buf_t * draw_buf = NULL;
if(g.bpp < LV_IMGFONT_BPP) { if(LV_FONT_GLYPH_FORMAT_NONE < g.format && g.format < LV_FONT_GLYPH_FORMAT_IMAGE) {
/*Only check draw buf for bitmap glyph*/ /*Only check draw buf for bitmap glyph*/
draw_buf = lv_draw_buf_reshape(dsc->_draw_buf, 0, g.box_w, g.box_h, LV_STRIDE_AUTO); draw_buf = lv_draw_buf_reshape(dsc->_draw_buf, 0, g.box_w, g.box_h, LV_STRIDE_AUTO);
if(draw_buf == NULL) { if(draw_buf == NULL) {
@ -417,21 +422,10 @@ static void draw_letter(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * dsc,
} }
dsc->glyph_data = (void *)lv_font_get_glyph_bitmap(&g, letter, draw_buf); dsc->glyph_data = (void *)lv_font_get_glyph_bitmap(&g, letter, draw_buf);
if(dsc->glyph_data == NULL) { dsc->format = dsc->glyph_data ? g.format : LV_FONT_GLYPH_FORMAT_NONE;
dsc->format = LV_DRAW_LETTER_BITMAP_FORMAT_INVALID;
}
else if(g.bpp == LV_IMGFONT_BPP) {
dsc->format = LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE;
}
else if(g.bpp == LV_VECFONT_BPP) {
dsc->format = LV_DRAW_LETTER_VECTOR_FORMAT;
}
else {
dsc->format = LV_DRAW_LETTER_BITMAP_FORMAT_A8;
}
} }
else { else {
dsc->format = LV_DRAW_LETTER_BITMAP_FORMAT_INVALID; dsc->format = LV_FONT_GLYPH_FORMAT_NONE;
} }
dsc->letter_coords = &letter_coords; dsc->letter_coords = &letter_coords;

View File

@ -72,16 +72,9 @@ typedef struct {
lv_draw_label_hint_t * hint; lv_draw_label_hint_t * hint;
} lv_draw_label_dsc_t; } lv_draw_label_dsc_t;
typedef enum {
LV_DRAW_LETTER_BITMAP_FORMAT_INVALID,
LV_DRAW_LETTER_BITMAP_FORMAT_A8,
LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE,
LV_DRAW_LETTER_VECTOR_FORMAT,
} lv_draw_glyph_bitmap_format_t;
typedef struct { typedef struct {
void * glyph_data; /*Depends on `format` field, it could be image source or draw buf of bitmap or vector data.*/ void * glyph_data; /*Depends on `format` field, it could be image source or draw buf of bitmap or vector data.*/
lv_draw_glyph_bitmap_format_t format; lv_font_glyph_format_t format;
const lv_area_t * letter_coords; const lv_area_t * letter_coords;
const lv_area_t * bg_coords; const lv_area_t * bg_coords;
const lv_font_glyph_dsc_t * g; const lv_font_glyph_dsc_t * g;
@ -113,7 +106,14 @@ typedef void(*lv_draw_glyph_cb_t)(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_
* Initialize a label draw descriptor * Initialize a label draw descriptor
* @param dsc pointer to a draw descriptor * @param dsc pointer to a draw descriptor
*/ */
LV_ATTRIBUTE_FAST_MEM void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc); void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc);
/**
* Try to get a label draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_LABEL
*/
lv_draw_label_dsc_t * lv_draw_task_get_label_dsc(lv_draw_task_t * task);
/** /**
* Initialize a glyph draw descriptor. * Initialize a glyph draw descriptor.
@ -128,8 +128,8 @@ void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc);
* @param dsc pointer to draw descriptor * @param dsc pointer to draw descriptor
* @param coords coordinates of the character * @param coords coordinates of the character
*/ */
LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc,
const lv_area_t * coords); const lv_area_t * coords);
/** /**
* Crate a draw task to render a single character * Crate a draw task to render a single character
@ -138,8 +138,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_layer_t * layer, const lv_draw_label
* @param point position of the label * @param point position of the label
* @param unicode_letter the letter to draw * @param unicode_letter the letter to draw
*/ */
LV_ATTRIBUTE_FAST_MEM void lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc,
const lv_point_t * point, uint32_t unicode_letter); const lv_point_t * point, uint32_t unicode_letter);
/** /**
* Should be used during rendering the characters to get the position and other * Should be used during rendering the characters to get the position and other

View File

@ -35,7 +35,7 @@
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
{ {
lv_memzero(dsc, sizeof(lv_draw_line_dsc_t)); lv_memzero(dsc, sizeof(lv_draw_line_dsc_t));
dsc->width = 1; dsc->width = 1;
@ -43,7 +43,12 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc)
dsc->color = lv_color_black(); dsc->color = lv_color_black();
} }
LV_ATTRIBUTE_FAST_MEM void lv_draw_line(lv_layer_t * layer, const lv_draw_line_dsc_t * dsc) lv_draw_line_dsc_t * lv_draw_task_get_line_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_LINE ? (lv_draw_line_dsc_t *)task->draw_dsc : NULL;
}
void LV_ATTRIBUTE_FAST_MEM lv_draw_line(lv_layer_t * layer, const lv_draw_line_dsc_t * dsc)
{ {
LV_PROFILER_BEGIN; LV_PROFILER_BEGIN;
lv_area_t a; lv_area_t a;

View File

@ -51,6 +51,13 @@ typedef struct {
*/ */
void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc); void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc);
/**
* Try to get a line draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_LINE
*/
lv_draw_line_dsc_t * lv_draw_task_get_line_dsc(lv_draw_task_t * task);
/** /**
* Create a line draw task * Create a line draw task
* @param layer pointer to a layer * @param layer pointer to a layer

View File

@ -36,12 +36,17 @@
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc)
{ {
lv_memzero(dsc, sizeof(lv_draw_mask_rect_dsc_t)); lv_memzero(dsc, sizeof(lv_draw_mask_rect_dsc_t));
} }
LV_ATTRIBUTE_FAST_MEM void lv_draw_mask_rect(lv_layer_t * layer, const lv_draw_mask_rect_dsc_t * dsc) lv_draw_mask_rect_dsc_t * lv_draw_task_get_mask_rect_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_MASK_RECTANGLE ? (lv_draw_mask_rect_dsc_t *)task->draw_dsc : NULL;
}
void LV_ATTRIBUTE_FAST_MEM lv_draw_mask_rect(lv_layer_t * layer, const lv_draw_mask_rect_dsc_t * dsc)
{ {
if(!lv_color_format_has_alpha(layer->color_format)) { if(!lv_color_format_has_alpha(layer->color_format)) {
LV_LOG_WARN("Only layers with alpha channel can be masked"); LV_LOG_WARN("Only layers with alpha channel can be masked");

View File

@ -40,7 +40,14 @@ typedef struct {
* Initialize a rectangle mask draw descriptor. * Initialize a rectangle mask draw descriptor.
* @param dsc pointer to a draw descriptor * @param dsc pointer to a draw descriptor
*/ */
LV_ATTRIBUTE_FAST_MEM void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc); void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc);
/**
* Try to get a rectangle mask draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_MASK_RECTANGLE
*/
lv_draw_mask_rect_dsc_t * lv_draw_task_get_mask_rect_dsc(lv_draw_task_t * task);
/** /**
* Create a draw task to mask a rectangle from the buffer * Create a draw task to mask a rectangle from the buffer

View File

@ -36,7 +36,7 @@
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc)
{ {
lv_memzero(dsc, sizeof(lv_draw_rect_dsc_t)); lv_memzero(dsc, sizeof(lv_draw_rect_dsc_t));
dsc->bg_color = lv_color_white(); dsc->bg_color = lv_color_white();
@ -62,6 +62,11 @@ void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t * dsc)
dsc->base.dsc_size = sizeof(lv_draw_fill_dsc_t); dsc->base.dsc_size = sizeof(lv_draw_fill_dsc_t);
} }
lv_draw_fill_dsc_t * lv_draw_task_get_fill_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_FILL ? (lv_draw_fill_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc) void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc)
{ {
lv_memzero(dsc, sizeof(*dsc)); lv_memzero(dsc, sizeof(*dsc));
@ -70,6 +75,11 @@ void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc)
dsc->base.dsc_size = sizeof(lv_draw_border_dsc_t); dsc->base.dsc_size = sizeof(lv_draw_border_dsc_t);
} }
lv_draw_border_dsc_t * lv_draw_task_get_border_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_BORDER ? (lv_draw_border_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc) void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc)
{ {
lv_memzero(dsc, sizeof(*dsc)); lv_memzero(dsc, sizeof(*dsc));
@ -77,6 +87,11 @@ void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc)
dsc->base.dsc_size = sizeof(lv_draw_box_shadow_dsc_t); dsc->base.dsc_size = sizeof(lv_draw_box_shadow_dsc_t);
} }
lv_draw_box_shadow_dsc_t * lv_draw_task_get_box_shadow_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_BOX_SHADOW ? (lv_draw_box_shadow_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords) void lv_draw_rect(lv_layer_t * layer, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords)
{ {

View File

@ -113,7 +113,7 @@ typedef struct {
* Initialize a rectangle draw descriptor. * Initialize a rectangle draw descriptor.
* @param dsc pointer to a draw descriptor * @param dsc pointer to a draw descriptor
*/ */
LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc); void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc);
/** /**
* Initialize a fill draw descriptor. * Initialize a fill draw descriptor.
@ -121,18 +121,39 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t * dsc);
*/ */
void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t * dsc); void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t * dsc);
/**
* Try to get a fill draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_FILL
*/
lv_draw_fill_dsc_t * lv_draw_task_get_fill_dsc(lv_draw_task_t * task);
/** /**
* Initialize a border draw descriptor. * Initialize a border draw descriptor.
* @param dsc pointer to a draw descriptor * @param dsc pointer to a draw descriptor
*/ */
void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc); void lv_draw_border_dsc_init(lv_draw_border_dsc_t * dsc);
/**
* Try to get a border draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_BORDER
*/
lv_draw_border_dsc_t * lv_draw_task_get_border_dsc(lv_draw_task_t * task);
/** /**
* Initialize a box shadow draw descriptor. * Initialize a box shadow draw descriptor.
* @param dsc pointer to a draw descriptor * @param dsc pointer to a draw descriptor
*/ */
void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc); void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t * dsc);
/**
* Try to get a box shadow draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_BOX_SHADOW
*/
lv_draw_box_shadow_dsc_t * lv_draw_task_get_box_shadow_dsc(lv_draw_task_t * task);
/** /**
* The rectangle is a wrapper for fill, border, bg. image and box shadow. * The rectangle is a wrapper for fill, border, bg. image and box shadow.
* Internally fill, border, image and box shadow draw tasks will be created. * Internally fill, border, image and box shadow draw tasks will be created.

View File

@ -49,6 +49,11 @@ void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t * dsc)
LV_PROFILER_END; LV_PROFILER_END;
} }
lv_draw_triangle_dsc_t * lv_draw_task_get_triangle_dsc(lv_draw_task_t * task)
{
return task->type == LV_DRAW_TASK_TYPE_TRIANGLE ? (lv_draw_triangle_dsc_t *)task->draw_dsc : NULL;
}
void lv_draw_triangle(lv_layer_t * layer, const lv_draw_triangle_dsc_t * dsc) void lv_draw_triangle(lv_layer_t * layer, const lv_draw_triangle_dsc_t * dsc)
{ {
LV_PROFILER_BEGIN; LV_PROFILER_BEGIN;

View File

@ -42,6 +42,13 @@ typedef struct {
*/ */
void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t * draw_dsc); void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t * draw_dsc);
/**
* Try to get a triangle draw descriptor from a draw task.
* @param task draw task
* @return the task's draw descriptor or NULL if the task is not of type LV_DRAW_TASK_TYPE_TRIANGLE
*/
lv_draw_triangle_dsc_t * lv_draw_task_get_triangle_dsc(lv_draw_task_t * task);
/** /**
* Create a triangle draw task * Create a triangle draw task
* @param layer pointer to a layer * @param layer pointer to a layer

View File

@ -14,6 +14,16 @@
#include "../stdlib/lv_string.h" #include "../stdlib/lv_string.h"
#include <stdbool.h> #include <stdbool.h>
#include <math.h> #include <math.h>
#include <float.h>
#define MATH_PI 3.14159265358979323846f
#define MATH_HALF_PI 1.57079632679489661923f
#define DEG_TO_RAD 0.017453292519943295769236907684886f
#define RAD_TO_DEG 57.295779513082320876798154814105f
#define MATH_RADIANS(deg) ((deg) * DEG_TO_RAD)
#define MATH_DEGRESS(rad) ((rad) * RAD_TO_DEG)
/********************* /*********************
* DEFINES * DEFINES
@ -195,6 +205,24 @@ void lv_matrix_multiply(lv_matrix_t * matrix, const lv_matrix_t * m)
_multiply_matrix(matrix, m); _multiply_matrix(matrix, m);
} }
void lv_matrix_transform_point(const lv_matrix_t * matrix, lv_fpoint_t * point)
{
float x = point->x;
float y = point->y;
point->x = x * matrix->m[0][0] + y * matrix->m[1][0] + matrix->m[0][2];
point->y = x * matrix->m[0][1] + y * matrix->m[1][1] + matrix->m[1][2];
}
void lv_matrix_transform_path(const lv_matrix_t * matrix, lv_vector_path_t * path)
{
lv_fpoint_t * pt = lv_array_front(&path->points);
uint32_t size = lv_array_size(&path->points);
for(uint32_t i = 0; i < size; i++) {
lv_matrix_transform_point(matrix, &pt[i]);
}
}
/* path functions */ /* path functions */
lv_vector_path_t * lv_vector_path_create(lv_vector_path_quality_t quality) lv_vector_path_t * lv_vector_path_create(lv_vector_path_quality_t quality)
{ {
@ -295,6 +323,36 @@ void lv_vector_path_close(lv_vector_path_t * path)
lv_array_push_back(&path->ops, &op); lv_array_push_back(&path->ops, &op);
} }
void lv_vector_path_get_bounding(const lv_vector_path_t * path, lv_area_t * area)
{
LV_ASSERT_NULL(path);
LV_ASSERT_NULL(area);
uint32_t len = lv_array_size(&path->points);
if(len == 0) {
lv_memzero(area, sizeof(lv_area_t));
return;
}
lv_fpoint_t * p = lv_array_front(&path->points);
float x1 = p[0].x;
float x2 = p[0].x;
float y1 = p[0].y;
float y2 = p[0].y;
for(uint32_t i = 1; i < len; i++) {
if(p[i].x < x1) x1 = p[i].x;
if(p[i].y < y1) y1 = p[i].y;
if(p[i].x > x2) x2 = p[i].x;
if(p[i].y > y2) y2 = p[i].y;
}
area->x1 = (int32_t)x1;
area->y1 = (int32_t)y1;
area->x2 = (int32_t)x2;
area->y2 = (int32_t)y2;
}
void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry) void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect, float rx, float ry)
{ {
float x = rect->x1; float x = rect->x1;
@ -430,6 +488,87 @@ void lv_vector_path_append_circle(lv_vector_path_t * path, const lv_fpoint_t * c
lv_vector_path_close(path); lv_vector_path_close(path);
} }
/**
* Add a arc to the path
* @param path pointer to a path
* @param c pointer to a `lv_fpoint_t` variable for center of the circle
* @param radius the radius for arc
* @param start_angle the start angle for arc
* @param sweep the sweep angle for arc, could be negative
* @param pie true: draw a pie, false: draw a arc
*/
void lv_vector_path_append_arc(lv_vector_path_t * path, const lv_fpoint_t * c, float radius, float start_angle,
float sweep, bool pie)
{
float cx = c->x;
float cy = c->y;
/* just circle */
if(sweep >= 360.0f || sweep <= -360.0f) {
lv_vector_path_append_circle(path, c, radius, radius);
return;
}
start_angle = MATH_RADIANS(start_angle);
sweep = MATH_RADIANS(sweep);
int n_curves = (int)ceil(fabsf(sweep / MATH_HALF_PI));
float sweep_sign = sweep < 0 ? -1.f : 1.f;
float fract = fmodf(sweep, MATH_HALF_PI);
fract = (fabsf(fract) < FLT_EPSILON) ? MATH_HALF_PI * sweep_sign : fract;
/* Start from here */
lv_fpoint_t start = {
.x = radius * cosf(start_angle),
.y = radius * sinf(start_angle),
};
if(pie) {
lv_vector_path_move_to(path, &(lv_fpoint_t) {
cx, cy
});
lv_vector_path_line_to(path, &(lv_fpoint_t) {
start.x + cx, start.y + cy
});
}
for(int i = 0; i < n_curves; ++i) {
float end_angle = start_angle + ((i != n_curves - 1) ? MATH_HALF_PI * sweep_sign : fract);
float end_x = radius * cosf(end_angle);
float end_y = radius * sinf(end_angle);
/* variables needed to calculate bezier control points */
/** get bezier control points using article:
* (http://itc.ktu.lt/index.php/ITC/article/view/11812/6479)
*/
float ax = start.x;
float ay = start.y;
float bx = end_x;
float by = end_y;
float q1 = ax * ax + ay * ay;
float q2 = ax * bx + ay * by + q1;
float k2 = (4.0f / 3.0f) * ((sqrtf(2 * q1 * q2) - q2) / (ax * by - ay * bx));
/* Next start point is the current end point */
start.x = end_x;
start.y = end_y;
end_x += cx;
end_y += cy;
lv_fpoint_t ctrl1 = {ax - k2 * ay + cx, ay + k2 * ax + cy};
lv_fpoint_t ctrl2 = {bx + k2 * by + cx, by - k2 * bx + cy};
lv_fpoint_t end = {end_x, end_y};
lv_vector_path_cubic_to(path, &ctrl1, &ctrl2, &end);
start_angle = end_angle;
}
if(pie) {
lv_vector_path_close(path);
}
}
void lv_vector_path_append_path(lv_vector_path_t * path, const lv_vector_path_t * subpath) void lv_vector_path_append_path(lv_vector_path_t * path, const lv_vector_path_t * subpath)
{ {
uint32_t ops_size = lv_array_size(&path->ops); uint32_t ops_size = lv_array_size(&path->ops);
@ -682,6 +821,7 @@ void lv_vector_clear_area(lv_vector_dsc_t * dsc, const lv_area_t * rect)
lv_memset(new_task, 0, sizeof(_lv_vector_draw_task)); lv_memset(new_task, 0, sizeof(_lv_vector_draw_task));
new_task->dsc.fill_dsc.color = dsc->current_dsc.fill_dsc.color; new_task->dsc.fill_dsc.color = dsc->current_dsc.fill_dsc.color;
new_task->dsc.fill_dsc.opa = dsc->current_dsc.fill_dsc.opa;
lv_area_copy(&(new_task->dsc.scissor_area), rect); lv_area_copy(&(new_task->dsc.scissor_area), rect);
} }

View File

@ -205,6 +205,20 @@ void lv_matrix_skew(lv_matrix_t * matrix, float skew_x, float skew_y);
*/ */
void lv_matrix_multiply(lv_matrix_t * matrix, const lv_matrix_t * matrix2); void lv_matrix_multiply(lv_matrix_t * matrix, const lv_matrix_t * matrix2);
/**
* Transform the coordinates of a point using given matrix
* @param matrix pointer to a matrix
* @param point pointer to a point
*/
void lv_matrix_transform_point(const lv_matrix_t * matrix, lv_fpoint_t * point);
/**
* Transform all the coordinates of a path using given matrix
* @param matrix pointer to a matrix
* @param path pointer to a path
*/
void lv_matrix_transform_path(const lv_matrix_t * matrix, lv_vector_path_t * path);
/** /**
* Create a vector graphic path object * Create a vector graphic path object
* @param quality the quality hint of path * @param quality the quality hint of path
@ -269,6 +283,13 @@ void lv_vector_path_cubic_to(lv_vector_path_t * path, const lv_fpoint_t * p1, co
*/ */
void lv_vector_path_close(lv_vector_path_t * path); void lv_vector_path_close(lv_vector_path_t * path);
/**
* Get the bounding box of a path
* @param path pointer to a path
* @param area pointer to a `lv_area_t` variable for bounding box
*/
void lv_vector_path_get_bounding(const lv_vector_path_t * path, lv_area_t * area);
/** /**
* Add a rectangle to the path * Add a rectangle to the path
* @param path pointer to a path * @param path pointer to a path
@ -287,6 +308,18 @@ void lv_vector_path_append_rect(lv_vector_path_t * path, const lv_area_t * rect,
*/ */
void lv_vector_path_append_circle(lv_vector_path_t * path, const lv_fpoint_t * c, float rx, float ry); void lv_vector_path_append_circle(lv_vector_path_t * path, const lv_fpoint_t * c, float rx, float ry);
/**
* Add a arc to the path
* @param path pointer to a path
* @param c pointer to a `lv_fpoint_t` variable for center of the circle
* @param radius the radius for arc
* @param start_angle the start angle for arc
* @param sweep the sweep angle for arc, could be negative
* @param pie true: draw a pie, false: draw a arc
*/
void lv_vector_path_append_arc(lv_vector_path_t * path, const lv_fpoint_t * c, float radius, float start_angle,
float sweep, bool pie);
/** /**
* Add an sub path to the path * Add an sub path to the path
* @param path pointer to a path * @param path pointer to a path

View File

@ -1,92 +0,0 @@
/**
* @file lv_image_buf.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stddef.h>
#include <string.h>
#include "lv_image_buf.h"
#include "lv_draw_image.h"
#include "../misc/lv_math.h"
#include "../misc/lv_log.h"
#include "../stdlib/lv_mem.h"
#include "../stdlib/lv_string.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c)
{
if(dsc->header.cf < LV_COLOR_FORMAT_I1 || dsc->header.cf > LV_COLOR_FORMAT_I8) {
LV_LOG_WARN("Not indexed color format");
return;
}
uint8_t * buf = (uint8_t *)dsc->data;
lv_memcpy(&buf[id * sizeof(c)], &c, sizeof(c));
}
void lv_image_buf_free(lv_image_dsc_t * dsc)
{
if(dsc != NULL) {
if(dsc->data != NULL)
lv_free((void *)dsc->data);
lv_free(dsc);
}
}
void _lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x,
uint16_t scale_y,
const lv_point_t * pivot)
{
if(angle == 0 && scale_x == LV_SCALE_NONE && scale_y == LV_SCALE_NONE) {
res->x1 = 0;
res->y1 = 0;
res->x2 = w - 1;
res->y2 = h - 1;
return;
}
lv_point_t p[4] = {
{0, 0},
{w, 0},
{0, h},
{w, h},
};
lv_point_transform(&p[0], angle, scale_x, scale_y, pivot, true);
lv_point_transform(&p[1], angle, scale_x, scale_y, pivot, true);
lv_point_transform(&p[2], angle, scale_x, scale_y, pivot, true);
lv_point_transform(&p[3], angle, scale_x, scale_y, pivot, true);
res->x1 = LV_MIN4(p[0].x, p[1].x, p[2].x, p[3].x);
res->x2 = LV_MAX4(p[0].x, p[1].x, p[2].x, p[3].x) - 1;
res->y1 = LV_MIN4(p[0].y, p[1].y, p[2].y, p[3].y);
res->y2 = LV_MAX4(p[0].y, p[1].y, p[2].y, p[3].y) - 1;
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@ -123,19 +123,19 @@ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src
#if LV_CACHE_DEF_SIZE > 0 #if LV_CACHE_DEF_SIZE > 0
dsc->cache = img_cache_p; dsc->cache = img_cache_p;
/* /*Try cache first, unless we are told to ignore cache.*/
* Check the cache first if(!(args && args->no_cache)) {
* If the image is found in the cache, just return it.*/ /*
if(try_cache(dsc) == LV_RESULT_OK) return LV_RESULT_OK; * Check the cache first
* If the image is found in the cache, just return it.*/
if(try_cache(dsc) == LV_RESULT_OK) return LV_RESULT_OK;
}
#endif #endif
/*Find the decoder that can open the image source, and get the header info in the same time.*/ /*Find the decoder that can open the image source, and get the header info in the same time.*/
dsc->decoder = image_decoder_get_info(src, &dsc->header); dsc->decoder = image_decoder_get_info(src, &dsc->header);
if(dsc->decoder == NULL) return LV_RESULT_INVALID; if(dsc->decoder == NULL) return LV_RESULT_INVALID;
/*Duplicate the source if it's a file*/
if(dsc->src_type == LV_IMAGE_SRC_FILE) dsc->src = lv_strdup(dsc->src);
/*Make a copy of args*/ /*Make a copy of args*/
dsc->args = args ? *args : (lv_image_decoder_args_t) { dsc->args = args ? *args : (lv_image_decoder_args_t) {
.stride_align = LV_DRAW_BUF_STRIDE_ALIGN != 1, .stride_align = LV_DRAW_BUF_STRIDE_ALIGN != 1,
@ -167,11 +167,6 @@ void lv_image_decoder_close(lv_image_decoder_dsc_t * dsc)
{ {
if(dsc->decoder) { if(dsc->decoder) {
if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc); if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc);
if(dsc->src_type == LV_IMAGE_SRC_FILE) {
lv_free((void *)dsc->src);
dsc->src = NULL;
}
} }
} }
@ -264,13 +259,17 @@ lv_draw_buf_t * lv_image_decoder_post_process(lv_image_decoder_dsc_t * dsc, lv_d
uint32_t stride_expect = lv_draw_buf_width_to_stride(decoded->header.w, decoded->header.cf); uint32_t stride_expect = lv_draw_buf_width_to_stride(decoded->header.w, decoded->header.cf);
if(decoded->header.stride != stride_expect) { if(decoded->header.stride != stride_expect) {
LV_LOG_TRACE("Stride mismatch"); LV_LOG_TRACE("Stride mismatch");
lv_draw_buf_t * aligned = lv_draw_buf_adjust_stride(decoded, stride_expect); lv_result_t res = lv_draw_buf_adjust_stride(decoded, stride_expect);
if(aligned == NULL) { if(res != LV_RESULT_OK) {
LV_LOG_ERROR("No memory for Stride adjust."); lv_draw_buf_t * aligned = lv_draw_buf_create(decoded->header.w, decoded->header.h, decoded->header.cf, stride_expect);
return NULL; if(aligned == NULL) {
} LV_LOG_ERROR("No memory for Stride adjust.");
return NULL;
}
decoded = aligned; lv_draw_buf_copy(aligned, NULL, decoded, NULL);
decoded = aligned;
}
} }
} }
@ -318,18 +317,20 @@ static lv_image_decoder_t * image_decoder_get_info(const void * src, lv_image_he
lv_image_decoder_t * decoder; lv_image_decoder_t * decoder;
#if LV_IMAGE_HEADER_CACHE_DEF_CNT > 0 #if LV_IMAGE_HEADER_CACHE_DEF_CNT > 0
lv_image_header_cache_data_t search_key; if(src_type == LV_IMAGE_SRC_FILE) {
search_key.src_type = src_type; lv_image_header_cache_data_t search_key;
search_key.src = src; search_key.src_type = src_type;
search_key.src = src;
lv_cache_entry_t * entry = lv_cache_acquire(img_header_cache_p, &search_key, NULL); lv_cache_entry_t * entry = lv_cache_acquire(img_header_cache_p, &search_key, NULL);
if(entry) { if(entry) {
lv_image_header_cache_data_t * cached_data = lv_cache_entry_get_data(entry); lv_image_header_cache_data_t * cached_data = lv_cache_entry_get_data(entry);
*header = cached_data->header; *header = cached_data->header;
decoder = cached_data->decoder; decoder = cached_data->decoder;
lv_cache_release(img_header_cache_p, entry, NULL); lv_cache_release(img_header_cache_p, entry, NULL);
return decoder; return decoder;
}
} }
#endif #endif
@ -338,15 +339,21 @@ static lv_image_decoder_t * image_decoder_get_info(const void * src, lv_image_he
if(decoder->info_cb && decoder->open_cb) { if(decoder->info_cb && decoder->open_cb) {
lv_result_t res = decoder->info_cb(decoder, src, header); lv_result_t res = decoder->info_cb(decoder, src, header);
if(res == LV_RESULT_OK) { if(res == LV_RESULT_OK) {
if(header->stride == 0) header->stride = img_width_to_stride(header); if(header->stride == 0) {
LV_LOG_INFO("Image decoder didn't set stride. Calculate it from width.");
header->stride = img_width_to_stride(header);
}
break; break;
} }
} }
} }
#if LV_IMAGE_HEADER_CACHE_DEF_CNT > 0 #if LV_IMAGE_HEADER_CACHE_DEF_CNT > 0
if(decoder) { if(src_type == LV_IMAGE_SRC_FILE && decoder) {
if(src_type == LV_IMAGE_SRC_FILE) search_key.src = lv_strdup(src); lv_cache_entry_t * entry;
lv_image_header_cache_data_t search_key;
search_key.src_type = src_type;
search_key.src = lv_strdup(src);
search_key.decoder = decoder; search_key.decoder = decoder;
search_key.header = *header; search_key.header = *header;
entry = lv_cache_add(img_header_cache_p, &search_key, NULL); entry = lv_cache_add(img_header_cache_p, &search_key, NULL);
@ -421,12 +428,23 @@ static lv_cache_compare_res_t image_decoder_cache_compare_cb(
static void image_decoder_cache_free_cb(lv_image_cache_data_t * entry, void * user_data) static void image_decoder_cache_free_cb(lv_image_cache_data_t * entry, void * user_data)
{ {
LV_UNUSED(user_data); /*Unused*/
const lv_image_decoder_t * decoder = entry->decoder; const lv_image_decoder_t * decoder = entry->decoder;
if(decoder && decoder->cache_free_cb) { if(decoder == NULL) return; /* Why ? */
if(decoder->cache_free_cb) {
/* Decoder wants to free the cache by itself. */
decoder->cache_free_cb(entry, user_data); decoder->cache_free_cb(entry, user_data);
} }
else {
/* Destroy the decoded draw buffer if necessary. */
lv_draw_buf_t * decoded = (lv_draw_buf_t *)entry->decoded;
if(lv_draw_buf_has_flag(decoded, LV_IMAGE_FLAGS_ALLOCATED)) {
lv_draw_buf_destroy(decoded);
}
/*Free the duplicated file name*/
if(entry->src_type == LV_IMAGE_SRC_FILE) lv_free((void *)entry->src);
}
} }
static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc) static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc)
@ -442,6 +460,7 @@ static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc)
if(entry) { if(entry) {
lv_image_cache_data_t * cached_data = lv_cache_entry_get_data(entry); lv_image_cache_data_t * cached_data = lv_cache_entry_get_data(entry);
dsc->decoded = cached_data->decoded; dsc->decoded = cached_data->decoded;
dsc->decoder = (lv_image_decoder_t *)cached_data->decoder;
dsc->cache_entry = entry; /*Save the cache to release it in decoder_close*/ dsc->cache_entry = entry; /*Save the cache to release it in decoder_close*/
return LV_RESULT_OK; return LV_RESULT_OK;
} }

View File

@ -61,7 +61,7 @@ typedef struct _lv_image_decoder_dsc_t lv_image_decoder_dsc_t;
typedef struct _lv_image_decoder_args_t { typedef struct _lv_image_decoder_args_t {
bool stride_align; /*Whether stride should be aligned*/ bool stride_align; /*Whether stride should be aligned*/
bool premultiply; /*Whether image should be premultiplied or not after decoding*/ bool premultiply; /*Whether image should be premultiplied or not after decoding*/
bool no_cache; /*Whether this image should be kept out of cache*/ bool no_cache; /*When set, decoded image won't be put to cache, and decoder open will also ignore cache.*/
bool use_indexed; /*Decoded indexed image as is. Convert to ARGB8888 if false.*/ bool use_indexed; /*Decoded indexed image as is. Convert to ARGB8888 if false.*/
} lv_image_decoder_args_t; } lv_image_decoder_args_t;
@ -278,6 +278,15 @@ void lv_image_decoder_set_get_area_cb(lv_image_decoder_t * decoder, lv_image_dec
*/ */
void lv_image_decoder_set_close_cb(lv_image_decoder_t * decoder, lv_image_decoder_close_f_t close_cb); void lv_image_decoder_set_close_cb(lv_image_decoder_t * decoder, lv_image_decoder_close_f_t close_cb);
/**
* Set a custom method to free cache data.
* Normally this is not needed. If the custom decoder allocates additional memory other than dsc->decoded
* draw buffer, then you need to register your own method to free it. By default the cache entry is free'ed
* in `image_decoder_cache_free_cb`.
*
* @param decoder pointer to the image decoder
* @param cache_free_cb the custom callback to free cache data. Refer to `image_decoder_cache_free_cb`.
*/
void lv_image_decoder_set_cache_free_cb(lv_image_decoder_t * decoder, lv_cache_free_cb_t cache_free_cb); void lv_image_decoder_set_cache_free_cb(lv_image_decoder_t * decoder, lv_cache_free_cb_t cache_free_cb);
#if LV_CACHE_DEF_SIZE > 0 #if LV_CACHE_DEF_SIZE > 0

View File

@ -1,5 +1,5 @@
/** /**
* @file lv_image_buf.h * @file lv_image_dsc.h
* *
*/ */
@ -13,21 +13,17 @@ extern "C" {
/********************* /*********************
* INCLUDES * INCLUDES
*********************/ *********************/
#include <stdbool.h> #include "../lv_conf_internal.h"
#include "../misc/lv_color.h"
#include "../misc/lv_area.h"
#include "../stdlib/lv_string.h"
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define _LV_ZOOM_INV_UPSCALE 5
/** Magic number for lvgl image, 9 means lvgl version 9 /** Magic number for lvgl image, 9 means lvgl version 9
* It must not be a valid ASCII character nor larger than 0x80. See `lv_image_src_get_type`. * It must not be a valid ASCII character nor larger than 0x80. See `lv_image_src_get_type`.
*/ */
#define LV_IMAGE_HEADER_MAGIC (0x19) #define LV_IMAGE_HEADER_MAGIC (0x19)
LV_EXPORT_CONST_INT(LV_IMAGE_HEADER_MAGIC);
/********************** /**********************
* TYPEDEFS * TYPEDEFS
@ -38,43 +34,38 @@ typedef enum _lv_image_flags_t {
* For RGB map of the image data, mark if it's pre-multiplied with alpha. * For RGB map of the image data, mark if it's pre-multiplied with alpha.
* For indexed image, this bit indicated palette data is pre-multiplied with alpha. * For indexed image, this bit indicated palette data is pre-multiplied with alpha.
*/ */
LV_IMAGE_FLAGS_PREMULTIPLIED = (1 << 0), LV_IMAGE_FLAGS_PREMULTIPLIED = 0x0001,
/**
* If the image data is malloced and can be processed in place.
* In image decoder post processing, this flag means we modify it in-place.
*/
LV_IMAGE_FLAGS_MODIFIABLE = (1 << 1),
/**
* Indicating it's a vector image instead of default raster image.
* Some of the flags are not usable for vector image, like PREMULTIPLIED.
*/
LV_IMAGE_FLAGS_VECTORS = (1 << 2),
/** /**
* The image data is compressed, so decoder needs to decode image firstly. * The image data is compressed, so decoder needs to decode image firstly.
* If this flag is set, the whole image will be decompressed upon decode, and * If this flag is set, the whole image will be decompressed upon decode, and
* `get_area_cb` won't be necessary. * `get_area_cb` won't be necessary.
*/ */
LV_IMAGE_FLAGS_COMPRESSED = (1 << 3), LV_IMAGE_FLAGS_COMPRESSED = 0x0008,
/*Below flags are applicable only for draw buffer header.*/
/** /**
* The image is allocated from heap, thus should be freed after use. * The image is allocated from heap, thus should be freed after use.
*/ */
LV_IMAGE_FLAGS_ALLOCATED = (1 << 4), LV_IMAGE_FLAGS_ALLOCATED = 0x0010,
/**
* If the image data is malloced and can be processed in place.
* In image decoder post processing, this flag means we modify it in-place.
*/
LV_IMAGE_FLAGS_MODIFIABLE = 0x0020,
/** /**
* Flags reserved for user, lvgl won't use these bits. * Flags reserved for user, lvgl won't use these bits.
*/ */
LV_IMAGE_FLAGS_USER1 = 0x1000, LV_IMAGE_FLAGS_USER1 = 0x0100,
LV_IMAGE_FLAGS_USER2 = 0x2000, LV_IMAGE_FLAGS_USER2 = 0x0200,
LV_IMAGE_FLAGS_USER3 = 0x4000, LV_IMAGE_FLAGS_USER3 = 0x0400,
LV_IMAGE_FLAGS_USER4 = 0x8000, LV_IMAGE_FLAGS_USER4 = 0x0800,
LV_IMAGE_FLAGS_USER5 = 0x0100, LV_IMAGE_FLAGS_USER5 = 0x1000,
LV_IMAGE_FLAGS_USER6 = 0x0200, LV_IMAGE_FLAGS_USER6 = 0x2000,
LV_IMAGE_FLAGS_USER7 = 0x0400, LV_IMAGE_FLAGS_USER7 = 0x4000,
LV_IMAGE_FLAGS_USER8 = 0x0800, LV_IMAGE_FLAGS_USER8 = 0x8000,
} lv_image_flags_t; } lv_image_flags_t;
typedef enum { typedef enum {
@ -125,65 +116,20 @@ typedef union {
} lv_yuv_buf_t; } lv_yuv_buf_t;
/** /**
* Struct to describe an image. Both decoded and raw image can share * Struct to describe a constant image resource.
* the same struct. * It's similar to lv_draw_buf_t, but the data is constant.
*
* Image is also identical to lv_draw_buf_t for now.
* Ideally, decoded image should be lv_draw_buf_t.
*/ */
typedef struct { typedef struct {
lv_image_header_t header; /**< A header describing the basics of the image*/ lv_image_header_t header; /**< A header describing the basics of the image*/
uint32_t data_size; /**< Size of the image in bytes*/ uint32_t data_size; /**< Size of the image in bytes*/
const uint8_t * data; /**< Pointer to the data of the image*/ const uint8_t * data; /**< Pointer to the data of the image*/
const void * reserved; /**< A reserved field to make it has same size as lv_draw_buf_t*/
} lv_image_dsc_t; } lv_image_dsc_t;
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
/**
* Set the palette color of an indexed image. Valid only for `LV_COLOR_FORMAT_I1/2/4/8`
* @param dsc pointer to an image descriptor
* @param id the palette color to set:
* - for `LV_COLOR_FORMAT_I1`: 0..1
* - for `LV_COLOR_FORMAT_I2`: 0..3
* - for `LV_COLOR_FORMAT_I4`: 0..15
* - for `LV_COLOR_FORMAT_I8`: 0..255
* @param c the color to set in lv_color32_t format
*/
void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c);
/**
* Free an allocated image buffer
* @param dsc image buffer to free
*/
void lv_image_buf_free(lv_image_dsc_t * dsc);
/**
* Get the area of a rectangle if its rotated and scaled
* @param res store the coordinates here
* @param w width of the rectangle to transform
* @param h height of the rectangle to transform
* @param angle angle of rotation
* @param scale_x zoom in x direction, (256 no zoom)
* @param scale_y zoom in y direction, (256 no zoom)
* @param pivot x,y pivot coordinates of rotation
*/
void _lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x,
uint16_t scale_y,
const lv_point_t * pivot);
static inline void lv_image_header_init(lv_image_header_t * header, uint32_t w, uint32_t h, lv_color_format_t cf,
uint32_t stride, lv_image_flags_t flags)
{
LV_ASSERT(header);
lv_memzero(header, sizeof(*header));
header->w = w;
header->h = h;
header->cf = cf;
header->stride = stride;
header->flags = flags;
}
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/

View File

@ -33,7 +33,7 @@
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
static void _invalidate_cache(void * buf, uint32_t stride, lv_color_format_t cf, const lv_area_t * area); static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
/********************** /**********************
* STATIC VARIABLES * STATIC VARIABLES
@ -58,17 +58,21 @@ void lv_draw_buf_pxp_init_handlers(void)
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/
static void _invalidate_cache(void * buf, uint32_t stride, lv_color_format_t cf, const lv_area_t * area) static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area)
{ {
const lv_image_header_t * header = &draw_buf->header;
uint32_t stride = header->stride;
lv_color_format_t cf = header->cf;
if(area->y1 == 0) { if(area->y1 == 0) {
uint16_t size = stride * lv_area_get_height(area); uint16_t size = stride * lv_area_get_height(area);
/* Invalidate full buffer. */ /* Invalidate full buffer. */
DEMO_CleanInvalidateCacheByAddr((void *)buf, size); DCACHE_CleanInvalidateByRange((uint32_t)draw_buf->data, size);
return; return;
} }
const uint8_t * buf_u8 = buf; const uint8_t * buf_u8 = draw_buf->data;
/* ARM require a 32 byte aligned address. */ /* ARM require a 32 byte aligned address. */
uint8_t align_bytes = 32; uint8_t align_bytes = 32;
uint8_t bits_per_pixel = lv_color_format_get_bpp(cf); uint8_t bits_per_pixel = lv_color_format_get_bpp(cf);
@ -99,7 +103,7 @@ static void _invalidate_cache(void * buf, uint32_t stride, lv_color_format_t cf,
for(uint16_t y = 0; y < area_height; y++) { for(uint16_t y = 0; y < area_height; y++) {
const void * line_addr = buf_u8 + y * stride; const void * line_addr = buf_u8 + y * stride;
DEMO_CleanInvalidateCacheByAddr((void *)line_addr, line_size); DCACHE_CleanInvalidateByRange((uint32_t)line_addr, line_size);
} }
} }

View File

@ -380,7 +380,7 @@ static void _pxp_execute_drawing(lv_draw_pxp_unit_t * u)
lv_area_move(&draw_area, -layer->buf_area.x1, -layer->buf_area.y1); lv_area_move(&draw_area, -layer->buf_area.x1, -layer->buf_area.y1);
/* Invalidate only the drawing area */ /* Invalidate only the drawing area */
lv_draw_buf_invalidate_cache(draw_buf->data, draw_buf->header.stride, draw_buf->header.cf, &draw_area); lv_draw_buf_invalidate_cache(draw_buf, &draw_area);
switch(t->type) { switch(t->type) {
case LV_DRAW_TASK_TYPE_FILL: case LV_DRAW_TASK_TYPE_FILL:

View File

@ -68,7 +68,7 @@ void lv_draw_pxp_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * d
.x2 = draw_buf->header.w - 1, .x2 = draw_buf->header.w - 1,
.y2 = draw_buf->header.h - 1 .y2 = draw_buf->header.h - 1
}; };
lv_draw_buf_invalidate_cache(draw_buf->data, draw_buf->header.stride, draw_buf->header.cf, &area_to_draw); lv_draw_buf_invalidate_cache(draw_buf, &area_to_draw);
lv_draw_image_dsc_t new_draw_dsc = *draw_dsc; lv_draw_image_dsc_t new_draw_dsc = *draw_dsc;
new_draw_dsc.src = draw_buf; new_draw_dsc.src = draw_buf;

View File

@ -37,7 +37,7 @@ static void * _buf_malloc(size_t size_bytes, lv_color_format_t cf);
static void * _buf_align(void * buf, lv_color_format_t cf); static void * _buf_align(void * buf, lv_color_format_t cf);
static void _invalidate_cache(void * buf, uint32_t stride, lv_color_format_t cf, const lv_area_t * area); static void _invalidate_cache(const void * buf, uint32_t stride, lv_color_format_t cf, const lv_area_t * area);
static uint32_t _width_to_stride(uint32_t w, lv_color_format_t cf); static uint32_t _width_to_stride(uint32_t w, lv_color_format_t cf);
@ -90,8 +90,12 @@ static void * _buf_align(void * buf, lv_color_format_t cf)
return buf_u8; return buf_u8;
} }
static void _invalidate_cache(void * buf, uint32_t stride, lv_color_format_t cf, const lv_area_t * area) static void _invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area)
{ {
const lv_image_header_t * header = &draw_buf->header;
uint32_t stride = header->stride;
lv_color_format_t cf = header->cf;
if(area->y1 == 0) { if(area->y1 == 0) {
uint16_t size = stride * lv_area_get_height(area); uint16_t size = stride * lv_area_get_height(area);

View File

@ -228,7 +228,15 @@ static int32_t _vglite_evaluate(lv_draw_unit_t * u, lv_draw_task_t * t)
const lv_draw_image_dsc_t * draw_dsc = (lv_draw_image_dsc_t *) t->draw_dsc; const lv_draw_image_dsc_t * draw_dsc = (lv_draw_image_dsc_t *) t->draw_dsc;
lv_layer_t * layer_to_draw = (lv_layer_t *)draw_dsc->src; lv_layer_t * layer_to_draw = (lv_layer_t *)draw_dsc->src;
if(!_vglite_src_cf_supported(layer_to_draw->color_format)) #if LV_USE_VGLITE_BLIT_SPLIT
bool has_transform = (draw_dsc->rotation != 0 || draw_dsc->scale_x != LV_SCALE_NONE ||
draw_dsc->scale_y != LV_SCALE_NONE);
#endif
if(!_vglite_src_cf_supported(layer_to_draw->color_format)
#if LV_USE_VGLITE_BLIT_SPLIT
|| has_transform
#endif
)
return 0; return 0;
if(t->preference_score > 80) { if(t->preference_score > 80) {
@ -352,10 +360,13 @@ static void _vglite_execute_drawing(lv_draw_vglite_unit_t * u)
return; /*Fully clipped, nothing to do*/ return; /*Fully clipped, nothing to do*/
/* Invalidate the drawing area */ /* Invalidate the drawing area */
lv_draw_buf_invalidate_cache(draw_buf->data, draw_buf->header.stride, draw_buf->header.cf, &draw_area); lv_draw_buf_invalidate_cache(draw_buf, &draw_area);
/* Set scissor area */ /* Set scissor area, excluding the split blit case */
vglite_set_scissor(&clip_area); #if LV_USE_VGLITE_BLIT_SPLIT
if(t->type != LV_DRAW_TASK_TYPE_IMAGE || t->type != LV_DRAW_TASK_TYPE_LAYER)
#endif
vglite_set_scissor(&clip_area);
switch(t->type) { switch(t->type) {
case LV_DRAW_TASK_TYPE_LABEL: case LV_DRAW_TASK_TYPE_LABEL:

View File

@ -573,8 +573,7 @@ static void _vglite_draw_arc(const lv_point_t * center, const lv_area_t * clip_a
bool donut = ((end_angle - start_angle) % 360 == 0) ? true : false; bool donut = ((end_angle - start_angle) % 360 == 0) ? true : false;
vg_lite_buffer_t * vgbuf = vglite_get_dest_buf(); vg_lite_buffer_t * vgbuf = vglite_get_dest_buf();
/* path: max size = 16 cubic bezier (7 words each) */ int32_t arc_path[ARC_PATH_DATA_MAX_SIZE];
int32_t arc_path[16 * 7];
lv_memzero(arc_path, sizeof(arc_path)); lv_memzero(arc_path, sizeof(arc_path));
/*** Init path ***/ /*** Init path ***/

View File

@ -19,6 +19,7 @@
#include "lv_vglite_buf.h" #include "lv_vglite_buf.h"
#include "lv_vglite_matrix.h" #include "lv_vglite_matrix.h"
#include "lv_vglite_utils.h" #include "lv_vglite_utils.h"
#include "lv_vglite_path.h"
#include "../../../misc/lv_log.h" #include "../../../misc/lv_log.h"
@ -57,18 +58,6 @@
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
/**
* BLock Image Transfer - copy rectangular image from src_buf to dst_buf with effects.
* By default, image is copied directly, with optional opacity.
*
* @param[in] dest_area Destination area with relative coordinates to dest buffer
* @param[in] src_area Source area with relative coordinates to src buffer
* @param[in] dsc Image descriptor
*
*/
static void _vglite_blit_single(const lv_area_t * dest_area, const lv_area_t * src_area,
const lv_draw_image_dsc_t * dsc);
#if LV_USE_VGLITE_BLIT_SPLIT #if LV_USE_VGLITE_BLIT_SPLIT
/** /**
* Move buffer pointer as close as possible to area, but with respect to alignment requirements. * Move buffer pointer as close as possible to area, but with respect to alignment requirements.
@ -98,19 +87,31 @@ static void _move_buf_close_to_area(void ** buf, lv_area_t * area, uint32_t stri
static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t dest_stride, lv_color_format_t dest_cf, static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t dest_stride, lv_color_format_t dest_cf,
const void * src_buf, lv_area_t * src_area, uint32_t src_stride, lv_color_format_t src_cf, const void * src_buf, lv_area_t * src_area, uint32_t src_stride, lv_color_format_t src_cf,
const lv_draw_image_dsc_t * dsc); const lv_draw_image_dsc_t * dsc);
#else #endif /*LV_USE_VGLITE_BLIT_SPLIT*/
/** /**
* BLock Image Transfer - copy rectangular image from src_buf to dst_buf with transformation. * VGlite blit - fill a path with an image pattern
* By default, image is copied directly, with optional opacity. *
*
* @param[in] dest_area Destination area with relative coordinates to dest buffer
* @param[in] clip_area Clip area with relative coordinates to dest buff
* @param[in] coords Coordinates of the image (relative to dest buff)
* @param[in] dsc Image descriptor
*
*/
static void _vglite_draw_pattern(const lv_area_t * clip_area, const lv_area_t * coords,
const lv_draw_image_dsc_t * dsc);
/**
* BLock Image Transfer - copy rectangular image from src_buf to dst_buf with or without effects.
* *
* @param[in] dest_area Area with relative coordinates to dest buffer
* @param[in] src_area Source area with relative coordinates to src buffer * @param[in] src_area Source area with relative coordinates to src buffer
* @param[in] dsc Image descriptor * @param[in] dsc Image descriptor
* *
*/ */
static void _vglite_blit_transform(const lv_area_t * dest_area, const lv_area_t * src_area, static void _vglite_blit(const lv_area_t * src_area, const lv_draw_image_dsc_t * dsc);
const lv_draw_image_dsc_t * dsc);
#endif /*LV_USE_VGLITE_BLIT_SPLIT*/ static vg_lite_color_t _vglite_recolor(const lv_draw_image_dsc_t * dsc);
/********************** /**********************
* STATIC VARIABLES * STATIC VARIABLES
@ -160,7 +161,7 @@ void lv_draw_vglite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
uint32_t src_stride = img_dsc->header.stride; uint32_t src_stride = img_dsc->header.stride;
/* Set src_vgbuf structure. */ /* Set src_vgbuf structure. */
vglite_set_src_buf(src_buf, lv_area_get_width(&src_area), lv_area_get_height(&src_area), src_stride, src_cf); vglite_set_src_buf(src_buf, img_dsc->header.w, img_dsc->header.h, src_stride, src_cf);
#if LV_USE_VGLITE_BLIT_SPLIT #if LV_USE_VGLITE_BLIT_SPLIT
void * dest_buf = layer->draw_buf->data; void * dest_buf = layer->draw_buf->data;
@ -171,10 +172,12 @@ void lv_draw_vglite_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t *
_vglite_blit_split(dest_buf, &blend_area, dest_stride, dest_cf, _vglite_blit_split(dest_buf, &blend_area, dest_stride, dest_cf,
src_buf, &src_area, src_stride, src_cf, dsc); src_buf, &src_area, src_stride, src_cf, dsc);
#else #else
if(has_transform) vglite_set_transformation_matrix(&blend_area, dsc);
_vglite_blit_transform(&blend_area, &src_area, dsc); bool is_tiled = dsc->tile;
if(is_tiled)
_vglite_draw_pattern(&clip_area, &relative_coords, dsc);
else else
_vglite_blit_single(&blend_area, &src_area, dsc); _vglite_blit(&src_area, dsc);
#endif /*LV_USE_VGLITE_BLIT_SPLIT*/ #endif /*LV_USE_VGLITE_BLIT_SPLIT*/
} }
@ -196,23 +199,7 @@ static void _vglite_blit(const lv_area_t * src_area, const lv_draw_image_dsc_t *
src_vgbuf->image_mode = VG_LITE_MULTIPLY_IMAGE_MODE; src_vgbuf->image_mode = VG_LITE_MULTIPLY_IMAGE_MODE;
src_vgbuf->transparency_mode = VG_LITE_IMAGE_TRANSPARENT; src_vgbuf->transparency_mode = VG_LITE_IMAGE_TRANSPARENT;
lv_color_t color; vg_lite_color_t vgcol = _vglite_recolor(dsc);
lv_opa_t opa;
bool has_recolor = (dsc->recolor_opa > LV_OPA_MIN);
if(has_recolor) {
color = dsc->recolor;
opa = LV_OPA_MIX2(dsc->recolor_opa, dsc->opa);
}
else {
color.red = 0xFF;
color.green = 0xFF;
color.blue = 0xFF;
opa = dsc->opa;
}
lv_color32_t col32 = lv_color_to_32(color, opa);
vg_lite_color_t vgcol = vglite_get_color(col32, false);
vg_lite_matrix_t * vgmatrix = vglite_get_matrix(); vg_lite_matrix_t * vgmatrix = vglite_get_matrix();
vg_lite_blend_t vgblend = vglite_get_blend_mode(dsc->blend_mode); vg_lite_blend_t vgblend = vglite_get_blend_mode(dsc->blend_mode);
@ -222,16 +209,6 @@ static void _vglite_blit(const lv_area_t * src_area, const lv_draw_image_dsc_t *
vglite_run(); vglite_run();
} }
static void _vglite_blit_single(const lv_area_t * dest_area, const lv_area_t * src_area,
const lv_draw_image_dsc_t * dsc)
{
/* Set vgmatrix. */
vglite_set_translation_matrix(dest_area);
/* Start blit. */
_vglite_blit(src_area, dsc);
}
#if LV_USE_VGLITE_BLIT_SPLIT #if LV_USE_VGLITE_BLIT_SPLIT
static void _move_buf_close_to_area(void ** buf, lv_area_t * area, uint32_t stride, lv_color_format_t cf) static void _move_buf_close_to_area(void ** buf, lv_area_t * area, uint32_t stride, lv_color_format_t cf)
{ {
@ -276,6 +253,9 @@ static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t
_move_buf_close_to_area((void **)&src_buf, src_area, src_stride, src_cf); _move_buf_close_to_area((void **)&src_buf, src_area, src_stride, src_cf);
_move_buf_close_to_area(&dest_buf, dest_area, dest_stride, dest_cf); _move_buf_close_to_area(&dest_buf, dest_area, dest_stride, dest_cf);
/* Set clip area */
vglite_set_scissor(dest_area);
/* If we're in limit, do a single BLIT */ /* If we're in limit, do a single BLIT */
if((src_area->x2 < VGLITE_BLIT_SPLIT_THR) && if((src_area->x2 < VGLITE_BLIT_SPLIT_THR) &&
(src_area->y2 < VGLITE_BLIT_SPLIT_THR)) { (src_area->y2 < VGLITE_BLIT_SPLIT_THR)) {
@ -284,7 +264,8 @@ static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t
vglite_set_dest_buf_ptr(dest_buf); vglite_set_dest_buf_ptr(dest_buf);
vglite_set_src_buf_ptr(src_buf); vglite_set_src_buf_ptr(src_buf);
_vglite_blit_single(dest_area, src_area, dsc); vglite_set_transformation_matrix(dest_area, dsc);
_vglite_blit(src_area, dsc);
VGLITE_TRACE("Single " VGLITE_TRACE("Single "
"Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | " "Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | "
@ -295,6 +276,8 @@ static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t
lv_area_get_width(src_area), lv_area_get_height(src_area), lv_area_get_width(src_area), lv_area_get_height(src_area),
lv_area_get_width(dest_area), lv_area_get_height(dest_area), lv_area_get_width(dest_area), lv_area_get_height(dest_area),
(uintptr_t)src_buf, (uintptr_t)dest_buf); (uintptr_t)src_buf, (uintptr_t)dest_buf);
return;
}; };
/* Split the BLIT into multiple tiles */ /* Split the BLIT into multiple tiles */
@ -371,7 +354,8 @@ static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t
vglite_set_dest_buf_ptr(tile_dest_buf); vglite_set_dest_buf_ptr(tile_dest_buf);
vglite_set_src_buf_ptr(tile_src_buf); vglite_set_src_buf_ptr(tile_src_buf);
_vglite_blit_single(&tile_dest_area, &tile_src_area, dsc); vglite_set_transformation_matrix(&tile_dest_area, dsc);
_vglite_blit(&tile_src_area, dsc);
VGLITE_TRACE("Tile [%d, %d] " VGLITE_TRACE("Tile [%d, %d] "
"Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | " "Area: ([%d,%d], [%d,%d]) -> ([%d,%d], [%d,%d]) | "
@ -386,16 +370,72 @@ static void _vglite_blit_split(void * dest_buf, lv_area_t * dest_area, uint32_t
} }
} }
} }
#else
static void _vglite_blit_transform(const lv_area_t * dest_area, const lv_area_t * src_area,
const lv_draw_image_dsc_t * dsc)
{
/* Set vgmatrix. */
vglite_set_transformation_matrix(dest_area, dsc);
/* Start blit. */
_vglite_blit(src_area, dsc);
}
#endif /*LV_USE_VGLITE_BLIT_SPLIT*/ #endif /*LV_USE_VGLITE_BLIT_SPLIT*/
static void _vglite_draw_pattern(const lv_area_t * clip_area, const lv_area_t * coords,
const lv_draw_image_dsc_t * dsc)
{
/* Target buffer */
vg_lite_buffer_t * dst_vgbuf = vglite_get_dest_buf();
/* Path to draw */
int32_t path_data[RECT_PATH_DATA_MAX_SIZE];
uint32_t path_data_size;
vglite_create_rect_path_data(path_data, &path_data_size, 0, coords);
vg_lite_quality_t path_quality = VG_LITE_MEDIUM;
vg_lite_path_t path;
VGLITE_CHECK_ERROR(vg_lite_init_path(&path, VG_LITE_S32, path_quality, path_data_size, path_data,
(vg_lite_float_t)clip_area->x1, (vg_lite_float_t)clip_area->y1,
((vg_lite_float_t)clip_area->x2) + 1.0f, ((vg_lite_float_t)clip_area->y2) + 1.0f));
/* Path Matrix */
vg_lite_matrix_t path_matrix;
vg_lite_identity(&path_matrix);
/* Pattern Image */
vg_lite_buffer_t * src_vgbuf = vglite_get_src_buf();
src_vgbuf->image_mode = VG_LITE_MULTIPLY_IMAGE_MODE;
src_vgbuf->transparency_mode = VG_LITE_IMAGE_TRANSPARENT;
/* Pattern matrix */
vg_lite_matrix_t * vgmatrix = vglite_get_matrix();
/* Blend mode */
vg_lite_blend_t vgblend = vglite_get_blend_mode(dsc->blend_mode);
vg_lite_color_t vgcol = _vglite_recolor(dsc);
/* Filter */
bool has_trasform = (dsc->rotation != 0 || dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE);
vg_lite_filter_t filter = has_trasform ? VG_LITE_FILTER_BI_LINEAR : VG_LITE_FILTER_POINT;
/* Draw Pattern */
VGLITE_CHECK_ERROR(vg_lite_draw_pattern(dst_vgbuf, &path, VG_LITE_FILL_NON_ZERO, &path_matrix,
src_vgbuf, vgmatrix, vgblend, VG_LITE_PATTERN_REPEAT,
0, vgcol, filter));
}
static vg_lite_color_t _vglite_recolor(const lv_draw_image_dsc_t * dsc)
{
lv_color_t color;
lv_opa_t opa;
bool has_recolor = (dsc->recolor_opa > LV_OPA_MIN);
if(has_recolor) {
color = dsc->recolor;
opa = LV_OPA_MIX2(dsc->recolor_opa, dsc->opa);
}
else {
color.red = 0xFF;
color.green = 0xFF;
color.blue = 0xFF;
opa = dsc->opa;
}
lv_color32_t col32 = lv_color_to_32(color, opa);
return vglite_get_color(col32, false);
}
#endif /*LV_USE_DRAW_VGLITE*/ #endif /*LV_USE_DRAW_VGLITE*/

View File

@ -79,73 +79,81 @@ static void _draw_vglite_letter(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t
lv_draw_fill_dsc_t * fill_draw_dsc, const lv_area_t * fill_area) lv_draw_fill_dsc_t * fill_draw_dsc, const lv_area_t * fill_area)
{ {
if(glyph_draw_dsc) { if(glyph_draw_dsc) {
if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_INVALID) { switch(glyph_draw_dsc->format) {
case LV_FONT_GLYPH_FORMAT_NONE: {
#if LV_USE_FONT_PLACEHOLDER #if LV_USE_FONT_PLACEHOLDER
/* Draw a placeholder rectangle*/ /* Draw a placeholder rectangle*/
lv_draw_border_dsc_t border_draw_dsc; lv_draw_border_dsc_t border_draw_dsc;
lv_draw_border_dsc_init(&border_draw_dsc); lv_draw_border_dsc_init(&border_draw_dsc);
border_draw_dsc.opa = glyph_draw_dsc->opa; border_draw_dsc.opa = glyph_draw_dsc->opa;
border_draw_dsc.color = glyph_draw_dsc->color; border_draw_dsc.color = glyph_draw_dsc->color;
border_draw_dsc.width = 1; border_draw_dsc.width = 1;
lv_draw_vglite_border(draw_unit, &border_draw_dsc, glyph_draw_dsc->bg_coords); lv_draw_vglite_border(draw_unit, &border_draw_dsc, glyph_draw_dsc->bg_coords);
#endif #endif
} }
else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_A8) { break;
/*Do not draw transparent things*/ case LV_FONT_GLYPH_FORMAT_A1 ... LV_FONT_GLYPH_FORMAT_A8: {
if(glyph_draw_dsc->opa <= LV_OPA_MIN) /*Do not draw transparent things*/
return; if(glyph_draw_dsc->opa <= LV_OPA_MIN)
return;
lv_layer_t * layer = draw_unit->target_layer; lv_layer_t * layer = draw_unit->target_layer;
lv_area_t blend_area; lv_area_t blend_area;
if(!_lv_area_intersect(&blend_area, glyph_draw_dsc->letter_coords, draw_unit->clip_area)) if(!_lv_area_intersect(&blend_area, glyph_draw_dsc->letter_coords, draw_unit->clip_area))
return; return;
lv_area_move(&blend_area, -layer->buf_area.x1, -layer->buf_area.y1); lv_area_move(&blend_area, -layer->buf_area.x1, -layer->buf_area.y1);
const lv_draw_buf_t * draw_buf = glyph_draw_dsc->glyph_data; const lv_draw_buf_t * draw_buf = glyph_draw_dsc->glyph_data;
const void * mask_buf = draw_buf->data; const void * mask_buf = draw_buf->data;
uint32_t mask_width = lv_area_get_width(glyph_draw_dsc->letter_coords); uint32_t mask_width = lv_area_get_width(glyph_draw_dsc->letter_coords);
uint32_t mask_height = lv_area_get_height(glyph_draw_dsc->letter_coords); uint32_t mask_height = lv_area_get_height(glyph_draw_dsc->letter_coords);
uint32_t mask_stride = draw_buf->header.stride; uint32_t mask_stride = draw_buf->header.stride;
lv_area_t mask_area; lv_area_t mask_area;
mask_area.x1 = blend_area.x1 - (glyph_draw_dsc->letter_coords->x1 - layer->buf_area.x1); mask_area.x1 = blend_area.x1 - (glyph_draw_dsc->letter_coords->x1 - layer->buf_area.x1);
mask_area.y1 = blend_area.y1 - (glyph_draw_dsc->letter_coords->y1 - layer->buf_area.y1); mask_area.y1 = blend_area.y1 - (glyph_draw_dsc->letter_coords->y1 - layer->buf_area.y1);
mask_area.x2 = mask_width - 1; mask_area.x2 = mask_width - 1;
mask_area.y2 = mask_height - 1; mask_area.y2 = mask_height - 1;
if(!vglite_buf_aligned(mask_buf, mask_stride, LV_COLOR_FORMAT_A8)) { if(!vglite_buf_aligned(mask_buf, mask_stride, LV_COLOR_FORMAT_A8)) {
/* Draw a placeholder rectangle*/ /* Draw a placeholder rectangle*/
lv_draw_border_dsc_t border_draw_dsc; lv_draw_border_dsc_t border_draw_dsc;
lv_draw_border_dsc_init(&border_draw_dsc); lv_draw_border_dsc_init(&border_draw_dsc);
border_draw_dsc.opa = glyph_draw_dsc->opa; border_draw_dsc.opa = glyph_draw_dsc->opa;
border_draw_dsc.color = glyph_draw_dsc->color; border_draw_dsc.color = glyph_draw_dsc->color;
border_draw_dsc.width = 1; border_draw_dsc.width = 1;
lv_draw_vglite_border(draw_unit, &border_draw_dsc, glyph_draw_dsc->bg_coords); lv_draw_vglite_border(draw_unit, &border_draw_dsc, glyph_draw_dsc->bg_coords);
} }
else { else {
/* Set src_vgbuf structure. */ /* Set src_vgbuf structure. */
vglite_set_src_buf(mask_buf, mask_width, mask_height, mask_stride, LV_COLOR_FORMAT_A8); vglite_set_src_buf(mask_buf, mask_width, mask_height, mask_stride, LV_COLOR_FORMAT_A8);
/* Set vgmatrix. */ /* Set vgmatrix. */
vglite_set_translation_matrix(&blend_area); vglite_set_translation_matrix(&blend_area);
lv_draw_buf_invalidate_cache((void *)mask_buf, mask_stride, LV_COLOR_FORMAT_A8, &mask_area); lv_draw_buf_invalidate_cache(draw_buf, &mask_area);
_vglite_draw_letter(&mask_area, glyph_draw_dsc->color, glyph_draw_dsc->opa); _vglite_draw_letter(&mask_area, glyph_draw_dsc->color, glyph_draw_dsc->opa);
} }
} }
else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE) { break;
case LV_FONT_GLYPH_FORMAT_IMAGE: {
#if LV_USE_IMGFONT #if LV_USE_IMGFONT
lv_draw_img_dsc_t img_dsc; lv_draw_img_dsc_t img_dsc;
lv_draw_img_dsc_init(&img_dsc); lv_draw_img_dsc_init(&img_dsc);
img_dsc.angle = 0; img_dsc.angle = 0;
img_dsc.zoom = LV_ZOOM_NONE; img_dsc.zoom = LV_ZOOM_NONE;
img_dsc.opa = glyph_draw_dsc->opa; img_dsc.opa = glyph_draw_dsc->opa;
img_dsc.src = glyph_draw_dsc->glyph_data; img_dsc.src = glyph_draw_dsc->glyph_data;
lv_draw_vglite_img(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords); lv_draw_vglite_img(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords);
#endif #endif
}
break;
default:
break;
} }
} }

View File

@ -68,7 +68,7 @@ void lv_draw_vglite_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t
.x2 = draw_buf->header.w - 1, .x2 = draw_buf->header.w - 1,
.y2 = draw_buf->header.h - 1 .y2 = draw_buf->header.h - 1
}; };
lv_draw_buf_invalidate_cache(draw_buf->data, draw_buf->header.stride, draw_buf->header.cf, &area_to_draw); lv_draw_buf_invalidate_cache(draw_buf, &area_to_draw);
lv_draw_image_dsc_t new_draw_dsc = *draw_dsc; lv_draw_image_dsc_t new_draw_dsc = *draw_dsc;
new_draw_dsc.src = draw_buf; new_draw_dsc.src = draw_buf;

View File

@ -61,15 +61,17 @@ void vglite_set_transformation_matrix(const lv_area_t * dest_area, const lv_draw
bool has_scale = (dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE); bool has_scale = (dsc->scale_x != LV_SCALE_NONE || dsc->scale_y != LV_SCALE_NONE);
bool has_rotation = (dsc->rotation != 0); bool has_rotation = (dsc->rotation != 0);
vg_lite_translate(dsc->pivot.x, dsc->pivot.y, &_vgmatrix); if(has_scale || has_rotation) {
if(has_rotation) vg_lite_translate(dsc->pivot.x, dsc->pivot.y, &_vgmatrix);
vg_lite_rotate(dsc->rotation / 10.0f, &_vgmatrix); /* angle is 1/10 degree */ if(has_rotation)
if(has_scale) { vg_lite_rotate(dsc->rotation / 10.0f, &_vgmatrix); /* angle is 1/10 degree */
vg_lite_float_t scale_x = 1.0f * dsc->scale_x / LV_SCALE_NONE; if(has_scale) {
vg_lite_float_t scale_y = 1.0f * dsc->scale_y / LV_SCALE_NONE; vg_lite_float_t scale_x = 1.0f * dsc->scale_x / LV_SCALE_NONE;
vg_lite_scale(scale_x, scale_y, &_vgmatrix); vg_lite_float_t scale_y = 1.0f * dsc->scale_y / LV_SCALE_NONE;
vg_lite_scale(scale_x, scale_y, &_vgmatrix);
}
vg_lite_translate(0.0f - dsc->pivot.x, 0.0f - dsc->pivot.y, &_vgmatrix);
} }
vg_lite_translate(0.0f - dsc->pivot.x, 0.0f - dsc->pivot.y, &_vgmatrix);
} }
/********************** /**********************

View File

@ -47,8 +47,14 @@ extern "C" {
* - 4 cubics for the corners * - 4 cubics for the corners
* - 4 lines for the sides * - 4 lines for the sides
* - 1 end for the path end */ * - 1 end for the path end */
#define RECT_PATH_DATA_MAX_SIZE 1 * MOVE_PATH_DATA_SIZE + 4 * CUBIC_PATH_DATA_SIZE + 4 * LINE_PATH_DATA_SIZE + 1 * END_PATH_DATA_SIZE #define RECT_PATH_DATA_MAX_SIZE (1 * MOVE_PATH_DATA_SIZE + 4 * CUBIC_PATH_DATA_SIZE + 4 * LINE_PATH_DATA_SIZE + 1 * END_PATH_DATA_SIZE)
/* Maximum possible arc path size
* is in the rounded arc case:
* - 1 move for the path start
* - 16 cubics for the arc (5 inner, 5 outer) and corners (3 per corner)
* - 1 end for the path end */
#define ARC_PATH_DATA_MAX_SIZE (1 * MOVE_PATH_DATA_SIZE + 16 * CUBIC_PATH_DATA_SIZE + 1 * END_PATH_DATA_SIZE)
/********************** /**********************
* TYPEDEFS * TYPEDEFS
**********************/ **********************/

View File

@ -28,10 +28,9 @@
static void execute_drawing(lv_draw_dave2d_unit_t * u); static void execute_drawing(lv_draw_dave2d_unit_t * u);
#if defined(RENESAS_CORTEX_M85) #if defined(RENESAS_CORTEX_M85)
#if (BSP_CFG_DCACHE_ENABLED) #if (BSP_CFG_DCACHE_ENABLED)
static void _dave2d_buf_invalidate_cache_cb(void * buf, uint32_t stride, lv_color_format_t color_format, static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, const lv_area_t * area);
const lv_area_t * area); #endif
#endif
#endif #endif
static int32_t _dave2d_evaluate(lv_draw_unit_t * draw_unit, lv_draw_task_t * task); static int32_t _dave2d_evaluate(lv_draw_unit_t * draw_unit, lv_draw_task_t * task);
@ -123,12 +122,15 @@ static void lv_draw_buf_dave2d_init_handlers(void)
#if defined(RENESAS_CORTEX_M85) #if defined(RENESAS_CORTEX_M85)
#if (BSP_CFG_DCACHE_ENABLED) #if (BSP_CFG_DCACHE_ENABLED)
static void _dave2d_buf_invalidate_cache_cb(void * buf, uint32_t stride, lv_color_format_t color_format, static void _dave2d_buf_invalidate_cache_cb(const lv_draw_buf_t * draw_buf, const lv_area_t * area)
const lv_area_t * area)
{ {
uint8_t * address = buf; const lv_image_header_t * header = &draw_buf->header;
uint32_t stride = header->stride;
lv_color_format_t cf = header->cf;
uint8_t * address = draw_buf->data;
int32_t i = 0; int32_t i = 0;
uint32_t bytes_per_pixel = lv_color_format_get_size(color_format); uint32_t bytes_per_pixel = lv_color_format_get_size(cf);
int32_t width = lv_area_get_width(area); int32_t width = lv_area_get_width(area);
int32_t lines = lv_area_get_height(area); int32_t lines = lv_area_get_height(area);
int32_t bytes_to_flush_per_line = (int32_t)width * (int32_t)bytes_per_pixel; int32_t bytes_to_flush_per_line = (int32_t)width * (int32_t)bytes_per_pixel;
@ -473,7 +475,7 @@ static void execute_drawing(lv_draw_dave2d_unit_t * u)
lv_area_move(&clipped_area, x, y); lv_area_move(&clipped_area, x, y);
/* Invalidate cache */ /* Invalidate cache */
lv_draw_buf_invalidate_cache(layer->draw_buf->data, layer->draw_buf->header.stride, layer->color_format, &clipped_area); lv_draw_buf_invalidate_cache(layer->draw_buf, &clipped_area);
#endif #endif
#endif #endif

View File

@ -63,73 +63,80 @@ static void lv_draw_dave2d_draw_letter_cb(lv_draw_unit_t * u, lv_draw_glyph_dsc_
(d2_border)clip_area.y2); (d2_border)clip_area.y2);
if(glyph_draw_dsc) { if(glyph_draw_dsc) {
if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_INVALID) { switch(glyph_draw_dsc->format) {
case LV_FONT_GLYPH_FORMAT_NONE: {
#if LV_USE_FONT_PLACEHOLDER #if LV_USE_FONT_PLACEHOLDER
/* Draw a placeholder rectangle*/ /* Draw a placeholder rectangle*/
lv_draw_border_dsc_t border_draw_dsc; lv_draw_border_dsc_t border_draw_dsc;
lv_draw_border_dsc_init(&border_draw_dsc); lv_draw_border_dsc_init(&border_draw_dsc);
border_draw_dsc.opa = glyph_draw_dsc->opa; border_draw_dsc.opa = glyph_draw_dsc->opa;
border_draw_dsc.color = glyph_draw_dsc->color; border_draw_dsc.color = glyph_draw_dsc->color;
border_draw_dsc.width = 1; border_draw_dsc.width = 1;
//lv_draw_sw_border(u, &border_draw_dsc, glyph_draw_dsc->bg_coords); //lv_draw_sw_border(u, &border_draw_dsc, glyph_draw_dsc->bg_coords);
lv_draw_dave2d_border(unit, &border_draw_dsc, glyph_draw_dsc->bg_coords); lv_draw_dave2d_border(unit, &border_draw_dsc, glyph_draw_dsc->bg_coords);
#endif #endif
} }
else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_A8) { break;
lv_area_t mask_area = letter_coords; case LV_FONT_GLYPH_FORMAT_A1 ... LV_FONT_GLYPH_FORMAT_A8: {
mask_area.x2 = mask_area.x1 + lv_draw_buf_width_to_stride(lv_area_get_width(&mask_area), LV_COLOR_FORMAT_A8) - 1; lv_area_t mask_area = letter_coords;
// lv_draw_sw_blend_dsc_t blend_dsc; mask_area.x2 = mask_area.x1 + lv_draw_buf_width_to_stride(lv_area_get_width(&mask_area), LV_COLOR_FORMAT_A8) - 1;
// lv_memzero(&blend_dsc, sizeof(blend_dsc)); // lv_draw_sw_blend_dsc_t blend_dsc;
// blend_dsc.color = glyph_draw_dsc->color; // lv_memzero(&blend_dsc, sizeof(blend_dsc));
// blend_dsc.opa = glyph_draw_dsc->opa; // blend_dsc.color = glyph_draw_dsc->color;
// blend_dsc.mask_buf = glyph_draw_dsc->glyph_data; // blend_dsc.opa = glyph_draw_dsc->opa;
// blend_dsc.mask_area = &mask_area; // blend_dsc.mask_buf = glyph_draw_dsc->glyph_data;
// blend_dsc.blend_area = glyph_draw_dsc->letter_coords; // blend_dsc.mask_area = &mask_area;
// blend_dsc.mask_res = LV_DRAW_SW_MASK_RES_CHANGED; // blend_dsc.blend_area = glyph_draw_dsc->letter_coords;
//lv_draw_sw_blend(u, &blend_dsc); // blend_dsc.mask_res = LV_DRAW_SW_MASK_RES_CHANGED;
//lv_draw_sw_blend(u, &blend_dsc);
lv_draw_buf_t * draw_buf = glyph_draw_dsc->glyph_data; lv_draw_buf_t * draw_buf = glyph_draw_dsc->glyph_data;
#if defined(RENESAS_CORTEX_M85) #if defined(RENESAS_CORTEX_M85)
#if (BSP_CFG_DCACHE_ENABLED) #if (BSP_CFG_DCACHE_ENABLED)
d1_cacheblockflush(unit->d2_handle, 0, draw_buf->data, draw_buf->data_size); d1_cacheblockflush(unit->d2_handle, 0, draw_buf->data, draw_buf->data_size);
#endif #endif
#endif #endif
d2_settexture(unit->d2_handle, (void *)draw_buf->data, d2_settexture(unit->d2_handle, (void *)draw_buf->data,
(d2_s32)lv_draw_buf_width_to_stride((uint32_t)lv_area_get_width(&letter_coords), LV_COLOR_FORMAT_A8), (d2_s32)lv_draw_buf_width_to_stride((uint32_t)lv_area_get_width(&letter_coords), LV_COLOR_FORMAT_A8),
lv_area_get_width(&letter_coords), lv_area_get_height(&letter_coords), d2_mode_alpha8); lv_area_get_width(&letter_coords), lv_area_get_height(&letter_coords), d2_mode_alpha8);
d2_settexopparam(unit->d2_handle, d2_cc_red, glyph_draw_dsc->color.red, 0); d2_settexopparam(unit->d2_handle, d2_cc_red, glyph_draw_dsc->color.red, 0);
d2_settexopparam(unit->d2_handle, d2_cc_green, glyph_draw_dsc->color.green, 0); d2_settexopparam(unit->d2_handle, d2_cc_green, glyph_draw_dsc->color.green, 0);
d2_settexopparam(unit->d2_handle, d2_cc_blue, glyph_draw_dsc->color.blue, 0); d2_settexopparam(unit->d2_handle, d2_cc_blue, glyph_draw_dsc->color.blue, 0);
d2_settexopparam(unit->d2_handle, d2_cc_alpha, glyph_draw_dsc->opa, 0); d2_settexopparam(unit->d2_handle, d2_cc_alpha, glyph_draw_dsc->opa, 0);
d2_settextureoperation(unit->d2_handle, d2_to_multiply, d2_to_multiply, d2_to_multiply, d2_to_multiply); d2_settextureoperation(unit->d2_handle, d2_to_multiply, d2_to_multiply, d2_to_multiply, d2_to_multiply);
d2_settexturemapping(unit->d2_handle, D2_FIX4(letter_coords.x1), D2_FIX4(letter_coords.y1), D2_FIX16(0), D2_FIX16(0), d2_settexturemapping(unit->d2_handle, D2_FIX4(letter_coords.x1), D2_FIX4(letter_coords.y1), D2_FIX16(0), D2_FIX16(0),
D2_FIX16(1), D2_FIX16(0), D2_FIX16(0), D2_FIX16(1)); D2_FIX16(1), D2_FIX16(0), D2_FIX16(0), D2_FIX16(1));
d2_settexturemode(unit->d2_handle, d2_tm_filter); d2_settexturemode(unit->d2_handle, d2_tm_filter);
d2_setfillmode(unit->d2_handle, d2_fm_texture); d2_setfillmode(unit->d2_handle, d2_fm_texture);
d2_renderbox(unit->d2_handle, (d2_point)D2_FIX4(letter_coords.x1), d2_renderbox(unit->d2_handle, (d2_point)D2_FIX4(letter_coords.x1),
(d2_point)D2_FIX4(letter_coords.y1), (d2_point)D2_FIX4(letter_coords.y1),
(d2_point)D2_FIX4(lv_area_get_width(&letter_coords)), (d2_point)D2_FIX4(lv_area_get_width(&letter_coords)),
(d2_point)D2_FIX4(lv_area_get_height(&letter_coords))); (d2_point)D2_FIX4(lv_area_get_height(&letter_coords)));
d2_setfillmode(unit->d2_handle, current_fillmode); d2_setfillmode(unit->d2_handle, current_fillmode);
} }
else if(glyph_draw_dsc->format == LV_DRAW_LETTER_BITMAP_FORMAT_IMAGE) { break;
case LV_FONT_GLYPH_FORMAT_IMAGE: {
#if LV_USE_IMGFONT #if LV_USE_IMGFONT
lv_draw_image_dsc_t img_dsc; lv_draw_image_dsc_t img_dsc;
lv_draw_image_dsc_init(&img_dsc); lv_draw_image_dsc_init(&img_dsc);
img_dsc.rotation = 0; img_dsc.rotation = 0;
img_dsc.scale_x = LV_SCALE_NONE; img_dsc.scale_x = LV_SCALE_NONE;
img_dsc.scale_y = LV_SCALE_NONE; img_dsc.scale_y = LV_SCALE_NONE;
img_dsc.opa = glyph_draw_dsc->opa; img_dsc.opa = glyph_draw_dsc->opa;
img_dsc.src = glyph_draw_dsc->glyph_data; img_dsc.src = glyph_draw_dsc->glyph_data;
//lv_draw_sw_image(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords); //lv_draw_sw_image(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords);
#endif #endif
}
break;
default:
break;
} }
} }

View File

@ -174,11 +174,11 @@ static bool draw_to_texture(lv_draw_sdl_unit_t * u, cache_data_t * data)
lv_layer_t dest_layer; lv_layer_t dest_layer;
lv_memzero(&dest_layer, sizeof(dest_layer)); lv_memzero(&dest_layer, sizeof(dest_layer));
dest_layer.buf = lv_draw_buf_align(sdl_render_buf, LV_COLOR_FORMAT_ARGB8888); lv_draw_buf_t draw_buf;
dest_layer.draw_buf = &draw_buf;
lv_draw_buf_init(dest_layer.draw_buf, lv_area_get_width(&task->area), lv_area_get_height(&task->area),
LV_COLOR_FORMAT_ARGB8888, LV_STRIDE_AUTO, sdl_render_buf, sizeof(sdl_render_buf));
dest_layer.color_format = LV_COLOR_FORMAT_ARGB8888; dest_layer.color_format = LV_COLOR_FORMAT_ARGB8888;
lv_area_t a;
_lv_area_intersect(&a, u->base_unit.clip_area, &task->area);
dest_layer.buf_area = task->area; dest_layer.buf_area = task->area;
dest_layer._clip_area = task->area; dest_layer._clip_area = task->area;
lv_memzero(sdl_render_buf, lv_area_get_size(&dest_layer.buf_area) * 4 + 100); lv_memzero(sdl_render_buf, lv_area_get_size(&dest_layer.buf_area) * 4 + 100);
@ -224,7 +224,6 @@ static bool draw_to_texture(lv_draw_sdl_unit_t * u, cache_data_t * data)
break; break;
case LV_DRAW_TASK_TYPE_IMAGE: { case LV_DRAW_TASK_TYPE_IMAGE: {
lv_draw_image_dsc_t * image_dsc = task->draw_dsc; lv_draw_image_dsc_t * image_dsc = task->draw_dsc;
// SDL_Surface* loadImage(std::string path) {
const char * path = image_dsc->src; const char * path = image_dsc->src;
SDL_Surface * surface = IMG_Load(&path[2]); SDL_Surface * surface = IMG_Load(&path[2]);
if(surface == NULL) { if(surface == NULL) {
@ -307,6 +306,7 @@ static void blend_texture_layer(lv_draw_sdl_unit_t * u)
static void draw_from_cached_texture(lv_draw_sdl_unit_t * u) static void draw_from_cached_texture(lv_draw_sdl_unit_t * u)
{ {
lv_draw_task_t * t = u->task_act; lv_draw_task_t * t = u->task_act;
cache_data_t data_to_find; cache_data_t data_to_find;
@ -344,8 +344,8 @@ static void draw_from_cached_texture(lv_draw_sdl_unit_t * u)
SDL_SetRenderTarget(renderer, layer_get_texture(dest_layer)); SDL_SetRenderTarget(renderer, layer_get_texture(dest_layer));
if(t->type == LV_DRAW_TASK_TYPE_IMAGE) { lv_draw_image_dsc_t * draw_dsc = lv_draw_task_get_image_dsc(t);
lv_draw_image_dsc_t * draw_dsc = t->draw_dsc; if(draw_dsc) {
lv_area_t image_area; lv_area_t image_area;
image_area.x1 = 0; image_area.x1 = 0;
image_area.y1 = 0; image_area.y1 = 0;

View File

@ -17,7 +17,7 @@ extern "C" {
#if LV_USE_DRAW_SDL #if LV_USE_DRAW_SDL
#include <src/misc/cache/lv_cache.h> #include "../../misc/cache/lv_cache.h"
#include "../../misc/lv_area.h" #include "../../misc/lv_area.h"
#include "../../misc/lv_color.h" #include "../../misc/lv_color.h"
#include "../../display/lv_display.h" #include "../../display/lv_display.h"
@ -52,8 +52,8 @@ typedef struct {
void lv_draw_sdl_init(void); void lv_draw_sdl_init(void);
LV_ATTRIBUTE_FAST_MEM void lv_draw_sdl_image(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sdl_image(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc,
const lv_area_t * coords); const lv_area_t * coords);
void lv_draw_sdl_fill(lv_draw_unit_t * draw_unit, const lv_draw_fill_dsc_t * dsc, const lv_area_t * coords); void lv_draw_sdl_fill(lv_draw_unit_t * draw_unit, const lv_draw_fill_dsc_t * dsc, const lv_area_t * coords);
@ -65,7 +65,7 @@ void lv_draw_sdl_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * d
void lv_draw_sdl_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, const lv_area_t * coords); void lv_draw_sdl_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, const lv_area_t * coords);
LV_ATTRIBUTE_FAST_MEM void lv_draw_sdl_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc); void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sdl_line(lv_draw_unit_t * draw_unit, const lv_draw_line_dsc_t * dsc);
void lv_draw_sdl_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords); void lv_draw_sdl_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords);

View File

@ -200,11 +200,19 @@ static inline lv_result_t _lv_draw_sw_image_helium(
|| (LV_COLOR_FORMAT_RGB565A8 == src_cf))) { || (LV_COLOR_FORMAT_RGB565A8 == src_cf))) {
break; break;
} }
#if 0 /* a temporary patch */
if((LV_COLOR_FORMAT_XRGB8888 == des_cf) if((LV_COLOR_FORMAT_XRGB8888 == des_cf)
&& !( (LV_COLOR_FORMAT_ARGB8888 == src_cf) && !( (LV_COLOR_FORMAT_ARGB8888 == src_cf)
|| (LV_COLOR_FORMAT_XRGB8888 == src_cf))) { || (LV_COLOR_FORMAT_XRGB8888 == src_cf))) {
break; break;
} }
#else
if((LV_COLOR_FORMAT_XRGB8888 == des_cf)
|| (LV_COLOR_FORMAT_RGB888 == des_cf)
|| (LV_COLOR_FORMAT_ARGB8888 == des_cf)) {
break;
}
#endif
/* ------------- prepare parameters for arm-2d APIs - BEGIN --------- */ /* ------------- prepare parameters for arm-2d APIs - BEGIN --------- */
@ -399,6 +407,7 @@ static inline lv_result_t _lv_draw_sw_image_helium(
LV_ASSERT(LV_COLOR_FORMAT_RGB565 == des_cf); LV_ASSERT(LV_COLOR_FORMAT_RGB565 == des_cf);
if(opa >= LV_OPA_MAX) { if(opa >= LV_OPA_MAX) {
#if ARM_2D_VERSION >= 10106
arm_2d_rgb565_tile_transform_only( arm_2d_rgb565_tile_transform_only(
&source_tile, &source_tile,
&target_tile, &target_tile,
@ -406,8 +415,21 @@ static inline lv_result_t _lv_draw_sw_image_helium(
source_center, source_center,
ARM_2D_ANGLE((draw_dsc->rotation / 10.0f)), ARM_2D_ANGLE((draw_dsc->rotation / 10.0f)),
draw_dsc->scale_x / 256.0f, draw_dsc->scale_x / 256.0f,
&target_center &target_center);
); #else
arm_2dp_rgb565_tile_transform_only_prepare(
NULL,
&source_tile,
source_center,
ARM_2D_ANGLE((draw_dsc->rotation / 10.0f)),
(float)(draw_dsc->scale_x / 256.0f));
arm_2dp_tile_transform(NULL,
&target_tile,
NULL,
&target_center);
#endif
} }
else { else {
arm_2d_rgb565_tile_transform_only_with_opacity( arm_2d_rgb565_tile_transform_only_with_opacity(
@ -423,6 +445,7 @@ static inline lv_result_t _lv_draw_sw_image_helium(
} }
} }
#if 0 /* a temporary patch */
else if(LV_COLOR_FORMAT_ARGB8888 == src_cf) { else if(LV_COLOR_FORMAT_ARGB8888 == src_cf) {
LV_ASSERT(LV_COLOR_FORMAT_XRGB8888 == des_cf); LV_ASSERT(LV_COLOR_FORMAT_XRGB8888 == des_cf);
@ -488,6 +511,7 @@ static inline lv_result_t _lv_draw_sw_image_helium(
} }
} }
#endif
else { else {
break; break;
} }

View File

@ -35,242 +35,162 @@ extern "C" {
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565 #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB565(dsc) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB565(dsc) \
_lv_color_blend_to_rgb565_helium(dsc) _lv_color_blend_to_rgb565_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_OPA #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_OPA
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_OPA(dsc) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_OPA(dsc) \
_lv_color_blend_to_rgb565_with_opa_helium(dsc) _lv_color_blend_to_rgb565_with_opa_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_MASK #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_MASK
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_MASK(dsc) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_MASK(dsc) \
_lv_color_blend_to_rgb565_with_mask_helium(dsc) _lv_color_blend_to_rgb565_with_mask_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565_MIX_MASK_OPA #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB565_MIX_MASK_OPA
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB565_MIX_MASK_OPA(dsc) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB565_MIX_MASK_OPA(dsc) \
_lv_color_blend_to_rgb565_mix_mask_opa_helium(dsc) _lv_color_blend_to_rgb565_mix_mask_opa_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565 #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565(dsc) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565(dsc) \
_lv_rgb565_blend_normal_to_rgb565_helium(dsc) _lv_rgb565_blend_normal_to_rgb565_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_OPA #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_OPA
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_OPA(dsc) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_OPA(dsc) \
_lv_rgb565_blend_normal_to_rgb565_with_opa_helium(dsc) _lv_rgb565_blend_normal_to_rgb565_with_opa_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_MASK #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_MASK
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_MASK(dsc) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_WITH_MASK(dsc) \
_lv_rgb565_blend_normal_to_rgb565_with_mask_helium(dsc) _lv_rgb565_blend_normal_to_rgb565_with_mask_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA(dsc) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA(dsc) \
_lv_rgb565_blend_normal_to_rgb565_mix_mask_opa_helium(dsc) _lv_rgb565_blend_normal_to_rgb565_mix_mask_opa_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565 #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565(dsc, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_rgb565_helium(dsc, src_px_size) _lv_rgb888_blend_normal_to_rgb565_arm2d(dsc, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_OPA #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_OPA
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_OPA(dsc, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_OPA(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_rgb565_with_opa_helium(dsc, src_px_size) _lv_rgb888_blend_normal_to_rgb565_with_opa_arm2d(dsc, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_MASK #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_MASK
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_MASK(dsc, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_WITH_MASK(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_rgb565_with_mask_helium(dsc, src_px_size) _lv_rgb888_blend_normal_to_rgb565_with_mask_arm2d(dsc, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA(dsc, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_rgb565_mix_mask_opa_helium(dsc, src_px_size) _lv_rgb888_blend_normal_to_rgb565_mix_mask_opa_arm2d(dsc, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565 #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565(dsc) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565(dsc) \
_lv_argb8888_blend_normal_to_rgb565_helium(dsc) _lv_argb8888_blend_normal_to_rgb565_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_OPA #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_OPA
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_OPA(dsc) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_OPA(dsc) \
_lv_argb8888_blend_normal_to_rgb565_with_opa_helium(dsc) _lv_argb8888_blend_normal_to_rgb565_with_opa_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_MASK #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_MASK
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_MASK(dsc) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_WITH_MASK(dsc) \
_lv_argb8888_blend_normal_to_rgb565_with_mask_helium(dsc) _lv_argb8888_blend_normal_to_rgb565_with_mask_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA(dsc) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB565_MIX_MASK_OPA(dsc) \
_lv_argb8888_blend_normal_to_rgb565_mix_mask_opa_helium(dsc) _lv_argb8888_blend_normal_to_rgb565_mix_mask_opa_arm2d(dsc)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888 #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB888(dsc, dst_px_size) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB888(dsc, dst_px_size) \
_lv_color_blend_to_rgb888_helium(dsc, dst_px_size) _lv_color_blend_to_rgb888_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_OPA #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_OPA
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_OPA(dsc, dst_px_size) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_OPA(dsc, dst_px_size) \
_lv_color_blend_to_rgb888_with_opa_helium(dsc, dst_px_size) _lv_color_blend_to_rgb888_with_opa_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_MASK #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_MASK
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_MASK(dsc, dst_px_size) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB888_WITH_MASK(dsc, dst_px_size) \
_lv_color_blend_to_rgb888_with_mask_helium(dsc, dst_px_size) _lv_color_blend_to_rgb888_with_mask_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888_MIX_MASK_OPA #ifndef LV_DRAW_SW_COLOR_BLEND_TO_RGB888_MIX_MASK_OPA
#define LV_DRAW_SW_COLOR_BLEND_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size) \ #define LV_DRAW_SW_COLOR_BLEND_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size) \
_lv_color_blend_to_rgb888_mix_mask_opa_helium(dsc, dst_px_size) _lv_color_blend_to_rgb888_mix_mask_opa_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888 #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888(dsc, dst_px_size) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888(dsc, dst_px_size) \
_lv_rgb565_blend_normal_to_rgb888_helium(dsc, dst_px_size) _lv_rgb565_blend_normal_to_rgb888_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_OPA #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_OPA
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_OPA(dsc, dst_px_size) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_OPA(dsc, dst_px_size) \
_lv_rgb565_blend_normal_to_rgb888_with_opa_helium(dsc, dst_px_size) _lv_rgb565_blend_normal_to_rgb888_with_opa_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_MASK #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_MASK
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_MASK(dsc, dst_px_size) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_WITH_MASK(dsc, dst_px_size) \
_lv_rgb565_blend_normal_to_rgb888_with_mask_helium(dsc, dst_px_size) _lv_rgb565_blend_normal_to_rgb888_with_mask_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA #ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size) \ #define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size) \
_lv_rgb565_blend_normal_to_rgb888_mix_mask_opa_helium(dsc, dst_px_size) _lv_rgb565_blend_normal_to_rgb888_mix_mask_opa_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888 #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888(dsc, dst_px_size, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888(dsc, dst_px_size, src_px_size) \
_lv_rgb888_blend_normal_to_rgb888_helium(dsc, dst_px_size, src_px_size) _lv_rgb888_blend_normal_to_rgb888_arm2d(dsc, dst_px_size, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_OPA #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_OPA
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_OPA(dsc, dst_px_size, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_OPA(dsc, dst_px_size, src_px_size) \
_lv_rgb888_blend_normal_to_rgb888_with_opa_helium(dsc, dst_px_size, src_px_size) _lv_rgb888_blend_normal_to_rgb888_with_opa_arm2d(dsc, dst_px_size, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_MASK #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_MASK
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_MASK(dsc, dst_px_size, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_WITH_MASK(dsc, dst_px_size, src_px_size) \
_lv_rgb888_blend_normal_to_rgb888_with_mask_helium(dsc, dst_px_size, src_px_size) _lv_rgb888_blend_normal_to_rgb888_with_mask_arm2d(dsc, dst_px_size, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA #ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size, src_px_size) \ #define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size, src_px_size) \
_lv_rgb888_blend_normal_to_rgb888_mix_mask_opa_helium(dsc, dst_px_size, src_px_size) _lv_rgb888_blend_normal_to_rgb888_mix_mask_opa_arm2d(dsc, dst_px_size, src_px_size)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888 #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888(dsc, dst_px_size) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888(dsc, dst_px_size) \
_lv_argb8888_blend_normal_to_rgb888_helium(dsc, dst_px_size) _lv_argb8888_blend_normal_to_rgb888_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_OPA #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_OPA
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_OPA(dsc, dst_px_size) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_OPA(dsc, dst_px_size) \
_lv_argb8888_blend_normal_to_rgb888_with_opa_helium(dsc, dst_px_size) _lv_argb8888_blend_normal_to_rgb888_with_opa_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_MASK #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_MASK
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_MASK(dsc, dst_px_size) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_WITH_MASK(dsc, dst_px_size) \
_lv_argb8888_blend_normal_to_rgb888_with_mask_helium(dsc, dst_px_size) _lv_argb8888_blend_normal_to_rgb888_with_mask_arm2d(dsc, dst_px_size)
#endif #endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA #ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size) \ #define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_RGB888_MIX_MASK_OPA(dsc, dst_px_size) \
_lv_argb8888_blend_normal_to_rgb888_mix_mask_opa_helium(dsc, dst_px_size) _lv_argb8888_blend_normal_to_rgb888_mix_mask_opa_arm2d(dsc, dst_px_size)
#endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888
#define LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888(dsc) \
_lv_color_blend_to_argb8888_helium(dsc)
#endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888_WITH_OPA
#define LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888_WITH_OPA(dsc) \
_lv_color_blend_to_argb8888_with_opa_helium(dsc)
#endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888_WITH_MASK
#define LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888_WITH_MASK(dsc) \
_lv_color_blend_to_argb8888_with_mask_helium(dsc)
#endif
#ifndef LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888_MIX_MASK_OPA
#define LV_DRAW_SW_COLOR_BLEND_TO_ARGB8888_MIX_MASK_OPA(dsc) \
_lv_color_blend_to_argb8888_mix_mask_opa_helium(dsc)
#endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888(dsc) \
_lv_rgb565_blend_normal_to_argb8888_helium(dsc)
#endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888_WITH_OPA
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888_WITH_OPA(dsc) \
_lv_rgb565_blend_normal_to_argb8888_with_opa_helium(dsc)
#endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888_WITH_MASK
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888_WITH_MASK(dsc) \
_lv_rgb565_blend_normal_to_argb8888_with_mask_helium(dsc)
#endif
#ifndef LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888_MIX_MASK_OPA
#define LV_DRAW_SW_RGB565_BLEND_NORMAL_TO_ARGB8888_MIX_MASK_OPA(dsc) \
_lv_rgb565_blend_normal_to_argb8888_mix_mask_opa_helium(dsc)
#endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_argb8888_helium(dsc, src_px_size)
#endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888_WITH_OPA
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888_WITH_OPA(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_argb8888_with_opa_helium(dsc, src_px_size)
#endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888_WITH_MASK
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888_WITH_MASK(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_argb8888_with_mask_helium(dsc, src_px_size)
#endif
#ifndef LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888_MIX_MASK_OPA
#define LV_DRAW_SW_RGB888_BLEND_NORMAL_TO_ARGB8888_MIX_MASK_OPA(dsc, src_px_size) \
_lv_rgb888_blend_normal_to_argb8888_mix_mask_opa_helium(dsc, src_px_size)
#endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888(dsc) \
_lv_argb8888_blend_normal_to_argb8888_helium(dsc)
#endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888_WITH_OPA
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888_WITH_OPA(dsc) \
_lv_argb8888_blend_normal_to_argb8888_with_opa_helium(dsc)
#endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888_WITH_MASK
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888_WITH_MASK(dsc) \
_lv_argb8888_blend_normal_to_argb8888_with_mask_helium(dsc)
#endif
#ifndef LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888_MIX_MASK_OPA
#define LV_DRAW_SW_ARGB8888_BLEND_NORMAL_TO_ARGB8888_MIX_MASK_OPA(dsc) \
_lv_argb8888_blend_normal_to_argb8888_mix_mask_opa_helium(dsc)
#endif #endif
/********************** /**********************
@ -281,7 +201,7 @@ extern "C" {
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
static inline lv_result_t _lv_color_blend_to_rgb565_helium(_lv_draw_sw_blend_fill_dsc_t * dsc) static inline lv_result_t _lv_color_blend_to_rgb565_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t stride = (dsc->dest_stride) / sizeof(uint16_t); int16_t stride = (dsc->dest_stride) / sizeof(uint16_t);
@ -292,7 +212,7 @@ static inline lv_result_t _lv_color_blend_to_rgb565_helium(_lv_draw_sw_blend_fil
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_rgb565_with_opa_helium(_lv_draw_sw_blend_fill_dsc_t * dsc) static inline lv_result_t _lv_color_blend_to_rgb565_with_opa_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t stride = (dsc->dest_stride) / sizeof(uint16_t); int16_t stride = (dsc->dest_stride) / sizeof(uint16_t);
@ -304,7 +224,7 @@ static inline lv_result_t _lv_color_blend_to_rgb565_with_opa_helium(_lv_draw_sw_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_rgb565_with_mask_helium(_lv_draw_sw_blend_fill_dsc_t * dsc) static inline lv_result_t _lv_color_blend_to_rgb565_with_mask_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t stride = (dsc->dest_stride) / sizeof(uint16_t); int16_t stride = (dsc->dest_stride) / sizeof(uint16_t);
@ -317,7 +237,7 @@ static inline lv_result_t _lv_color_blend_to_rgb565_with_mask_helium(_lv_draw_sw
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_rgb565_mix_mask_opa_helium(_lv_draw_sw_blend_fill_dsc_t * dsc) static inline lv_result_t _lv_color_blend_to_rgb565_mix_mask_opa_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t stride = (dsc->dest_stride) / sizeof(uint16_t); int16_t stride = (dsc->dest_stride) / sizeof(uint16_t);
@ -331,7 +251,7 @@ static inline lv_result_t _lv_color_blend_to_rgb565_mix_mask_opa_helium(_lv_draw
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
@ -345,7 +265,7 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_helium(_lv_draw_sw_b
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_with_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -359,7 +279,7 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_with_opa_helium(_lv_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_with_mask_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -375,7 +295,7 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_with_mask_helium(_lv
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_mix_mask_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -398,8 +318,8 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb565_mix_mask_opa_helium(
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size) uint32_t src_px_size)
{ {
if(src_px_size == 3) { if(src_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -418,8 +338,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_helium(_lv_draw_sw_b
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_with_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size) uint32_t src_px_size)
{ {
if(src_px_size == 3) { if(src_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -451,8 +371,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_with_opa_helium(_lv_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_with_mask_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size) uint32_t src_px_size)
{ {
if(src_px_size == 3) { if(src_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -486,8 +406,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_with_mask_helium(_lv
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_mix_mask_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size) uint32_t src_px_size)
{ {
if(src_px_size == 3) { if(src_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -527,7 +447,7 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb565_mix_mask_opa_helium(
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -557,7 +477,7 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_helium(_lv_draw_sw
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_with_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -605,7 +525,7 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_with_opa_helium(_l
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_with_mask_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -655,7 +575,7 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_with_mask_helium(_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc) static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_mix_mask_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h}; arm_2d_size_t draw_size = {dsc->dest_w, dsc->dest_h};
int16_t des_stride = dsc->dest_stride / sizeof(uint16_t); int16_t des_stride = dsc->dest_stride / sizeof(uint16_t);
@ -706,7 +626,7 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb565_mix_mask_opa_heliu
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_rgb888_helium(_lv_draw_sw_blend_fill_dsc_t * dsc, uint32_t dst_px_size) static inline lv_result_t _lv_color_blend_to_rgb888_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc, uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -721,8 +641,8 @@ static inline lv_result_t _lv_color_blend_to_rgb888_helium(_lv_draw_sw_blend_fil
} }
static inline lv_result_t _lv_color_blend_to_rgb888_with_opa_helium(_lv_draw_sw_blend_fill_dsc_t * dsc, static inline lv_result_t _lv_color_blend_to_rgb888_with_opa_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -738,8 +658,8 @@ static inline lv_result_t _lv_color_blend_to_rgb888_with_opa_helium(_lv_draw_sw_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_rgb888_with_mask_helium(_lv_draw_sw_blend_fill_dsc_t * dsc, static inline lv_result_t _lv_color_blend_to_rgb888_with_mask_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -757,8 +677,8 @@ static inline lv_result_t _lv_color_blend_to_rgb888_with_mask_helium(_lv_draw_sw
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_rgb888_mix_mask_opa_helium(_lv_draw_sw_blend_fill_dsc_t * dsc, static inline lv_result_t _lv_color_blend_to_rgb888_mix_mask_opa_arm2d(_lv_draw_sw_blend_fill_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -777,8 +697,8 @@ static inline lv_result_t _lv_color_blend_to_rgb888_mix_mask_opa_helium(_lv_draw
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -799,8 +719,8 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_helium(_lv_draw_sw_b
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_with_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -834,8 +754,8 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_with_opa_helium(_lv_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_with_mask_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -870,8 +790,8 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_with_mask_helium(_lv
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_mix_mask_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -912,9 +832,9 @@ static inline lv_result_t _lv_rgb565_blend_normal_to_rgb888_mix_mask_opa_helium(
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size, uint32_t dst_px_size,
uint32_t src_px_size) uint32_t src_px_size)
{ {
if((dst_px_size == 3) || (src_px_size == 3)) { if((dst_px_size == 3) || (src_px_size == 3)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -933,8 +853,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_helium(_lv_draw_sw_b
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_with_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size, uint32_t src_px_size) uint32_t dst_px_size, uint32_t src_px_size)
{ {
if((dst_px_size == 3) || (src_px_size == 3)) { if((dst_px_size == 3) || (src_px_size == 3)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -954,8 +874,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_with_opa_helium(_lv_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_with_mask_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size, uint32_t src_px_size) uint32_t dst_px_size, uint32_t src_px_size)
{ {
if((dst_px_size == 3) || (src_px_size == 3)) { if((dst_px_size == 3) || (src_px_size == 3)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -976,8 +896,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_with_mask_helium(_lv
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_mix_mask_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size, uint32_t src_px_size) uint32_t dst_px_size, uint32_t src_px_size)
{ {
if((dst_px_size == 3) || (src_px_size == 3)) { if((dst_px_size == 3) || (src_px_size == 3)) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -1004,8 +924,8 @@ static inline lv_result_t _lv_rgb888_blend_normal_to_rgb888_mix_mask_opa_helium(
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -1028,8 +948,8 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_helium(_lv_draw_sw
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_with_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -1068,8 +988,8 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_with_opa_helium(_l
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_with_mask_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
@ -1095,8 +1015,8 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_with_mask_helium(_
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc, static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_mix_mask_opa_arm2d(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t dst_px_size) uint32_t dst_px_size)
{ {
if(dst_px_size == 3) { if(dst_px_size == 3) {
return LV_RESULT_INVALID; return LV_RESULT_INVALID;
@ -1127,307 +1047,6 @@ static inline lv_result_t _lv_argb8888_blend_normal_to_rgb888_mix_mask_opa_heliu
return LV_RESULT_OK; return LV_RESULT_OK;
} }
static inline lv_result_t _lv_color_blend_to_argb8888_helium(_lv_draw_sw_blend_fill_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = &dsc->color
};
lv_color_blend_to_argb8888_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_color_blend_to_argb8888_with_opa_helium(_lv_draw_sw_blend_fill_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = &dsc->color
};
lv_color_blend_to_argb8888_with_opa_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_color_blend_to_argb8888_with_mask_helium(_lv_draw_sw_blend_fill_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = &dsc->color,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
lv_color_blend_to_argb8888_with_mask_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_color_blend_to_argb8888_mix_mask_opa_helium(_lv_draw_sw_blend_fill_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = &dsc->color,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
lv_color_blend_to_argb8888_mix_mask_opa_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb565_blend_normal_to_argb8888_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride
};
lv_rgb565_blend_normal_to_argb8888_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb565_blend_normal_to_argb8888_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride
};
lv_rgb565_blend_normal_to_argb8888_with_opa_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb565_blend_normal_to_argb8888_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
lv_rgb565_blend_normal_to_argb8888_with_mask_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb565_blend_normal_to_argb8888_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
lv_rgb565_blend_normal_to_argb8888_mix_mask_opa_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb888_blend_normal_to_argb8888_helium(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride
};
if(src_px_size == 3) {
lv_rgb888_blend_normal_to_argb8888_helium(&asm_dsc);
}
else {
lv_xrgb8888_blend_normal_to_argb8888_helium(&asm_dsc);
}
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb888_blend_normal_to_argb8888_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride
};
if(src_px_size == 3) {
lv_rgb888_blend_normal_to_argb8888_with_opa_helium(&asm_dsc);
}
else {
lv_xrgb8888_blend_normal_to_argb8888_with_opa_helium(&asm_dsc);
}
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb888_blend_normal_to_argb8888_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
if(src_px_size == 3) {
lv_rgb888_blend_normal_to_argb8888_with_mask_helium(&asm_dsc);
}
else {
lv_xrgb8888_blend_normal_to_argb8888_with_mask_helium(&asm_dsc);
}
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_rgb888_blend_normal_to_argb8888_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc,
uint32_t src_px_size)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
if(src_px_size == 3) {
lv_rgb888_blend_normal_to_argb8888_mix_mask_opa_helium(&asm_dsc);
}
else {
lv_xrgb8888_blend_normal_to_argb8888_mix_mask_opa_helium(&asm_dsc);
}
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_argb8888_blend_normal_to_argb8888_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride
};
lv_argb8888_blend_normal_to_argb8888_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_argb8888_blend_normal_to_argb8888_with_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride
};
lv_argb8888_blend_normal_to_argb8888_with_opa_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_argb8888_blend_normal_to_argb8888_with_mask_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
lv_argb8888_blend_normal_to_argb8888_with_mask_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
static inline lv_result_t _lv_argb8888_blend_normal_to_argb8888_mix_mask_opa_helium(_lv_draw_sw_blend_image_dsc_t * dsc)
{
#if 0
asm_dsc_t asm_dsc = {
.opa = dsc->opa,
.dst_buf = dsc->dest_buf,
.dst_w = dsc->dest_w,
.dst_h = dsc->dest_h,
.dst_stride = dsc->dest_stride,
.src_buf = dsc->src_buf,
.src_stride = dsc->src_stride,
.mask_buf = dsc->mask_buf,
.mask_stride = dsc->mask_stride
};
lv_argb8888_blend_normal_to_argb8888_mix_mask_opa_helium(&asm_dsc);
#endif
return LV_RESULT_INVALID;
}
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/

View File

@ -1,58 +0,0 @@
/**
* @file lv_blend_arm2d.h
*
*/
#ifndef LV_BLEND_HELIUM_H
#define LV_BLEND_HELIUM_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../../../../lv_conf_internal.h"
/* detect whether helium is available based on arm compilers' standard */
#if defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE
#ifdef LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE
#include LV_DRAW_SW_HELIUM_CUSTOM_INCLUDE
#endif
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/*********************
* POST INCLUDES
*********************/
/* use arm-2d as the default helium acceleration */
#include "lv_blend_arm2d.h"
#endif /* defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE */
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_BLEND_HELIUM_H*/

View File

@ -0,0 +1,473 @@
/**
* @file lv_blend_helium.S
*
*/
#ifndef __ASSEMBLY__
#define __ASSEMBLY__
#endif
#include "lv_blend_helium.h"
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM && defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE && LV_USE_NATIVE_HELIUM_ASM
.data
reciprocal:
.byte 0xFF, 0xE2, 0xCC, 0xB9, 0xAA, 0x9C, 0x91, 0x88
.text
.syntax unified
.altmacro
.p2align 2
TMP .req r0
DST_ADDR .req r1
DST_W .req r2
DST_H .req r3
DST_STRIDE .req r4
SRC_ADDR .req r5
SRC_STRIDE .req r6
MASK_ADDR .req r7
MASK_STRIDE .req r8
H .req r9
OPA .req r10
RCP .req r11
S_B .qn q0
S_G .qn q1
S_R .qn q2
S_A .qn q3
D_B .qn q4
D_G .qn q5
D_R .qn q6
D_A .qn q7
N .qn q0
V .qn q1
R .qn q2
L .qn q4
.macro conv_888_to_565 reg
vsri.8 reg&_R, reg&_G, #5
vshr.u8 reg&_G, reg&_G, #2
vshr.u8 reg&_B, reg&_B, #3
vsli.8 reg&_B, reg&_G, #5
.endm
@ 16bpp is stored on R & B
.macro ldst op, bpp, mem, reg, areg, cvt, alt_index, wb
.if bpp == 0
.if (reg == S) || (wb&1) @ exclude reg == D and !
ldr TMP, [mem&_ADDR]
vdup.8 reg&_B, TMP
lsr TMP, #8
vdup.8 reg&_G, TMP
lsr TMP, #8
vdup.8 reg&_R, TMP
.if cvt && (wb&1)
conv_888_to_565 reg
.endif
.endif
.elseif bpp == 8
v&op&rb.8 reg&_A, [mem&_ADDR], #16
.elseif bpp == 16
.if cvt && (op == st)
conv_888_to_565 reg
.endif
.if alt_index
v&op&rb.8 reg&_B, [mem&_ADDR, areg&_A]
add mem&_ADDR, #1
v&op&rb.8 reg&_R, [mem&_ADDR, areg&_A]
.else
v&op&rb.8 reg&_B, [mem&_ADDR, reg&_A]
add mem&_ADDR, #1
v&op&rb.8 reg&_R, [mem&_ADDR, reg&_A]
.endif
.if cvt && (op == ld)
vshl.u8 reg&_G, reg&_R, #5
vsri.u8 reg&_G, reg&_B, #3
vshl.u8 reg&_B, reg&_B, #3
vsri.u8 reg&_R, reg&_R, #5
vsri.u8 reg&_G, reg&_G, #6
vsri.u8 reg&_B, reg&_B, #5
.endif
.if wb&0
add mem&_ADDR, #31
.else
sub mem&_ADDR, #1
.endif
.elseif bpp >= 24
.if alt_index || (bpp >= 31)
v&op&rb.8 reg&_B, [mem&_ADDR, areg&_A]
add mem&_ADDR, #1
v&op&rb.8 reg&_G, [mem&_ADDR, areg&_A]
add mem&_ADDR, #1
v&op&rb.8 reg&_R, [mem&_ADDR, areg&_A]
.else
v&op&rb.8 reg&_B, [mem&_ADDR, reg&_A]
add mem&_ADDR, #1
v&op&rb.8 reg&_G, [mem&_ADDR, reg&_A]
add mem&_ADDR, #1
v&op&rb.8 reg&_R, [mem&_ADDR, reg&_A]
.endif
.if (bpp == 32) || (bpp == 31) && (op == st)
add mem&_ADDR, #1
v&op&rb.8 reg&_A, [mem&_ADDR, areg&_A]
.endif
.if wb&0
.if bpp == 24
add mem&_ADDR, #46
.elseif (bpp == 32) || (bpp == 31) && (op == st)
add mem&_ADDR, #61
.else
add mem&_ADDR, #62
.endif
.else
.if (bpp == 32) || (bpp == 31) && (op == st)
sub mem&_ADDR, #3
.else
sub mem&_ADDR, #2
.endif
.endif
.endif
.endm
.macro load_index bpp, reg, areg
.if bpp > 0
mov TMP, #0
.endif
.if bpp == 8
vidup.u8 reg&_A, TMP, #1
.elseif bpp == 16
vidup.u8 reg&_A, TMP, #2
.elseif bpp == 24
vidup.u8 reg&_A, TMP, #1
mov TMP, #3
vmul.i8 reg&_A, reg&_A, TMP
.elseif bpp >= 31
vidup.u8 areg&_A, TMP, #4
.endif
.endm
.macro init src_bpp, dst_bpp, mask, opa
ldr DST_ADDR, [r0, #4]
ldr DST_W, [r0, #8]
ldr DST_H, [r0, #12]
ldr DST_STRIDE, [r0, #16]
ldr SRC_ADDR, [r0, #20]
.if src_bpp > 0
ldr SRC_STRIDE, [r0, #24]
.endif
.if mask
ldr MASK_ADDR, [r0, #28]
ldr MASK_STRIDE, [r0, #32]
.endif
.if opa
ldr OPA, [r0]
.else
mov OPA, #0xFF
.endif
add TMP, DST_W, #0xF
bic TMP, TMP, #0xF
.if dst_bpp == 32
ldr RCP, =(reciprocal - 8)
.endif
.if dst_bpp == 16
sub DST_STRIDE, DST_STRIDE, TMP, lsl #1
.elseif dst_bpp == 24
sub DST_STRIDE, DST_STRIDE, TMP
sub DST_STRIDE, DST_STRIDE, TMP, lsl #1
.elseif dst_bpp >= 31
sub DST_STRIDE, DST_STRIDE, TMP, lsl #2
.endif
.if mask
sub MASK_STRIDE, MASK_STRIDE, TMP
.endif
.if src_bpp == 0
.if mask || opa
ldst ld, src_bpp, SRC, S, D, 0, 0
vmov.u8 S_A, #0xFF
.else
ldst ld, src_bpp, SRC, D, S, (dst_bpp == 16), 0
vmov.u8 D_A, #0xFF
.endif
.else
.if src_bpp == 16
sub SRC_STRIDE, SRC_STRIDE, TMP, lsl #1
.elseif src_bpp == 24
sub SRC_STRIDE, SRC_STRIDE, TMP
sub SRC_STRIDE, SRC_STRIDE, TMP, lsl #1
.elseif src_bpp >= 31
sub SRC_STRIDE, SRC_STRIDE, TMP, lsl #2
.endif
.endif
.if (src_bpp < 32) && (mask == 0) && (opa == 0)
.if (src_bpp == 31) || (dst_bpp < 31)
load_index src_bpp, S, S
.endif
.if (dst_bpp < 31) && (dst_bpp != src_bpp)
load_index dst_bpp, D, D
.else
load_index dst_bpp, S, S
vmov.u8 D_A, #0xFF
.endif
.endif
.endm
.macro vqrdmulh_u8 Qd, Qn, Qm @ 1 bit precision loss
vmulh.u8 Qd, Qn, Qm
vqshl.u8 Qd, Qd, #1
.endm
.macro premult mem, alpha
vrmulh.u8 mem&_B, mem&_B, alpha
vrmulh.u8 mem&_G, mem&_G, alpha
vrmulh.u8 mem&_R, mem&_R, alpha
.endm
.macro blend src_bpp, dst_bpp, mask, opa, mode
.if (mask == 0) && (opa == 2) && (dst_bpp < 32)
vhadd.u8 D_B, D_B, S_B
vhadd.u8 D_G, D_G, S_G
vhadd.u8 D_R, D_R, S_R
.else
.if dst_bpp < 32
vmvn D_A, S_A
premult S, S_A
premult D, D_A
.else
vpush {d0-d5}
vmvn N, S_A
vmvn D_A, D_A
vrmulh.u8 D_A, N, D_A
vmvn D_A, D_A @ D_A = 255 - LV_OPA_MIX2(255 - fg.alpha, 255 - bg.alpha)
vclz.i8 N, D_A @ n = clz(D_A)
vshl.u8 V, D_A, N @ v = D_A << n
vshl.u8 S_A, S_A, N
vshr.u8 N, V, #4 @ N is used as tmp from now on
vldrb.u8 R, [RCP, N] @ r = reciprocal[(v >> 4) - 8]
vrmulh.u8 N, V, R @ r = newton(v,r)
vmvn N, N @ = vqrdmulh.u8(vmvn(vrmulh(v, r)), r)
vqrdmulh_u8 R, N, R @ but vqrdmulh does not support u8, so we implement one
vrmulh.u8 N, V, R @ and do it twice
vmvn N, N
vqrdmulh_u8 R, N, R
vqrdmulh_u8 S_A, S_A, R @ S_A' = S_A * 255 / D_A = vrdmulh(S_A << n, r)
vpop {d0-d5}
premult S, S_A
vmvn S_A, S_A
premult D, S_A
.endif
vqadd.u8 D_B, D_B, S_B
vqadd.u8 D_G, D_G, S_G
vqadd.u8 D_R, D_R, S_R
.endif
.if dst_bpp == 31
vmov.u8 D_A, #0xFF
.endif
.endm
.macro blend_line src_bpp, dst_bpp, mask, opa, mode
wlstp.8 lr, DST_W, 1f
2:
.if (src_bpp < 32) && (mask == 0) && (opa == 0)
@ no blend
@ dst index: db < 31 ? (db == sb ? S : D) : S
@ src index: sb < 31 && db >= 31 ? D(reload) : S
.if (src_bpp < 31) && (dst_bpp >= 31)
load_index src_bpp, D, D
.endif
.if src_bpp == 0
ldst st, dst_bpp, DST, D, S, 0, 0, !
.elseif (src_bpp == dst_bpp) || (src_bpp == 31) && (dst_bpp == 32)
.if dst_bpp < 31
.if src_bpp < 31
ldst ld, src_bpp, SRC, D, S, 0, 1, !
.else
ldst ld, src_bpp, SRC, D, S, 0, 0, !
.endif
ldst st, dst_bpp, DST, D, S, 0, 1, !
.else
ldst ld, src_bpp, SRC, D, S, 0, 0, !
ldst st, dst_bpp, DST, D, S, 0, 0, !
.endif
.else
.if (dst_bpp < 31) && (src_bpp < 31)
ldst ld, src_bpp, SRC, D, S, 1, 1, !
.else
ldst ld, src_bpp, SRC, D, S, 1, 0, !
.endif
.if (src_bpp < 31) && (dst_bpp >= 31)
vmov.u8 D_A, #0xFF
.endif
ldst st, dst_bpp, DST, D, S, 1, 0, !
.endif
.elseif src_bpp < 32
@ no src_a
load_index src_bpp, S, D
ldst ld, src_bpp, SRC, S, D, 1, 0, !
load_index dst_bpp, D, S
ldst ld, dst_bpp, DST, D, S, 1, 0
.if mask
ldst ld, 8, MASK, S, D, 1, 0, !
.if opa == 2
vshr.u8 S_A, S_A, #1
.elseif opa == 1
.if dst_bpp == 32
vpush {d14-d15}
.endif
vdup.8 D_A, OPA
vrmulh.u8 S_A, S_A, D_A
.if dst_bpp == 32
vpop {d14-d15}
.endif
.endif
.elseif opa == 1
vdup.8 S_A, OPA
.endif
blend src_bpp, dst_bpp, mask, opa, mode
.if (dst_bpp == 32) || mask || (opa == 1)
load_index dst_bpp, D, S
.endif
ldst st, dst_bpp, DST, D, S, 1, 0, !
.else
@ src_a (+mask) (+opa)
load_index dst_bpp, D, S
ldst ld, dst_bpp, DST, D, S, 1, 0
.if dst_bpp == 32
vpush {d14-d15}
.endif
load_index src_bpp, S, D
ldst ld, src_bpp, SRC, S, D, 1, 0, !
.if mask == 0
.if opa
vdup.8 D_A, OPA
vrmulh.u8 S_A, S_A, D_A
.endif
.else
ldst ld, 8, MASK, D, S, 1, 0, !
vrmulh.u8 S_A, S_A, D_A
.if opa
vdup.8 D_A, OPA
vrmulh.u8 S_A, S_A, D_A
.endif
.endif
.if dst_bpp == 32
vpop {d14-d15}
.endif
blend src_bpp, dst_bpp, mask, opa, mode
load_index dst_bpp, D, S
ldst st, dst_bpp, DST, D, S, 1, 0, !
.endif
letp lr, 2b
1:
.endm
.macro enter
push {r4-r11, lr}
vpush {d8-d15}
.endm
.macro exit
vpop {d8-d15}
pop {r4-r11, pc}
.endm
.macro preload mem, bpp
.if bpp >= 31
pld [mem&_ADDR, DST_W, lsl #2]
.elseif bpp == 24
add TMP, DST_W, DST_W, lsl #1
pld [mem&_ADDR, TMP]
.elseif bpp == 16
pld [mem&_ADDR, DST_W, lsl #1]
.elseif bpp == 8
pld [mem&_ADDR, DST_W]
.endif
.endm
.macro next src_bpp, mask
add DST_ADDR, DST_ADDR, DST_STRIDE
.if src_bpp > 0
add SRC_ADDR, SRC_ADDR, SRC_STRIDE
.endif
.if mask
add MASK_ADDR, MASK_ADDR, MASK_STRIDE
.endif
.endm
.macro blender src_bpp, dst_bpp, mask, opa, mode
enter
init src_bpp, dst_bpp, mask, opa
movs H, DST_H
beq 0f
preload SRC, src_bpp
.if mask || opa || (src_bpp == 32)
preload DST, dst_bpp
.endif
.if opa && (src_bpp < 32) && (dst_bpp < 32)
4:
@ 50% OPA can be accelerated (OPA == 0x7F/0x80)
add TMP, OPA, #1
tst TMP, #0x7E
bne 3f
blend_line src_bpp, dst_bpp, mask, 2, mode
next src_bpp, mask
subs H, #1
bne 4b
b 0f
.endif
3:
blend_line src_bpp, dst_bpp, mask, opa, mode
next src_bpp, mask
subs H, #1
bne 3b
0:
exit
.ltorg
.endm
.macro export name, src_bpp, dst_bpp, mask, opa, mode
.thumb_func
.func name
.global name
name&:
blender src_bpp, dst_bpp, mask, opa, mode
.endfunc
.endm
.macro export_set src, dst, src_bpp, dst_bpp, mode
.if src == color
export lv_&src&_blend_to_&dst&_helium, src_bpp, dst_bpp, 0, 0, mode
export lv_&src&_blend_to_&dst&_with_opa_helium, src_bpp, dst_bpp, 0, 1, mode
export lv_&src&_blend_to_&dst&_with_mask_helium, src_bpp, dst_bpp, 1, 0, mode
export lv_&src&_blend_to_&dst&_mix_mask_opa_helium, src_bpp, dst_bpp, 1, 1, mode
.else
export lv_&src&_blend_&mode&_to_&dst&_helium, src_bpp, dst_bpp, 0, 0, mode
export lv_&src&_blend_&mode&_to_&dst&_with_opa_helium, src_bpp, dst_bpp, 0, 1, mode
export lv_&src&_blend_&mode&_to_&dst&_with_mask_helium, src_bpp, dst_bpp, 1, 0, mode
export lv_&src&_blend_&mode&_to_&dst&_mix_mask_opa_helium, src_bpp, dst_bpp, 1, 1, mode
.endif
.endm
export_set color, rgb565, 0, 16, normal
export_set rgb565, rgb565, 16, 16, normal
export_set rgb888, rgb565, 24, 16, normal
export_set xrgb8888, rgb565, 31, 16, normal
export_set argb8888, rgb565, 32, 16, normal
export_set color, rgb888, 0, 24, normal
export_set rgb565, rgb888, 16, 24, normal
export_set rgb888, rgb888, 24, 24, normal
export_set xrgb8888, rgb888, 31, 24, normal
export_set argb8888, rgb888, 32, 24, normal
export_set color, xrgb8888, 0, 31, normal
export_set rgb565, xrgb8888, 16, 31, normal
export_set rgb888, xrgb8888, 24, 31, normal
export_set xrgb8888, xrgb8888, 31, 31, normal
export_set argb8888, xrgb8888, 32, 31, normal
export_set color, argb8888, 0, 32, normal
export_set rgb565, argb8888, 16, 32, normal
export_set rgb888, argb8888, 24, 32, normal
export_set xrgb8888, argb8888, 31, 32, normal
export_set argb8888, argb8888, 32, 32, normal
#endif /*LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM && defined(__ARM_FEATURE_MVE) && __ARM_FEATURE_MVE && LV_USE_NATIVE_HELIUM_ASM*/

File diff suppressed because it is too large Load Diff

View File

@ -93,6 +93,11 @@ void lv_draw_sw_blend(lv_draw_unit_t * draw_unit, const lv_draw_sw_blend_dsc_t *
return; return;
} }
if(blend_dsc->mask_area && !_lv_area_intersect(&blend_area, &blend_area, blend_dsc->mask_area)) {
LV_PROFILER_END;
return;
}
_lv_draw_sw_blend_image_dsc_t image_dsc; _lv_draw_sw_blend_image_dsc_t image_dsc;
image_dsc.dest_w = lv_area_get_width(&blend_area); image_dsc.dest_w = lv_area_get_width(&blend_area);
image_dsc.dest_h = lv_area_get_height(&blend_area); image_dsc.dest_h = lv_area_get_height(&blend_area);

View File

@ -19,7 +19,7 @@
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON
#include "neon/lv_blend_neon.h" #include "neon/lv_blend_neon.h"
#elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM
#include "arm2d/lv_blend_helium.h" #include "helium/lv_blend_helium.h"
#elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM
#include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE
#endif #endif
@ -44,20 +44,21 @@ typedef struct {
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc); static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc,
const uint8_t src_px_size);
LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc); static void /* LV_ATTRIBUTE_FAST_MEM */ argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM static inline lv_color32_t lv_color_32_32_mix(lv_color32_t fg, lv_color32_t bg, static inline lv_color32_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color_32_32_mix(lv_color32_t fg, lv_color32_t bg,
lv_color_mix_alpha_cache_t * cache); lv_color_mix_alpha_cache_t * cache);
static void lv_color_mix_with_alpha_cache_init(lv_color_mix_alpha_cache_t * cache); static void lv_color_mix_with_alpha_cache_init(lv_color_mix_alpha_cache_t * cache);
LV_ATTRIBUTE_FAST_MEM static inline void blend_non_normal_pixel(lv_color32_t * dest, lv_color32_t src, static inline void /* LV_ATTRIBUTE_FAST_MEM */ blend_non_normal_pixel(lv_color32_t * dest, lv_color32_t src,
lv_blend_mode_t mode, lv_color_mix_alpha_cache_t * cache); lv_blend_mode_t mode, lv_color_mix_alpha_cache_t * cache);
LV_ATTRIBUTE_FAST_MEM static inline void * drawbuf_next_row(const void * buf, uint32_t stride); static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride);
/********************** /**********************
* STATIC VARIABLES * STATIC VARIABLES
@ -135,7 +136,7 @@ LV_ATTRIBUTE_FAST_MEM static inline void * drawbuf_next_row(const void * buf, ui
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_color_to_argb8888(_lv_draw_sw_blend_fill_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_blend_color_to_argb8888(_lv_draw_sw_blend_fill_dsc_t * dsc)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -244,7 +245,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_color_to_argb8888(_lv_draw_sw_blend_
} }
} }
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_image_to_argb8888(_lv_draw_sw_blend_image_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_blend_image_to_argb8888(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
switch(dsc->src_color_format) { switch(dsc->src_color_format) {
case LV_COLOR_FORMAT_RGB565: case LV_COLOR_FORMAT_RGB565:
@ -269,7 +270,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_image_to_argb8888(_lv_draw_sw_blend_
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc) static void LV_ATTRIBUTE_FAST_MEM rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -364,7 +365,7 @@ LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc
} }
} }
LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
@ -482,7 +483,7 @@ LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc
} }
} }
LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc) static void LV_ATTRIBUTE_FAST_MEM argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -570,7 +571,7 @@ LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_d
} }
} }
LV_ATTRIBUTE_FAST_MEM static inline lv_color32_t lv_color_32_32_mix(lv_color32_t fg, lv_color32_t bg, static inline lv_color32_t LV_ATTRIBUTE_FAST_MEM lv_color_32_32_mix(lv_color32_t fg, lv_color32_t bg,
lv_color_mix_alpha_cache_t * cache) lv_color_mix_alpha_cache_t * cache)
{ {
/*Pick the foreground if it's fully opaque or the Background is fully transparent*/ /*Pick the foreground if it's fully opaque or the Background is fully transparent*/
@ -619,7 +620,7 @@ void lv_color_mix_with_alpha_cache_init(lv_color_mix_alpha_cache_t * cache)
cache->ratio_saved = 255; cache->ratio_saved = 255;
} }
LV_ATTRIBUTE_FAST_MEM static inline void blend_non_normal_pixel(lv_color32_t * dest, lv_color32_t src, static inline void LV_ATTRIBUTE_FAST_MEM blend_non_normal_pixel(lv_color32_t * dest, lv_color32_t src,
lv_blend_mode_t mode, lv_color_mix_alpha_cache_t * cache) lv_blend_mode_t mode, lv_color_mix_alpha_cache_t * cache)
{ {
lv_color32_t res; lv_color32_t res;
@ -647,7 +648,7 @@ LV_ATTRIBUTE_FAST_MEM static inline void blend_non_normal_pixel(lv_color32_t * d
*dest = lv_color_32_32_mix(res, *dest, cache); *dest = lv_color_32_32_mix(res, *dest, cache);
} }
LV_ATTRIBUTE_FAST_MEM static inline void * drawbuf_next_row(const void * buf, uint32_t stride) static inline void * LV_ATTRIBUTE_FAST_MEM drawbuf_next_row(const void * buf, uint32_t stride)
{ {
return (void *)((uint8_t *)buf + stride); return (void *)((uint8_t *)buf + stride);
} }

View File

@ -28,9 +28,9 @@ extern "C" {
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_color_to_argb8888(_lv_draw_sw_blend_fill_dsc_t * dsc); void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_color_to_argb8888(_lv_draw_sw_blend_fill_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_image_to_argb8888(_lv_draw_sw_blend_image_dsc_t * dsc); void /* LV_ATTRIBUTE_FAST_MEM */ lv_draw_sw_blend_image_to_argb8888(_lv_draw_sw_blend_image_dsc_t * dsc);
/********************** /**********************
* MACROS * MACROS

View File

@ -19,7 +19,7 @@
#if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON #if LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_NEON
#include "neon/lv_blend_neon.h" #include "neon/lv_blend_neon.h"
#elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_HELIUM
#include "arm2d/lv_blend_helium.h" #include "helium/lv_blend_helium.h"
#elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM #elif LV_USE_DRAW_SW_ASM == LV_DRAW_SW_ASM_CUSTOM
#include LV_DRAW_SW_ASM_CUSTOM_INCLUDE #include LV_DRAW_SW_ASM_CUSTOM_INCLUDE
#endif #endif
@ -36,15 +36,16 @@
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc); static void /* LV_ATTRIBUTE_FAST_MEM */ rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size); static void /* LV_ATTRIBUTE_FAST_MEM */ rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc,
const uint8_t src_px_size);
LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc); static void /* LV_ATTRIBUTE_FAST_MEM */ argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc);
LV_ATTRIBUTE_FAST_MEM static inline uint16_t lv_color_24_16_mix(const uint8_t * c1, uint16_t c2, uint8_t mix); static inline uint16_t /* LV_ATTRIBUTE_FAST_MEM */ lv_color_24_16_mix(const uint8_t * c1, uint16_t c2, uint8_t mix);
LV_ATTRIBUTE_FAST_MEM static inline void * drawbuf_next_row(const void * buf, uint32_t stride); static inline void * /* LV_ATTRIBUTE_FAST_MEM */ drawbuf_next_row(const void * buf, uint32_t stride);
/********************** /**********************
* STATIC VARIABLES * STATIC VARIABLES
@ -135,7 +136,7 @@ LV_ATTRIBUTE_FAST_MEM static inline void * drawbuf_next_row(const void * buf, ui
* @param mask * @param mask
* @param mask_stride * @param mask_stride
*/ */
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_color_to_rgb565(_lv_draw_sw_blend_fill_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_blend_color_to_rgb565(_lv_draw_sw_blend_fill_dsc_t * dsc)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -244,32 +245,22 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_color_to_rgb565(_lv_draw_sw_blend_fi
/*Masked with full opacity*/ /*Masked with full opacity*/
else if(mask && opa >= LV_OPA_MAX) { else if(mask && opa >= LV_OPA_MAX) {
if(LV_RESULT_INVALID == LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_MASK(dsc)) { if(LV_RESULT_INVALID == LV_DRAW_SW_COLOR_BLEND_TO_RGB565_WITH_MASK(dsc)) {
uint32_t c32 = color16 + ((uint32_t)color16 << 16);
for(y = 0; y < h; y++) { for(y = 0; y < h; y++) {
for(x = 0; x < w && ((lv_uintptr_t)(mask) & 0x3); x++) { x = 0;
if((lv_uintptr_t)(mask) & 0x1) {
dest_buf_u16[x] = lv_color_16_16_mix(color16, dest_buf_u16[x], mask[x]); dest_buf_u16[x] = lv_color_16_16_mix(color16, dest_buf_u16[x], mask[x]);
x++;
} }
for(; x <= w - 4; x += 4) { for(; x <= w - 2; x += 2) {
uint32_t mask32 = *((uint32_t *)&mask[x]); uint16_t mask16 = *((uint16_t *)&mask[x]);
if(mask32 == 0xFFFFFFFF) { if(mask16 == 0xFFFF) {
if((lv_uintptr_t)&dest_buf_u16[x] & 0x3) { dest_buf_u16[x + 0] = color16;
dest_buf_u16[x] = color16; dest_buf_u16[x + 1] = color16;
uint32_t * d32 = (uint32_t *)(&dest_buf_u16[x + 1]);
*d32 = c32;
dest_buf_u16[x + 3] = color16;
}
else {
uint32_t * dest32 = (uint32_t *)&dest_buf_u16[x];
dest32[0] = c32;
dest32[1] = c32;
}
} }
else if(mask32) { else if(mask16 != 0) {
dest_buf_u16[x + 0] = lv_color_16_16_mix(color16, dest_buf_u16[x + 0], mask[x + 0]); dest_buf_u16[x + 0] = lv_color_16_16_mix(color16, dest_buf_u16[x + 0], mask[x + 0]);
dest_buf_u16[x + 1] = lv_color_16_16_mix(color16, dest_buf_u16[x + 1], mask[x + 1]); dest_buf_u16[x + 1] = lv_color_16_16_mix(color16, dest_buf_u16[x + 1], mask[x + 1]);
dest_buf_u16[x + 2] = lv_color_16_16_mix(color16, dest_buf_u16[x + 2], mask[x + 2]);
dest_buf_u16[x + 3] = lv_color_16_16_mix(color16, dest_buf_u16[x + 3], mask[x + 3]);
} }
} }
@ -296,7 +287,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_color_to_rgb565(_lv_draw_sw_blend_fi
} }
} }
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_image_to_rgb565(_lv_draw_sw_blend_image_dsc_t * dsc) void LV_ATTRIBUTE_FAST_MEM lv_draw_sw_blend_image_to_rgb565(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
switch(dsc->src_color_format) { switch(dsc->src_color_format) {
case LV_COLOR_FORMAT_RGB565: case LV_COLOR_FORMAT_RGB565:
@ -321,7 +312,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_blend_image_to_rgb565(_lv_draw_sw_blend_im
* STATIC FUNCTIONS * STATIC FUNCTIONS
**********************/ **********************/
LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc) static void LV_ATTRIBUTE_FAST_MEM rgb565_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -429,7 +420,7 @@ LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc
} }
} }
LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size) static void LV_ATTRIBUTE_FAST_MEM rgb888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc, const uint8_t src_px_size)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -514,7 +505,7 @@ LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc
case LV_BLEND_MODE_MULTIPLY: case LV_BLEND_MODE_MULTIPLY:
res = ((dest_buf_c16[dest_x].red * (src_buf_u8[src_x + 2] >> 3)) >> 5) << 11; res = ((dest_buf_c16[dest_x].red * (src_buf_u8[src_x + 2] >> 3)) >> 5) << 11;
res += ((dest_buf_c16[dest_x].green * (src_buf_u8[src_x + 1] >> 2)) >> 6) << 5; res += ((dest_buf_c16[dest_x].green * (src_buf_u8[src_x + 1] >> 2)) >> 6) << 5;
res += (dest_buf_c16[dest_x].blue * (src_buf_u8[src_x + 1] >> 3)) >> 5; res += (dest_buf_c16[dest_x].blue * (src_buf_u8[src_x + 0] >> 3)) >> 5;
break; break;
default: default:
LV_LOG_WARN("Not supported blend mode: %d", dsc->blend_mode); LV_LOG_WARN("Not supported blend mode: %d", dsc->blend_mode);
@ -537,7 +528,7 @@ LV_ATTRIBUTE_FAST_MEM static void rgb888_image_blend(_lv_draw_sw_blend_image_dsc
} }
} }
LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc) static void LV_ATTRIBUTE_FAST_MEM argb8888_image_blend(_lv_draw_sw_blend_image_dsc_t * dsc)
{ {
int32_t w = dsc->dest_w; int32_t w = dsc->dest_w;
int32_t h = dsc->dest_h; int32_t h = dsc->dest_h;
@ -650,7 +641,7 @@ LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_d
} }
} }
LV_ATTRIBUTE_FAST_MEM static inline uint16_t lv_color_24_16_mix(const uint8_t * c1, uint16_t c2, uint8_t mix) static inline uint16_t LV_ATTRIBUTE_FAST_MEM lv_color_24_16_mix(const uint8_t * c1, uint16_t c2, uint8_t mix)
{ {
if(mix == 0) { if(mix == 0) {
return c2; return c2;
@ -667,7 +658,7 @@ LV_ATTRIBUTE_FAST_MEM static inline uint16_t lv_color_24_16_mix(const uint8_t *
} }
} }
LV_ATTRIBUTE_FAST_MEM static inline void * drawbuf_next_row(const void * buf, uint32_t stride) static inline void * LV_ATTRIBUTE_FAST_MEM drawbuf_next_row(const void * buf, uint32_t stride)
{ {
return (void *)((uint8_t *)buf + stride); return (void *)((uint8_t *)buf + stride);
} }

Some files were not shown because too many files have changed in this diff Show More