diff --git a/configs/ax620a_lvgl_gui_defconfig b/configs/ax620a_lvgl_gui_defconfig index 3b89f1910..9728c0eeb 100644 --- a/configs/ax620a_lvgl_gui_defconfig +++ b/configs/ax620a_lvgl_gui_defconfig @@ -17,6 +17,7 @@ CONFIG_LVGL_BENCHMARK_TEST=y # CONFIG_LVGL_KEYPAD_ENCODER_TEST is not set # CONFIG_LVGL_MULTILANG_TEST is not set # CONFIG_LVGL_TRANSFORM_TEST is not set +# CONFIG_LVGL_RENDER_TEST is not set CONFIG_LIBDRM=y # CONFIG_LIBDRM_TOOLS is not set diff --git a/configs/host_lvgl_gui_defconfig b/configs/host_lvgl_gui_defconfig index f95f871f2..f59f6e3e3 100644 --- a/configs/host_lvgl_gui_defconfig +++ b/configs/host_lvgl_gui_defconfig @@ -14,6 +14,7 @@ CONFIG_LVGL=y # CONFIG_LVGL_STRESS_TEST is not set CONFIG_LVGL_BENCHMARK_TEST=y # CONFIG_LVGL_KEYPAD_ENCODER_TEST is not set +# CONFIG_LVGL_RENDER_TEST is not set CONFIG_DRM_DISP_DRIVER=y # CONFIG_X11_DISP_DRIVER is not set diff --git a/configs/imx6ull_lvgl_gui_defconfig b/configs/imx6ull_lvgl_gui_defconfig index 4910080c5..e262d0f8f 100644 --- a/configs/imx6ull_lvgl_gui_defconfig +++ b/configs/imx6ull_lvgl_gui_defconfig @@ -17,6 +17,7 @@ CONFIG_LVGL_BENCHMARK_TEST=y # CONFIG_LVGL_KEYPAD_ENCODER_TEST is not set # CONFIG_LVGL_MULTILANG_TEST is not set # CONFIG_LVGL_TRANSFORM_TEST is not set +# CONFIG_LVGL_RENDER_TEST is not set CONFIG_LIBDRM=y # CONFIG_LIBDRM_TOOLS is not set diff --git a/configs/rv11xx_lvgl_gui_defconfig b/configs/rv11xx_lvgl_gui_defconfig index fde12debc..94ade3e9c 100644 --- a/configs/rv11xx_lvgl_gui_defconfig +++ b/configs/rv11xx_lvgl_gui_defconfig @@ -17,6 +17,7 @@ CONFIG_LVGL_BENCHMARK_TEST=y # CONFIG_LVGL_KEYPAD_ENCODER_TEST is not set # CONFIG_LVGL_MULTILANG_TEST is not set # CONFIG_LVGL_TRANSFORM_TEST is not set +# CONFIG_LVGL_RENDER_TEST is not set CONFIG_LIBDRM=y # CONFIG_LIBDRM_TOOLS is not set diff --git a/project/entry/gui_demo/awtk/res/assets/default/inc/ui/images.data b/project/entry/gui_demo/awtk/res/assets/default/inc/ui/images.data index 070231377..74db3f527 100644 --- a/project/entry/gui_demo/awtk/res/assets/default/inc/ui/images.data +++ b/project/entry/gui_demo/awtk/res/assets/default/inc/ui/images.data @@ -1,5 +1,5 @@ TK_CONST_DATA_ALIGN(const unsigned char ui_images[]) = { -0x04,0x00,0x01,0x01,0x03,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x73,0x00,0x00, +0x04,0x00,0x01,0x01,0x06,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x73,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, @@ -309,16 +309,55 @@ TK_CONST_DATA_ALIGN(const unsigned char ui_images[]) = { 0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65, 0x66,0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29, 0x00,0x74,0x65,0x78,0x74,0x00,0x70,0x61,0x74,0x63,0x68,0x33,0x5f,0x79,0x5f,0x73,0x63,0x61,0x6c,0x65, -0x5f,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x62,0x61,0x72,0x5f,0x64, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66, -0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x72,0x69, -0x67,0x68,0x74,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x32,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29, -0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x30,0x00,0x00,0x00, -0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x19,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74, -0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d, -0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x32,0x35,0x25,0x2c,0x68,0x3d,0x33,0x30, -0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c, -0x6f,0x73,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*6451*/ +0x5f,0x78,0x00,0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x74,0x79,0x6c,0x65, +0x00,0x65,0x6d,0x70,0x74,0x79,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f, +0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x3d,0x31,0x2c,0x63,0x3d,0x33,0x2c,0x73, +0x3d,0x32,0x2c,0x6d,0x3d,0x32,0x29,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x74,0x79, +0x6c,0x65,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x69,0x6d,0x61,0x67, +0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x67,0x23,0x78,0x79,0x77,0x68,0x28,0x30,0x2c,0x30, +0x2c,0x31,0x30,0x36,0x2c,0x35,0x34,0x29,0x00,0x64,0x72,0x61,0x77,0x5f,0x74,0x79,0x70,0x65,0x00,0x63, +0x65,0x6e,0x74,0x65,0x72,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f, +0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,0x31,0x30,0x30, +0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x74,0x65,0x78,0x74,0x00,0x70,0x61,0x63,0x6b,0x65, +0x64,0x20,0x63,0x65,0x6e,0x74,0x65,0x72,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x73,0x74,0x79,0x6c,0x65,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x69, +0x6d,0x61,0x67,0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x67,0x23,0x67,0x72,0x69,0x64,0x28, +0x34,0x2c,0x33,0x2c,0x30,0x2c,0x32,0x29,0x00,0x64,0x72,0x61,0x77,0x5f,0x74,0x79,0x70,0x65,0x00,0x64, +0x65,0x66,0x61,0x75,0x6c,0x74,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66, +0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x77,0x3d,0x31,0x30, +0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x74,0x65,0x78,0x74,0x00,0x70,0x61,0x63,0x6b, +0x65,0x64,0x20,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x00,0x00,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x69,0x6d,0x61,0x67,0x65, +0x00,0x69,0x6d,0x61,0x67,0x65,0x5f,0x70,0x61,0x63,0x6b,0x65,0x64,0x5f,0x66,0x67,0x23,0x78,0x79,0x77, +0x68,0x28,0x31,0x30,0x36,0x2c,0x30,0x2c,0x31,0x30,0x36,0x2c,0x35,0x34,0x29,0x00,0x64,0x72,0x61,0x77, +0x5f,0x74,0x79,0x70,0x65,0x00,0x73,0x63,0x61,0x6c,0x65,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00, +0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74, +0x28,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x74,0x65,0x78,0x74, +0x00,0x70,0x61,0x63,0x6b,0x65,0x64,0x20,0x73,0x63,0x61,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x73, +0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x62,0x61,0x72,0x5f,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c, +0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64, +0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x72,0x69,0x67,0x68,0x74,0x2c,0x79,0x3d,0x30,0x2c,0x77, +0x3d,0x31,0x32,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72, +0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x30,0x00,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x00,0x00,0x00,0x1e,0x00,0x00,0x00, +0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28, +0x78,0x3d,0x63,0x65,0x6e,0x74,0x65,0x72,0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30, +0x2c,0x77,0x3d,0x32,0x35,0x25,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c, +0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,0x6f,0x73,0x65,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,};/*7222*/ diff --git a/project/entry/gui_demo/awtk/res/assets/default/raw/ui/images.bin b/project/entry/gui_demo/awtk/res/assets/default/raw/ui/images.bin index 7778b4d49..f5885942b 100644 Binary files a/project/entry/gui_demo/awtk/res/assets/default/raw/ui/images.bin and b/project/entry/gui_demo/awtk/res/assets/default/raw/ui/images.bin differ diff --git a/project/entry/gui_demo/lvgl/Kconfig b/project/entry/gui_demo/lvgl/Kconfig index 225753411..fb5b5287a 100644 --- a/project/entry/gui_demo/lvgl/Kconfig +++ b/project/entry/gui_demo/lvgl/Kconfig @@ -34,6 +34,9 @@ choice config LVGL_SCROLL_TEST bool "LittlevGL scroll test" + + config LVGL_RENDER_TEST + bool "LittlevGL render test" endchoice endmenu diff --git a/project/entry/gui_demo/lvgl/Makefile b/project/entry/gui_demo/lvgl/Makefile index f9f58f294..fa1dfcf3e 100644 --- a/project/entry/gui_demo/lvgl/Makefile +++ b/project/entry/gui_demo/lvgl/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_LVGL_MUSIC_TEST) += music/ obj-$(CONFIG_LVGL_STRESS_TEST) += stress/ obj-$(CONFIG_LVGL_WIDGET_TEST) += widget/ obj-$(CONFIG_LVGL_SCROLL_TEST) += scroll/ +obj-$(CONFIG_LVGL_RENDER_TEST) += render/ obj-$(CONFIG_LVGL_TRANSFORM_TEST) += transform/ obj-$(CONFIG_LVGL_MULTILANG_TEST) += multilang/ obj-$(CONFIG_LVGL_BENCHMARK_TEST) += benchmark/ diff --git a/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_12_compr_az.c b/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_12_compr_az.c index 4cfdc3c02..a75ccbbe1 100755 --- a/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_12_compr_az.c +++ b/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_12_compr_az.c @@ -17,7 +17,7 @@ *----------------*/ /*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { /* U+20 " " */ /* U+61 "a" */ @@ -283,7 +283,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = /*Store all the custom data of the font*/ static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, + .glyph_bitmap = glyph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .kern_dsc = &kern_classes, diff --git a/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_16_compr_az.c b/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_16_compr_az.c index 9499622ca..9f5120008 100755 --- a/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_16_compr_az.c +++ b/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_16_compr_az.c @@ -17,7 +17,7 @@ *----------------*/ /*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { /* U+20 " " */ /* U+61 "a" */ @@ -321,7 +321,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = /*Store all the custom data of the font*/ static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, + .glyph_bitmap = glyph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .kern_dsc = &kern_classes, diff --git a/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_28_compr_az.c b/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_28_compr_az.c index b282e5712..79959746d 100755 --- a/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_28_compr_az.c +++ b/project/entry/gui_demo/lvgl/benchmark/assets/lv_font_montserrat_28_compr_az.c @@ -17,7 +17,7 @@ *----------------*/ /*Store the image of the glyphs*/ -static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap[] = { +static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = { /* U+20 " " */ /* U+61 "a" */ @@ -471,7 +471,7 @@ static const lv_font_fmt_txt_kern_classes_t kern_classes = /*Store all the custom data of the font*/ static lv_font_fmt_txt_dsc_t font_dsc = { - .glyph_bitmap = gylph_bitmap, + .glyph_bitmap = glyph_bitmap, .glyph_dsc = glyph_dsc, .cmaps = cmaps, .kern_dsc = &kern_classes, diff --git a/project/entry/gui_demo/lvgl/benchmark/benchmark.c b/project/entry/gui_demo/lvgl/benchmark/benchmark.c index e5b011ea5..f4a61a2b5 100644 --- a/project/entry/gui_demo/lvgl/benchmark/benchmark.c +++ b/project/entry/gui_demo/lvgl/benchmark/benchmark.c @@ -1,1156 +1,584 @@ #include "benchmark.h" #include +#include -#if LV_USE_DEMO_BENCHMARK - -#define RND_NUM 64 -#define SCENE_TIME 1000 -#define RENDER_REPEAT_CNT 50 -#define ANIM_TIME_MIN ((2 * SCENE_TIME) / 10) -#define ANIM_TIME_MAX (SCENE_TIME) -#define OBJ_NUM 8 -#define OBJ_SIZE_MIN (LV_MAX(LV_DPI_DEF / 20, 5)) -#define OBJ_SIZE_MAX (LV_HOR_RES / 2) -#define RADIUS LV_MAX(LV_DPI_DEF / 15, 2) -#define BORDER_WIDTH LV_MAX(LV_DPI_DEF / 40, 1) -#define SHADOW_WIDTH_SMALL LV_MAX(LV_DPI_DEF / 15, 5) -#define SHADOW_OFS_X_SMALL LV_MAX(LV_DPI_DEF / 20, 2) -#define SHADOW_OFS_Y_SMALL LV_MAX(LV_DPI_DEF / 20, 2) -#define SHADOW_SPREAD_SMALL LV_MAX(LV_DPI_DEF / 30, 2) -#define SHADOW_WIDTH_LARGE LV_MAX(LV_DPI_DEF / 5, 10) -#define SHADOW_OFS_X_LARGE LV_MAX(LV_DPI_DEF / 10, 5) -#define SHADOW_OFS_Y_LARGE LV_MAX(LV_DPI_DEF / 10, 5) -#define SHADOW_SPREAD_LARGE LV_MAX(LV_DPI_DEF / 30, 2) -#define IMG_WIDH 100 -#define IMG_HEIGHT 100 -#define IMG_NUM LV_MAX((LV_HOR_RES * LV_VER_RES) / 5 / IMG_WIDH / IMG_HEIGHT, 1) -#define IMG_ZOOM_MIN 128 -#define IMG_ZOOM_MAX (256 + 64) -#define TXT "hello world\nit is a multi line text to test\nthe performance of text rendering" -#define LINE_WIDTH LV_MAX(LV_DPI_DEF / 50, 2) -#define LINE_POINT_NUM 16 -#define LINE_POINT_DIFF_MIN (LV_DPI_DEF / 10) -#define LINE_POINT_DIFF_MAX LV_MAX(LV_HOR_RES / (LINE_POINT_NUM + 2), LINE_POINT_DIFF_MIN * 2) -#define ARC_WIDTH_THIN LV_MAX(LV_DPI_DEF / 50, 2) -#define ARC_WIDTH_THICK LV_MAX(LV_DPI_DEF / 10, 5) - -#ifndef dimof -#define dimof(__array) (sizeof(__array) / sizeof(__array[0])) -#endif +/********************** + * TYPEDEFS + **********************/ typedef struct { - const char *name; + const char * name; void (*create_cb)(void); - uint32_t time_sum_normal; - uint32_t time_sum_opa; - uint32_t refr_cnt_normal; - uint32_t refr_cnt_opa; - uint32_t fps_normal; - uint32_t fps_opa; - uint8_t weight; + uint32_t scene_time; } scene_dsc_t; -static lv_demo_benchmark_mode_t mode; -static uint32_t disp_ori_timer_period; -static uint32_t anim_ori_timer_period; - -static lv_style_t style_common; -static bool scene_with_opa = true; -static uint32_t render_start_time; -static uint32_t last_flush_cb_call; +/********************** + * STATIC PROTOTYPES + **********************/ -static void (*flush_cb_ori)(lv_display_t *, const lv_area_t *, uint8_t *); +static void load_scene(uint32_t scene); +static void next_scene_timer_cb(lv_timer_t * timer); -static void fall_anim(lv_obj_t *obj); -static void txt_create(lv_style_t *style); -static void arc_create(lv_style_t *style); -static void line_create(lv_style_t *style); -static void rect_create(lv_style_t *style); -static void img_create(lv_style_t *style, const void * src, bool rotate, bool zoom, bool aa); +#if LV_USE_PERF_MONITOR + static void sysmon_perf_observer_cb(lv_subject_t * subject, lv_observer_t * observer); +#endif static void rnd_reset(void); static int32_t rnd_next(int32_t min, int32_t max); +static void shake_anim_y_cb(void * var, int32_t v); +static void shake_anim(lv_obj_t * obj, lv_coord_t y_max); +static void scroll_anim(lv_obj_t * obj, lv_coord_t y_max); +static void scroll_anim_y_cb(void * var, int32_t v); +static void color_anim_cb(void * var, int32_t v); +static void color_anim(lv_obj_t * obj); +static void arc_anim(lv_obj_t * obj); -static void benchmark_init(void); -static void show_scene_report(void); -static lv_result_t load_next_scene(void); -static void calc_scene_statistics(void); -static void benchmark_event_remove(void); -static void benchmark_event_cb(lv_event_t *e); -static void next_scene_timer_cb(lv_timer_t *timer); -static void single_scene_finsih_timer_cb(lv_timer_t *timer); - -static void generate_report(void); -static void dummy_flush_cb(lv_display_t *drv, const lv_area_t *area, uint8_t *pxmap); - -static void rectangle_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_bg_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - rect_create(&style_common); -} - -static void rectangle_rounded_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - rect_create(&style_common); -} +static lv_obj_t * card_create(void); -static void rectangle_circle_cb(void) +static void empty_screen_cb(void) { - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, LV_RADIUS_CIRCLE); - lv_style_set_bg_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - rect_create(&style_common); + color_anim(lv_screen_active()); } -static void border_cb(void) +static void moving_wallpaper_cb(void) { - lv_style_reset(&style_common); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - rect_create(&style_common); -} + lv_obj_set_style_pad_all(lv_screen_active(), 0, 0); + LV_IMG_DECLARE(img_benchmark_cogwheel_rgb); -static void border_rounded_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - rect_create(&style_common); + lv_obj_t * img = lv_img_create(lv_screen_active()); + lv_obj_set_size(img, lv_pct(150), lv_pct(150)); + lv_img_set_src(img, &img_benchmark_cogwheel_rgb); + shake_anim(img, - lv_display_get_vertical_resolution(NULL) / 3); } -static void border_circle_cb(void) +static void single_rectangle_cb(void) { - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, LV_RADIUS_CIRCLE); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - rect_create(&style_common); -} + lv_obj_t * obj = lv_obj_create(lv_screen_active()); + lv_obj_remove_style_all(obj); + lv_obj_set_style_bg_opa(obj, LV_OPA_COVER, 0); + lv_obj_center(obj); + lv_obj_set_size(obj, lv_pct(30), lv_pct(30)); -static void border_top_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_border_side(&style_common, LV_BORDER_SIDE_TOP); - rect_create(&style_common); -} + color_anim(obj); -static void border_left_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_border_side(&style_common, LV_BORDER_SIDE_LEFT); - rect_create(&style_common); } -static void border_top_left_cb(void) +static void multiple_rectangles_cb(void) { - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_border_side(&style_common, LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_TOP); - rect_create(&style_common); -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_SPACE_EVENLY); -static void border_left_right_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_border_side(&style_common, LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_RIGHT); - rect_create(&style_common); -} + uint32_t i; + for(i = 0; i < 9; i++) { + lv_obj_t * obj = lv_obj_create(lv_screen_active()); + lv_obj_remove_style_all(obj); + lv_obj_set_style_bg_opa(obj, LV_OPA_COVER, 0); + lv_obj_set_size(obj, lv_pct(25), lv_pct(25)); -static void border_top_bottom_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_border_side(&style_common, LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_BOTTOM); - rect_create(&style_common); + color_anim(obj); + } } -static void shadow_small_cb(void) +static void multiple_rgb_images_cb(void) { - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, LV_OPA_COVER); - lv_style_set_shadow_opa(&style_common, scene_with_opa ? LV_OPA_80 : LV_OPA_COVER); - lv_style_set_shadow_width(&style_common, SHADOW_WIDTH_SMALL); - rect_create(&style_common); -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); + lv_obj_set_style_pad_row(lv_screen_active(), 20, 0); -static void shadow_small_ofs_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, LV_OPA_COVER); - lv_style_set_shadow_opa(&style_common, scene_with_opa ? LV_OPA_80 : LV_OPA_COVER); - lv_style_set_shadow_width(&style_common, SHADOW_WIDTH_SMALL); - lv_style_set_shadow_ofs_x(&style_common, SHADOW_OFS_X_SMALL); - lv_style_set_shadow_ofs_y(&style_common, SHADOW_OFS_Y_SMALL); - lv_style_set_shadow_spread(&style_common, SHADOW_SPREAD_SMALL); - rect_create(&style_common); -} + LV_IMG_DECLARE(img_benchmark_cogwheel_rgb); + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 116; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 116) / 116; -static void shadow_large_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, LV_OPA_COVER); - lv_style_set_shadow_opa(&style_common, scene_with_opa ? LV_OPA_80 : LV_OPA_COVER); - lv_style_set_shadow_width(&style_common, SHADOW_WIDTH_LARGE); - rect_create(&style_common); -} + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * obj = lv_img_create(lv_screen_active()); + lv_image_set_src(obj, &img_benchmark_cogwheel_rgb); + if(x == 0) lv_obj_add_flag(obj, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); -static void shadow_large_ofs_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, LV_OPA_COVER); - lv_style_set_shadow_opa(&style_common, scene_with_opa ? LV_OPA_80 : LV_OPA_COVER); - lv_style_set_shadow_width(&style_common, SHADOW_WIDTH_LARGE); - lv_style_set_shadow_ofs_x(&style_common, SHADOW_OFS_X_LARGE); - lv_style_set_shadow_ofs_y(&style_common, SHADOW_OFS_Y_LARGE); - lv_style_set_shadow_spread(&style_common, SHADOW_SPREAD_LARGE); - rect_create(&style_common); + shake_anim(obj, 80); + } + } } -static void img_rgb_cb(void) +static void multiple_argb_images_cb(void) { - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_rgb, false, false, false); -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); + lv_obj_set_style_pad_row(lv_screen_active(), 20, 0); -static void img_argb_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + LV_IMG_DECLARE(img_benchmark_cogwheel_argb); + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 116; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 116) / 116; -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false); -#endif -} + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * obj = lv_img_create(lv_screen_active()); + lv_image_set_src(obj, &img_benchmark_cogwheel_argb); + if(x == 0) lv_obj_add_flag(obj, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); -static void img_index_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_indexed16, false, false, false); + shake_anim(obj, 80); + } + } } -static void img_alpha_cb(void) +static void rotated_argb_image_cb(void) { - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_alpha256, false, false, false); -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); + lv_obj_set_style_pad_row(lv_screen_active(), 20, 0); -static void img_rgb_recolor_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_image_recolor_opa(&style_common, LV_OPA_50); - img_create(&style_common, &img_benchmark_cogwheel_rgb, false, false, false); -} -static void img_argb_recolor_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_image_recolor_opa(&style_common, LV_OPA_50); + LV_IMG_DECLARE(img_benchmark_cogwheel_argb); + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 116; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 116) / 116; -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false); -#endif -} + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * obj = lv_img_create(lv_screen_active()); + lv_image_set_src(obj, &img_benchmark_cogwheel_argb); + if(x == 0) lv_obj_add_flag(obj, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); -static void img_index_recolor_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_image_recolor_opa(&style_common, LV_OPA_50); - img_create(&style_common, &img_benchmark_cogwheel_indexed16, false, false, false); + lv_image_set_rotation(obj, lv_rand(100, 3500)); + shake_anim(obj, 80); + } + } } -static void img_rgb_rot_cb(void) +static void multiple_labels_cb(void) { - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_rgb, true, false, false); -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); + lv_obj_set_style_pad_row(lv_screen_active(), 80, 0); -static void img_rgb_rot_aa_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_rgb, true, false, true); -} + lv_point_t s; + lv_text_get_size(&s, "Hello LVGL!", lv_obj_get_style_text_font(lv_screen_active(), 0), 0, 0, LV_COORD_MAX, + LV_TEXT_FLAG_NONE); -static void img_argb_rot_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + uint32_t cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / (s.x + 30); + cnt = cnt * ((lv_display_get_vertical_resolution(NULL) - 200) / (s.y + 50)); -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, false); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, true, false, false); -#endif + uint32_t i; + for(i = 0; i < cnt; i++) { + lv_obj_t * obj = lv_label_create(lv_screen_active()); + lv_label_set_text(obj, "Hello LVGL!"); + color_anim(obj); + } } -static void img_argb_rot_aa_cb(void) +static void screen_sized_text_cb(void) { - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + const char * txt = + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec rhoncus arcu, in consectetur orci. Sed vitae dolor sed nisi ultrices vehicula quis ac dolor. Vivamus hendrerit hendrerit lectus, sed tempus velit suscipit in. Fusce eu tristique arcu. Sed et molestie leo, in lacinia nunc. Quisque semper lorem sed ante feugiat, at molestie risus blandit. Maecenas lobortis urna in diam feugiat porta. Ut facilisis mauris eget nibh posuere aliquet. Proin facilisis egestas magna, id vulputate massa bibendum a. Etiam gravida metus non egestas suscipit. Sed sollicitudin mollis nisi, eu fringilla leo vestibulum posuere. Donec et ex nulla. Phasellus et ornare justo, vel hendrerit justo. Curabitur pulvinar nunc sed tincidunt dignissim. Praesent eleifend lectus velit, id malesuada ante placerat id. Fusce massa erat, egestas vel venenatis eu, tempus nec est.\n\n" + "Phasellus iaculis malesuada molestie. Cras ullamcorper justo a dolor dignissim tincidunt. Mauris euismod risus quis lobortis mollis. Ut vitae placerat massa, aliquet various lectus. Nulla ac ornare purus, quis auctor velit. Donec posuere dolor rhoncus efficitur dictum. Integer venenatis aliquet nunc eu convallis. Nunc quis various velit. Suspendisse enim metus, molestie eget mauris sit amet, euismod volutpat turpis. Duis rhoncus commodo gravida. Pellentesque velit mi, dictum id consequat placerat, condimentum ac elit. Duis aliquet leo eu dolor cursus rhoncus. Quisque aliquam sapien ut purus hendrerit laoreet. Ut venenatis venenatis risus, a vestibulum enim lobortis a. Maecenas auctor tortor lorem, quis laoreet nulla aliquet a. Sed ipsum lorem, facilisis in congue a, dictum ut ligula.\n\n" + "Aliquam id tellus in enim hendrerit mattis. Sed ipsum arcu, feugiat sed eros quis, vulputate facilisis turpis. Quisque venenatis risus massa. Proin lacinia, nunc non ultrices commodo, ligula dolor lobortis lectus, iaculis pulvinar metus orci eu elit. Donec tincidunt lacinia semper. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec vitae odio risus. Donec sodales sed nulla sit amet iaculis. Duis lacinia mauris dictum, fermentum nibh eget, convallis tellus. Sed congue luctus purus non scelerisque. Etiam fermentum lacus mauris, at bibendum nunc aliquam at. Vivamus accumsan vestibulum pharetra. Proin rhoncus nisi purus, vel blandit metus auctor eget. Fusce dictum sed lectus sed aliquam. Praesent lobortis quam sed pretium tincidunt.\n\n" + "Integer vehicula vestibulum eros. Donec facilisis magna a est cursus, sed posuere velit faucibus. In et ultrices lorem. Sed et lacus finibus, vulputate odio et, finibus tellus. Aenean finibus nibh vehicula elementum maximus. Maecenas in luctus tortor, vitae ullamcorper lacus. Ut nulla elit, aliquam at vestibulum ut, pellentesque non justo.\n\n" + "Fusce dignissim turpis massa, eget semper purus semper at. Ut et augue vitae metus laoreet auctor. Morbi tincidunt, neque vel tincidunt interdum, sapien nibh finibus lorem, eu eleifend diam ipsum et eros. Duis iaculis vulputate lacinia. Phasellus id mauris sed magna gravida suscipit. Sed aliquet tincidunt ante ac posuere. In vestibulum quam ultricies, ultricies arcu eu, aliquam sapien. Phasellus sollicitudin velit facilisis, dignissim nisi sed, pellentesque magna."; -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, true); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, true, false, true); -#endif -} + lv_obj_t * scr = lv_screen_active(); -static void img_rgb_zoom_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_rgb, false, true, false); -} - -static void img_rgb_zoom_aa_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - img_create(&style_common, &img_benchmark_cogwheel_rgb, false, true, true); -} + lv_obj_t * obj = lv_label_create(scr); + lv_obj_set_width(obj, lv_pct(100)); + lv_label_set_text(obj, txt); -static void img_argb_zoom_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_obj_update_layout(obj); -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, false); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, false, true, false); -#endif + scroll_anim(scr, lv_obj_get_scroll_bottom(scr)); } -static void img_argb_zoom_aa_cb(void) +static void multiple_arcs_cb(void) { - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, true); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, false, true, true); -#endif -} + LV_IMG_DECLARE(img_benchmark_cogwheel_argb); + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / lv_dpx(160); + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 16) / lv_dpx(160); -static void txt_small_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, lv_theme_get_font_small(NULL)); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - txt_create(&style_common); -} + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { -static void txt_medium_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, lv_theme_get_font_normal(NULL)); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - txt_create(&style_common); -} + lv_obj_t * obj = lv_arc_create(lv_screen_active()); + if(x == 0) lv_obj_add_flag(obj, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); + lv_obj_set_size(obj, lv_dpx(100), lv_dpx(100)); + lv_obj_center(obj); -static void txt_large_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, lv_theme_get_font_large(NULL)); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - txt_create(&style_common); -} + lv_arc_set_bg_angles(obj, 0, 360); -#if LV_USE_FONT_COMPRESSED -static void txt_small_compr_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, &lv_font_benchmark_montserrat_12_compr_az); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - txt_create(&style_common); -} - -static void txt_medium_compr_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, &lv_font_benchmark_montserrat_16_compr_az); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - txt_create(&style_common); -} - -static void txt_large_compr_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, &lv_font_benchmark_montserrat_28_compr_az); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - txt_create(&style_common); -} -#endif - -static void line_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_line_width(&style_common, LINE_WIDTH); - lv_style_set_line_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - line_create(&style_common); + lv_obj_set_style_margin_all(obj, lv_dpx(20), 0); + lv_obj_set_style_arc_opa(obj, 0, LV_PART_MAIN); + lv_obj_set_style_bg_opa(obj, 0, LV_PART_KNOB); + lv_obj_set_style_arc_width(obj, 10, LV_PART_INDICATOR); + lv_obj_set_style_arc_rounded(obj, false, LV_PART_INDICATOR); + lv_obj_set_style_arc_color(obj, lv_color_hex3(lv_rand(0x00f, 0xff0)), LV_PART_INDICATOR); + arc_anim(obj); + } + } } -static void arc_thin_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_arc_width(&style_common, ARC_WIDTH_THIN); - lv_style_set_arc_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - arc_create(&style_common); -} -static void arc_thick_cb(void) +static void containers_cb(void) { - lv_style_reset(&style_common); - lv_style_set_arc_width(&style_common, ARC_WIDTH_THICK); - lv_style_set_arc_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - arc_create(&style_common); -} -static void sub_rectangle_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); - rect_create(&style_common); -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); -static void sub_border_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_border_width(&style_common, BORDER_WIDTH); - lv_style_set_border_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); - rect_create(&style_common); -} + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 300; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 16) / 150; -static void sub_shadow_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_radius(&style_common, RADIUS); - lv_style_set_bg_opa(&style_common, LV_OPA_COVER); - lv_style_set_shadow_opa(&style_common, scene_with_opa ? LV_OPA_80 : LV_OPA_COVER); - lv_style_set_shadow_width(&style_common, SHADOW_WIDTH_SMALL); - lv_style_set_shadow_spread(&style_common, SHADOW_WIDTH_SMALL); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); - rect_create(&style_common); + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * card = card_create(); + if(x == 0) lv_obj_add_flag(card, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); + shake_anim(card, 30); + } + } } -static void sub_image_cb(void) +static void containers_with_overlay_cb(void) { - lv_style_reset(&style_common); - lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); -#if LV_DEMO_BENCHMARK_RGB565A8 && (LV_COLOR_DEPTH == 16) - img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false); -#else - img_create(&style_common, &img_benchmark_cogwheel_argb, false, false, false); -#endif -} + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 300; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 16) / 150; -static void sub_line_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_line_width(&style_common, LINE_WIDTH); - lv_style_set_line_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); - line_create(&style_common); -} + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * card = card_create(); + if(x == 0) lv_obj_add_flag(card, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); + shake_anim(card, 30); + } + } -static void sub_arc_cb(void) -{ - lv_style_reset(&style_common); - lv_style_set_arc_width(&style_common, ARC_WIDTH_THICK); - lv_style_set_arc_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); - arc_create(&style_common); + lv_obj_set_style_bg_opa(lv_layer_top(), LV_OPA_50, 0); + color_anim(lv_layer_top()); } -static void sub_text_cb(void) +static void containers_with_opa_cb(void) { - lv_style_reset(&style_common); - lv_style_set_text_font(&style_common, lv_theme_get_font_normal(NULL)); - lv_style_set_text_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER); - lv_style_set_blend_mode(&style_common, LV_BLEND_MODE_SUBTRACTIVE); - txt_create(&style_common); -} - -static scene_dsc_t scenes[] = { - {.name = "Rectangle", .create_cb = rectangle_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 30}, - {.name = "Rectangle rounded", .create_cb = rectangle_rounded_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - {.name = "Circle", .create_cb = rectangle_circle_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Border", .create_cb = border_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - {.name = "Border rounded", .create_cb = border_rounded_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 30}, - {.name = "Circle border", .create_cb = border_circle_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Border top", .create_cb = border_top_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - {.name = "Border left", .create_cb = border_left_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - {.name = "Border top + left", .create_cb = border_top_left_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - {.name = "Border left + right", .create_cb = border_left_right_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - {.name = "Border top + bottom", .create_cb = border_top_bottom_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - - {.name = "Shadow small", .create_cb = shadow_small_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - {.name = "Shadow small offset", .create_cb = shadow_small_ofs_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Shadow large", .create_cb = shadow_large_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Shadow large offset", .create_cb = shadow_large_ofs_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - - {.name = "Image RGB", .create_cb = img_rgb_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - {.name = "Image ARGB", .create_cb = img_argb_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - {.name = "Image indexed", .create_cb = img_index_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Image alpha only", .create_cb = img_alpha_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - - {.name = "Image RGB recolor", .create_cb = img_rgb_recolor_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Image ARGB recolor", .create_cb = img_argb_recolor_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - {.name = "Image indexed recolor", .create_cb = img_index_recolor_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - - {.name = "Image RGB rotate", .create_cb = img_rgb_rot_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Image RGB rotate anti aliased", .create_cb = img_rgb_rot_aa_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Image ARGB rotate", .create_cb = img_argb_rot_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Image ARGB rotate anti aliased", .create_cb = img_argb_rot_aa_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 15}, - {.name = "Image RGB zoom", .create_cb = img_rgb_zoom_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Image RGB zoom anti aliased", .create_cb = img_rgb_zoom_aa_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Image ARGB zoom", .create_cb = img_argb_zoom_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Image ARGB zoom anti aliased", .create_cb = img_argb_zoom_aa_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 15}, - - {.name = "Text small", .create_cb = txt_small_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - {.name = "Text medium", .create_cb = txt_medium_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 30}, - {.name = "Text large", .create_cb = txt_large_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 20}, - -#if LV_USE_FONT_COMPRESSED - {.name = "Text small compressed", .create_cb = txt_small_compr_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 3}, - {.name = "Text medium compressed", .create_cb = txt_medium_compr_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 5}, - {.name = "Text large compressed", .create_cb = txt_large_compr_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, -#endif + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); - {.name = "Line", .create_cb = line_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - - {.name = "Arc thin", .create_cb = arc_thin_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Arc thick", .create_cb = arc_thick_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - - {.name = "Substr. rectangle", .create_cb = sub_rectangle_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Substr. border", .create_cb = sub_border_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Substr. shadow", .create_cb = sub_shadow_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Substr. image", .create_cb = sub_image_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Substr. line", .create_cb = sub_line_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Substr. arc", .create_cb = sub_arc_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - {.name = "Substr. text", .create_cb = sub_text_cb, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 10}, - - {.name = "", .create_cb = NULL, .time_sum_normal = 0, .time_sum_opa = 0, .refr_cnt_normal = 0, .refr_cnt_opa = 0, .fps_normal = 0, .fps_opa = 0, .weight = 0} -}; + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 300; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 16) / 150; -static lv_obj_t *title; -static uint32_t rnd_act; -static lv_obj_t *scene_bg; -static lv_obj_t *subtitle; -static int32_t scene_act = -1; - -static const uint32_t rnd_map[] = { - 0xbd13204f, 0x67d8167f, 0x20211c99, 0xb0a7cc05, - 0x06d5c703, 0xeafb01a7, 0xd0473b5c, 0xc999aaa2, - 0x86f9d5d9, 0x294bdb29, 0x12a3c207, 0x78914d14, - 0x10a30006, 0x6134c7db, 0x194443af, 0x142d1099, - 0x376292d5, 0x20f433c5, 0x074d2a59, 0x4e74c293, - 0x072a0810, 0xdd0f136d, 0x5cca6dbc, 0x623bfdd8, - 0xb645eb2f, 0xbe50894a, 0xc9b56717, 0xe0f912c8, - 0x4f6b5e24, 0xfe44b128, 0xe12d57a8, 0x9b15c9cc, - 0xab2ae1d3, 0xb4dc5074, 0x67d457c8, 0x8e46b00c, - 0xa29a1871, 0xcee40332, 0x80f93aa1, 0x85286096, - 0x09bd6b49, 0x95072088, 0x2093924b, 0x6a27328f, - 0xa796079b, 0xc3b488bc, 0xe29bcce0, 0x07048a4c, - 0x7d81bd99, 0x27aacb30, 0x44fc7a0e, 0xa2382241, - 0x8357a17d, 0x97e9c9cc, 0xad10ff52, 0x9923fc5c, - 0x8f2c840a, 0x20356ba2, 0x7997a677, 0x9a7f1800, - 0x35c7562b, 0xd901fe51, 0x8f4e053d, 0xa5b94923, -}; - -static void benchmark_init(void) -{ - lv_display_t *disp = lv_display_get_default(); - - lv_display_add_event(disp, benchmark_event_cb, LV_EVENT_ALL, NULL); - flush_cb_ori = disp->flush_cb; - disp->flush_cb = dummy_flush_cb; - - if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_ONLY) { - if (disp->refr_timer) { - disp_ori_timer_period = disp->refr_timer->period; - lv_timer_set_period(disp->refr_timer, 2); + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * card = card_create(); + if(x == 0) lv_obj_add_flag(card, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); + lv_obj_set_style_opa(card, LV_OPA_50, 0); + shake_anim(card, 30); } - - lv_timer_t *anim_timer = lv_anim_get_timer(); - anim_ori_timer_period = anim_timer->period; - lv_timer_set_period(anim_timer, 2); } - - lv_obj_t *scr = lv_screen_active(); - lv_obj_remove_style_all(scr); - lv_obj_set_style_bg_opa(scr, LV_OPA_COVER, 0); - lv_obj_set_style_bg_color(scr, lv_palette_lighten(LV_PALETTE_GREY, 4), 0); - lv_obj_set_style_text_color(scr, lv_color_black(), 0); - - title = lv_label_create(scr); - lv_obj_set_pos(title, LV_DPI_DEF / 30, LV_DPI_DEF / 30); - lv_label_set_text(title, ""); - - subtitle = lv_label_create(scr); - lv_obj_align_to(subtitle, title, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0); - lv_label_set_text(subtitle, ""); - - scene_bg = lv_obj_create(scr); - lv_obj_remove_style_all(scene_bg); - lv_obj_set_size(scene_bg, lv_obj_get_width(scr), lv_obj_get_height(scr) - subtitle->coords.y2 - LV_DPI_DEF / 30); - lv_obj_align(scene_bg, LV_ALIGN_BOTTOM_MID, 0, 0); - - lv_style_init(&style_common); - - lv_obj_update_layout(scr); } -static void benchmark_event_cb(lv_event_t *e) +static void containers_with_opa_layer_cb(void) { - lv_event_code_t code = lv_event_get_code(e); - if (code == LV_EVENT_RENDER_START) { - render_start_time = lv_tick_get(); - } -} + lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); -static void benchmark_event_remove(void) -{ - uint32_t i; - lv_display_t *disp = lv_display_get_default(); + uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 300; + uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 16) / 150; - for (i = 0; i < lv_display_get_event_count(disp); i++) { - lv_event_dsc_t *dsc = lv_display_get_event_dsc(disp, i); - if (lv_event_dsc_get_cb(dsc) == benchmark_event_cb) { - lv_display_remove_event(disp, i); - return; + uint32_t y; + for(y = 0; y < ver_cnt; y++) { + uint32_t x; + for(x = 0; x < hor_cnt; x++) { + lv_obj_t * card = card_create(); + lv_obj_set_style_opa_layered(card, LV_OPA_50, 0); + if(x == 0) lv_obj_add_flag(card, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); + shake_anim(card, 30); } } } -int lvgl_demo_benchmark(int argc, char *argv[]) +static void containers_with_scrolling_cb(void) { - benchmark_init(); - mode = LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER; - - if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_ONLY) { - while (load_next_scene() == LV_RESULT_OK) { - uint32_t i; - for (i = 0; i < RENDER_REPEAT_CNT; i++) { - uint32_t t = lv_tick_get(); - while (lv_tick_elaps(t) > 20); + lv_obj_t * scr = lv_screen_active(); - lv_refr_now(NULL); - } + lv_obj_set_flex_flow(scr, LV_FLEX_FLOW_ROW_WRAP); + lv_obj_set_flex_align(scr, LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START); - calc_scene_statistics(); - show_scene_report(); - } - - generate_report(); - } else { - lv_timer_t *t = lv_timer_create(next_scene_timer_cb, SCENE_TIME, NULL); - lv_timer_ready(t); + uint32_t i; + for(i = 0; i < 50; i++) { + card_create(); } - return 0; + lv_obj_update_layout(scr); + scroll_anim(scr, lv_obj_get_scroll_bottom(scr)); } -void lvgl_demo_benchmark_run_scene(lv_demo_benchmark_mode_t _mode, uint16_t scene_no) +static void widgets_demo_cb(void) { - mode = _mode; - benchmark_init(); - - if (((scene_no >> 1) >= dimof(scenes))) { - return ; - } - - scene_with_opa = scene_no & 0x01; - scene_act = scene_no >> 1; + lv_obj_t * scr = lv_screen_active(); + lv_obj_set_style_pad_hor(scr, 0, 0); + lv_obj_set_style_pad_bottom(scr, 0, 0); + //lvgl_demo_widget(); + //lvgl_demo_widgets_start_slideshow(); +} - lv_obj_clean(scene_bg); +/********************** + * STATIC VARIABLES + **********************/ - last_flush_cb_call = 0; - rnd_reset(); - scenes[scene_act].create_cb(); +static scene_dsc_t scenes[] = { + {.name = "Empty screen", .scene_time = 3000, .create_cb = empty_screen_cb}, + {.name = "Moving wallpaper", .scene_time = 3000, .create_cb = moving_wallpaper_cb}, + {.name = "Single rectangle", .scene_time = 3000, .create_cb = single_rectangle_cb}, + {.name = "Multiple rectangles", .scene_time = 3000, .create_cb = multiple_rectangles_cb}, + {.name = "Multiple RGB images", .scene_time = 3000, .create_cb = multiple_rgb_images_cb}, + {.name = "Multiple ARGB images", .scene_time = 3000, .create_cb = multiple_argb_images_cb}, + {.name = "Rotated ARGB images", .scene_time = 3000, .create_cb = rotated_argb_image_cb}, + {.name = "Multiple labels", .scene_time = 3000, .create_cb = multiple_labels_cb}, + {.name = "Screen sized text", .scene_time = 5000, .create_cb = screen_sized_text_cb}, + {.name = "Multiple arcs", .scene_time = 3000, .create_cb = multiple_arcs_cb}, + + {.name = "Containers", .scene_time = 3000, .create_cb = containers_cb}, + {.name = "Containers with overlay", .scene_time = 3000, .create_cb = containers_with_overlay_cb}, + {.name = "Containers with opa", .scene_time = 3000, .create_cb = containers_with_opa_cb}, + {.name = "Containers with opa_layer", .scene_time = 3000, .create_cb = containers_with_opa_layer_cb}, + {.name = "Containers with scrolling", .scene_time = 5000, .create_cb = containers_with_scrolling_cb}, + + {.name = "Widgets demo", .scene_time = 20000, .create_cb = widgets_demo_cb}, + + {.name = "", .create_cb = NULL} +}; - lv_label_set_text_fmt(title, "%s%s", scenes[scene_act].name, scene_with_opa ? " + opa" : ""); +#define sysmon_perf LV_GLOBAL_DEFAULT()->sysmon_perf - if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_ONLY) { - uint32_t i; - for (i = 0; i < RENDER_REPEAT_CNT; i++) { - uint32_t t = lv_tick_get(); - while (lv_tick_elaps(t) < 20); +static uint32_t scene_act; +static uint32_t rnd_act; - lv_refr_now(NULL); - } +/********************** + * MACROS + **********************/ - single_scene_finsih_timer_cb(NULL); - } else { - lv_timer_t *t = lv_timer_create(single_scene_finsih_timer_cb, SCENE_TIME, NULL); - lv_timer_set_repeat_count(t, 1); - } -} +/********************** + * GLOBAL FUNCTIONS + **********************/ -static void show_scene_report(void) +int lvgl_demo_benchmark(int argc, char *argv[]) { - if (scene_act < 0) { - return; - } + scene_act = 0; - if (scene_with_opa) { - lv_label_set_text_fmt(subtitle, "Result: %" LV_PRIu32 " FPS", scenes[scene_act].fps_opa); - LV_LOG("Result of \"%s + opa\": %" LV_PRIu32 " FPS\n", scenes[scene_act].name, scenes[scene_act].fps_opa); - } else { - lv_label_set_text_fmt(subtitle, "Result: %" LV_PRIu32 " FPS", scenes[scene_act].fps_normal); - LV_LOG("Result of \"%s\": %" LV_PRIu32 " FPS\n", scenes[scene_act].name, scenes[scene_act].fps_normal); - } -} + lv_obj_t * scr = lv_screen_active(); + lv_obj_remove_style_all(scr); + lv_obj_set_style_bg_opa(scr, LV_OPA_COVER, 0); + lv_obj_set_style_text_color(scr, lv_color_black(), 0); + lv_obj_set_style_bg_color(scr, lv_palette_lighten(LV_PALETTE_GREY, 4), 0); + lv_obj_set_style_pad_all(lv_screen_active(), 8, 0); + lv_obj_set_style_pad_top(lv_screen_active(), 48, 0); + lv_obj_set_style_pad_gap(lv_screen_active(), 8, 0); -static void calc_scene_statistics(void) -{ - if (scene_act < 0) { - return; - } + lv_obj_t * title = lv_label_create(lv_layer_top()); + lv_obj_set_style_bg_opa(title, LV_OPA_COVER, 0); + lv_obj_set_style_bg_color(title, lv_color_white(), 0); + lv_obj_set_style_text_color(title, lv_color_black(), 0); + lv_obj_set_width(title, lv_pct(100)); - if (scene_with_opa) { - if (scenes[scene_act].time_sum_opa == 0) { - scenes[scene_act].time_sum_opa = 1; - } + load_scene(scene_act); - scenes[scene_act].fps_opa = (1000 * scenes[scene_act].refr_cnt_opa) / scenes[scene_act].time_sum_opa; - } else { - if (scenes[scene_act].time_sum_normal == 0) { - scenes[scene_act].time_sum_normal = 1; - } + lv_timer_create(next_scene_timer_cb, scenes[0].scene_time, NULL); - scenes[scene_act].fps_normal = (1000 * scenes[scene_act].refr_cnt_normal) / scenes[scene_act].time_sum_normal; - } +#if LV_USE_PERF_MONITOR + lv_subject_add_observer_obj(&sysmon_perf.subject, sysmon_perf_observer_cb, title, NULL); +#else + lv_label_set_text(title, "LV_USE_PERF_MONITOR is not enabled"); +#endif + return 0; } -static lv_result_t load_next_scene(void) +/********************** + * STATIC FUNCTIONS + **********************/ + + +static void load_scene(uint32_t scene) { - if ((scene_act >= 0) && (scenes[scene_act].create_cb == NULL)) { - return LV_RESULT_INVALID; - } + lv_obj_t * scr = lv_screen_active(); + lv_obj_clean(scr); + lv_obj_set_style_bg_color(scr, lv_palette_lighten(LV_PALETTE_GREY, 4), 0); + lv_obj_set_style_text_color(scr, lv_color_black(), 0); + lv_obj_set_style_pad_all(lv_screen_active(), 8, 0); + lv_obj_set_style_pad_top(lv_screen_active(), 48, 0); + lv_obj_set_style_pad_gap(lv_screen_active(), 8, 0); + lv_obj_set_layout(scr, LV_LAYOUT_NONE); + lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); - lv_obj_clean(scene_bg); - if (scene_with_opa) { - scene_act++; - scene_with_opa = false; - } else { - scene_with_opa = true; - } + lv_anim_delete(scr, scroll_anim_y_cb); + lv_anim_delete(scr, shake_anim_y_cb); + lv_anim_delete(scr, color_anim_cb); - if ((scene_act >= 0) && (scenes[scene_act].create_cb == NULL)) { - return LV_RESULT_INVALID; - } + lv_anim_delete(lv_layer_top(), color_anim_cb); + lv_obj_set_style_bg_opa(lv_layer_top(), LV_OPA_TRANSP, 0); - last_flush_cb_call = 0; rnd_reset(); - scenes[scene_act].create_cb(); - - lv_label_set_text_fmt(title, "%s%s", scenes[scene_act].name, scene_with_opa ? " + opa" : ""); - return LV_RESULT_OK; + if(scenes[scene].create_cb) scenes[scene].create_cb(); } -static void next_scene_timer_cb(lv_timer_t *timer) + + +static void next_scene_timer_cb(lv_timer_t * timer) { LV_UNUSED(timer); - calc_scene_statistics(); - show_scene_report(); - lv_result_t res = load_next_scene(); + scene_act++; - if (res == LV_RESULT_INVALID) { + load_scene(scene_act); + if(scenes[scene_act].scene_time == 0) { lv_timer_delete(timer); - generate_report(); + } + else { + lv_timer_set_period(timer, scenes[scene_act].scene_time); } } -static void single_scene_finsih_timer_cb(lv_timer_t *timer) +#if LV_USE_PERF_MONITOR +static void sysmon_perf_observer_cb(lv_subject_t * subject, lv_observer_t * observer) { - LV_UNUSED(timer); - calc_scene_statistics(); + const lv_sysmon_perf_info_t * info = lv_subject_get_pointer(subject); + lv_obj_t * label = lv_observer_get_target(observer); - lv_display_t *disp = lv_display_get_default(); - disp->flush_cb = flush_cb_ori; + lv_label_set_text_fmt(label, + "%" LV_PRIu32" FPS, %" LV_PRIu32 "%% CPU\n" + "refr. %" LV_PRIu32" ms = %" LV_PRIu32 "ms render + %" LV_PRIu32" ms flush", + info->calculated.fps, info->calculated.cpu, + info->calculated.render_avg_time + info->calculated.flush_avg_time, + info->calculated.render_avg_time, info->calculated.flush_avg_time); +} +#endif - if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_ONLY) { - if (disp->refr_timer) { - lv_timer_set_period(disp->refr_timer, disp_ori_timer_period); - } +/*---------------- + * SCENE HELPERS + *----------------*/ - lv_timer_set_period(lv_anim_get_timer(), anim_ori_timer_period); - } - benchmark_event_remove(); - show_scene_report(); - lv_obj_clean(scene_bg); - lv_obj_invalidate(lv_screen_active()); +static void color_anim_cb(void * var, int32_t v) +{ + LV_UNUSED(v); + lv_obj_set_style_bg_color(var, lv_color_hex3(lv_rand(0x00f, 0xff0)), 0); + lv_obj_set_style_text_color(var, lv_color_hex3(lv_rand(0x00f, 0xff0)), 0); } -static void dummy_flush_cb(lv_display_t *drv, const lv_area_t *area, uint8_t *pxmap) +static void color_anim(lv_obj_t * obj) { - LV_UNUSED(area); - - if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_AND_DRIVER) { - bool last = lv_display_flush_is_last(drv); - flush_cb_ori(drv, area, pxmap); - if (last) { - uint32_t t = lv_tick_elaps(render_start_time); - if (scene_with_opa) { - scenes[scene_act].refr_cnt_opa++; - scenes[scene_act].time_sum_opa += t; - } else { - scenes[scene_act].refr_cnt_normal++; - scenes[scene_act].time_sum_normal += t; - } - } - } else if (mode == LV_DEMO_BENCHMARK_MODE_REAL) { - bool last = lv_display_flush_is_last(drv); - flush_cb_ori(drv, area, pxmap); - if (last) { - if (last_flush_cb_call != 0) { - uint32_t t = lv_tick_elaps(last_flush_cb_call); - if (scene_with_opa) { - scenes[scene_act].refr_cnt_opa ++; - scenes[scene_act].time_sum_opa += t; - } else { - scenes[scene_act].refr_cnt_normal ++; - scenes[scene_act].time_sum_normal += t; - } - } - - last_flush_cb_call = lv_tick_get(); - } - } else if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_ONLY) { - bool last = lv_display_flush_is_last(drv); - lv_display_flush_ready(drv); - if (last) { - uint32_t t = lv_tick_elaps(render_start_time); - if (scene_with_opa) { - scenes[scene_act].refr_cnt_opa ++; - scenes[scene_act].time_sum_opa += t; - } else { - scenes[scene_act].refr_cnt_normal ++; - scenes[scene_act].time_sum_normal += t; - } - } - } + lv_anim_t a; + lv_anim_init(&a); + lv_anim_set_exec_cb(&a, color_anim_cb); + lv_anim_set_values(&a, 0, 100); + lv_anim_set_time(&a, 100); /*New value in each ms*/ + lv_anim_set_var(&a, obj); + lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE); + lv_anim_start(&a); } -static void generate_report(void) +static void arc_anim_cb(void * var, int32_t v) { - lv_display_t *disp = lv_display_get_default(); - disp->flush_cb = flush_cb_ori; - - if (mode == LV_DEMO_BENCHMARK_MODE_RENDER_ONLY) { - if (disp->refr_timer) { - lv_timer_set_period(disp->refr_timer, disp_ori_timer_period); - } - - lv_timer_set_period(lv_anim_get_timer(), anim_ori_timer_period); - } - - benchmark_event_remove(); - - uint32_t i; - uint32_t fps_sum = 0; - uint32_t weight_sum = 0; - uint32_t fps_opa_sum = 0; - uint32_t weight_opa_sum = 0; - uint32_t fps_normal_sum = 0; - uint32_t weight_normal_sum = 0; - - for (i = 0; scenes[i].create_cb; i++) { - fps_normal_sum += scenes[i].fps_normal * scenes[i].weight; - weight_normal_sum += scenes[i].weight; - - uint32_t w = LV_MAX(scenes[i].weight / 2, 1); - fps_opa_sum += scenes[i].fps_opa * w; - weight_opa_sum += w; - } - - fps_sum = fps_normal_sum + fps_opa_sum; - weight_sum = weight_normal_sum + weight_opa_sum; - - uint32_t fps_weighted = fps_sum / weight_sum; - uint32_t fps_normal_unweighted = fps_normal_sum / weight_normal_sum; - uint32_t fps_opa_unweighted = fps_opa_sum / weight_opa_sum; - - uint32_t opa_speed_pct = (fps_opa_unweighted * 100) / fps_normal_unweighted; - - lv_obj_clean(lv_screen_active()); - scene_bg = NULL; - - lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_COLUMN); - - title = lv_label_create(lv_screen_active()); - lv_label_set_text_fmt(title, "Weighted FPS: %" LV_PRIu32, fps_weighted); - - subtitle = lv_label_create(lv_screen_active()); - lv_label_set_text_fmt(subtitle, "Opa. speed: %" LV_PRIu32 "%%", opa_speed_pct); - - lv_coord_t w = lv_obj_get_content_width(lv_screen_active()); - lv_obj_t *table = lv_table_create(lv_screen_active()); - lv_table_set_col_cnt(table, 2); - - lv_table_set_col_width(table, 0, (w * 3) / 4 - 3); - lv_table_set_col_width(table, 1, w / 4 - 3); - lv_obj_set_width(table, lv_pct(100)); - - uint16_t row = 0; - lv_table_add_cell_ctrl(table, row, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT); - lv_table_set_cell_value(table, row, 0, "Slow but common cases"); - - LV_LOG("\r\nLVGL v%d.%d.%d " LVGL_VERSION_INFO " Benchmark (in csv format)\r\n", LVGL_VERSION_MAJOR, LVGL_VERSION_MINOR, LVGL_VERSION_PATCH); - LV_LOG("Weighted FPS: %" LV_PRIu32 "\n", fps_weighted); - LV_LOG("Opa. speed: %" LV_PRIu32 "%%\n", opa_speed_pct); - - row++; - char buf[256]; - for (i = 0; scenes[i].create_cb; i++) { - if ((scenes[i].fps_normal < 20) && (scenes[i].weight >= 10)) { - lv_table_set_cell_value(table, row, 0, scenes[i].name); - - lv_snprintf(buf, sizeof(buf), "%" LV_PRIu32, scenes[i].fps_normal); - lv_table_set_cell_value(table, row, 1, buf); - - // LV_LOG("%s,%s\r\n", scenes[i].name, buf); - row++; - } - - if ((scenes[i].fps_opa < 20) && (LV_MAX(scenes[i].weight / 2, 1) >= 10)) { - lv_snprintf(buf, sizeof(buf), "%s + opa", scenes[i].name); - lv_table_set_cell_value(table, row, 0, buf); - - // LV_LOG("%s,", buf); - - lv_snprintf(buf, sizeof(buf), "%" LV_PRIu32, scenes[i].fps_opa); - lv_table_set_cell_value(table, row, 1, buf); - - // LV_LOG("%s\r\n", buf); - row++; - } - } - - if (row == 1) { - lv_table_add_cell_ctrl(table, row, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT); - lv_table_set_cell_value(table, row, 0, "All good"); - row++; - } - - lv_table_add_cell_ctrl(table, row, 0, LV_TABLE_CELL_CTRL_MERGE_RIGHT); - lv_table_set_cell_value(table, row, 0, "All cases"); - row++; - - for (i = 0; scenes[i].create_cb; i++) { - lv_table_set_cell_value(table, row, 0, scenes[i].name); - - lv_snprintf(buf, sizeof(buf), "%" LV_PRIu32, scenes[i].fps_normal); - lv_table_set_cell_value(table, row, 1, buf); - - if (scenes[i].fps_normal < 10) { - - } else if(scenes[i].fps_normal < 20) { - - } - - LV_LOG("%s,%s\r\n", scenes[i].name, buf); - row++; - - lv_snprintf(buf, sizeof(buf), "%s + opa", scenes[i].name); - lv_table_set_cell_value(table, row, 0, buf); - - LV_LOG("%s,", buf); - - lv_snprintf(buf, sizeof(buf), "%" LV_PRIu32, scenes[i].fps_opa); - lv_table_set_cell_value(table, row, 1, buf); - - if (scenes[i].fps_opa < 10) { - - } else if(scenes[i].fps_opa < 20) { - - } - - LV_LOG("%s\r\n", buf); - row++; - } + lv_arc_set_value(var, v); } -static void rect_create(lv_style_t * style) +static void arc_anim(lv_obj_t * obj) { - uint32_t i; - for (i = 0; i < OBJ_NUM; i++) { - lv_obj_t *obj = lv_obj_create(scene_bg); - lv_obj_remove_style_all(obj); - lv_obj_add_style(obj, style, 0); - lv_obj_set_style_bg_color(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); - lv_obj_set_style_border_color(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); - lv_obj_set_style_shadow_color(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); - - lv_obj_set_size(obj, rnd_next(OBJ_SIZE_MIN, OBJ_SIZE_MAX), rnd_next(OBJ_SIZE_MIN, OBJ_SIZE_MAX)); - - fall_anim(obj); - } + uint32_t t1 = rnd_next(1000, 3000); + uint32_t t2 = rnd_next(1000, 3000); + lv_anim_t a; + lv_anim_init(&a); + lv_anim_set_exec_cb(&a, arc_anim_cb); + lv_anim_set_values(&a, 0, 100); + lv_anim_set_time(&a, t1); + lv_anim_set_playback_time(&a, t2); + lv_anim_set_var(&a, obj); + lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE); + lv_anim_start(&a); } -static void img_create(lv_style_t *style, const void *src, bool rotate, bool zoom, bool aa) +static void scroll_anim_y_cb(void * var, int32_t v) { - uint32_t i; - for (i = 0; i < (uint32_t)IMG_NUM; i++) { - lv_obj_t *obj = lv_image_create(scene_bg); - lv_obj_remove_style_all(obj); - lv_obj_add_style(obj, style, 0); - lv_image_set_src(obj, src); - lv_obj_set_style_image_recolor(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); - - if (rotate) { - lv_image_set_rotation(obj, rnd_next(0, 3599)); - } - - if (zoom) { - lv_image_set_zoom(obj, rnd_next(IMG_ZOOM_MIN, IMG_ZOOM_MAX)); - } - - lv_image_set_antialias(obj, aa); - fall_anim(obj); - } + lv_obj_scroll_to_y(var, v, LV_ANIM_OFF); } -static void txt_create(lv_style_t *style) +static void scroll_anim(lv_obj_t * obj, lv_coord_t y_max) { - uint32_t i; - for (i = 0; i < OBJ_NUM; i++) { - lv_obj_t *obj = lv_label_create(scene_bg); - lv_obj_remove_style_all(obj); - lv_obj_add_style(obj, style, 0); - lv_obj_set_style_text_color(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); + uint32_t t = lv_anim_speed_to_time(lv_display_get_dpi(NULL), 0, y_max); - lv_label_set_text(obj, TXT); + lv_anim_t a; + lv_anim_init(&a); + lv_anim_set_var(&a, obj); + lv_anim_set_exec_cb(&a, scroll_anim_y_cb); + lv_anim_set_values(&a, 0, y_max); + lv_anim_set_time(&a, t); + lv_anim_set_playback_time(&a, t); + lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE); + lv_anim_start(&a); - fall_anim(obj); - } } - -static void line_create(lv_style_t *style) +static void shake_anim_y_cb(void * var, int32_t v) { - static lv_point_t points[OBJ_NUM][LINE_POINT_NUM]; - - uint32_t i; - for (i = 0; i < OBJ_NUM; i++) { - points[i][0].x = 0; - points[i][0].y = 0; - - uint32_t j; - for (j = 1; j < LINE_POINT_NUM; j++) { - points[i][j].x = points[i][j - 1].x + rnd_next(LINE_POINT_DIFF_MIN, LINE_POINT_DIFF_MAX); - points[i][j].y = rnd_next(LINE_POINT_DIFF_MIN, LINE_POINT_DIFF_MAX); - } - - lv_obj_t *obj = lv_line_create(scene_bg); - lv_obj_remove_style_all(obj); - lv_obj_add_style(obj, style, 0); - lv_obj_set_style_line_color(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 0); - - lv_line_set_points(obj, points[i], LINE_POINT_NUM); - - fall_anim(obj); - } + lv_obj_set_style_translate_y(var, v, 0); } -static void arc_anim_end_angle_cb(void *var, int32_t v) +static void shake_anim(lv_obj_t * obj, lv_coord_t y_max) { - lv_arc_set_end_angle((lv_obj_t *)var, v); + uint32_t t1 = rnd_next(300, 3000); + uint32_t t2 = rnd_next(300, 3000); + + lv_anim_t a; + lv_anim_init(&a); + lv_anim_set_var(&a, obj); + lv_anim_set_exec_cb(&a, shake_anim_y_cb); + lv_anim_set_values(&a, 0, y_max); + lv_anim_set_time(&a, t1); + lv_anim_set_playback_time(&a, t2); + lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE); + lv_anim_start(&a); } -static void arc_create(lv_style_t *style) + +static lv_obj_t * card_create(void) { - uint32_t i; - for (i = 0; i < OBJ_NUM; i++) { - lv_obj_t *obj = lv_arc_create(scene_bg); - lv_obj_remove_style_all(obj); - lv_obj_set_size(obj, rnd_next(OBJ_SIZE_MIN, OBJ_SIZE_MAX), rnd_next(OBJ_SIZE_MIN, OBJ_SIZE_MAX)); - lv_obj_add_style(obj, style, LV_PART_INDICATOR); - lv_obj_set_style_arc_color(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), LV_PART_INDICATOR); + lv_obj_t * panel = lv_obj_create(lv_screen_active()); + lv_obj_set_size(panel, 270, 120); + lv_obj_set_style_pad_all(panel, 8, 0); - lv_arc_set_start_angle(obj, 0); + LV_IMG_DECLARE(img_transform_avatar_15); + lv_obj_t * child = lv_image_create(panel); + lv_obj_align(child, LV_ALIGN_LEFT_MID, 0, 0); + lv_image_set_src(child, &img_transform_avatar_15); - uint32_t t = rnd_next(ANIM_TIME_MIN / 4, ANIM_TIME_MAX / 4); + child = lv_label_create(panel); + lv_label_set_text(child, "John Smith"); + lv_obj_set_style_text_font(child, &lv_font_montserrat_24, 0); + lv_obj_set_pos(child, 100, 0); - lv_anim_t a; - lv_anim_init(&a); - lv_anim_set_var(&a, obj); - lv_anim_set_exec_cb(&a, arc_anim_end_angle_cb); - lv_anim_set_values(&a, rnd_next(30, 300), 359); - lv_anim_set_time(&a, t); - lv_anim_set_playback_time(&a, t); - lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE); - lv_anim_start(&a); + child = lv_label_create(panel); + lv_label_set_text(child, "A DIY enthusiast"); + lv_obj_set_style_text_font(child, &lv_font_montserrat_14, 0); + lv_obj_set_pos(child, 100, 30); - fall_anim(obj); - } -} + child = lv_button_create(panel); + lv_obj_set_pos(child, 100, 50); -static void fall_anim_y_cb(void *var, int32_t v) -{ - lv_obj_set_y((lv_obj_t *)var, v); -} + child = lv_label_create(child); + lv_label_set_text(child, "Connect"); -static void fall_anim(lv_obj_t *obj) -{ - lv_obj_update_layout(obj); - lv_obj_set_x(obj, rnd_next(0, lv_obj_get_width(scene_bg) - lv_obj_get_width(obj))); - uint32_t t = rnd_next(ANIM_TIME_MIN, ANIM_TIME_MAX); - lv_anim_t a; - lv_anim_init(&a); - lv_anim_set_var(&a, obj); - lv_anim_set_exec_cb(&a, fall_anim_y_cb); - lv_anim_set_values(&a, 0, lv_obj_get_height(scene_bg) - lv_obj_get_height(obj)); - lv_anim_set_time(&a, t); - lv_anim_set_playback_time(&a, t); - lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE); - a.act_time = a.time / 2; - lv_anim_start(&a); + return panel; } static void rnd_reset(void) @@ -1160,11 +588,28 @@ static void rnd_reset(void) static int32_t rnd_next(int32_t min, int32_t max) { - if (min == max) { - return min; - } - - if (min > max) { + static const uint32_t rnd_map[] = { + 0xbd13204f, 0x67d8167f, 0x20211c99, 0xb0a7cc05, + 0x06d5c703, 0xeafb01a7, 0xd0473b5c, 0xc999aaa2, + 0x86f9d5d9, 0x294bdb29, 0x12a3c207, 0x78914d14, + 0x10a30006, 0x6134c7db, 0x194443af, 0x142d1099, + 0x376292d5, 0x20f433c5, 0x074d2a59, 0x4e74c293, + 0x072a0810, 0xdd0f136d, 0x5cca6dbc, 0x623bfdd8, + 0xb645eb2f, 0xbe50894a, 0xc9b56717, 0xe0f912c8, + 0x4f6b5e24, 0xfe44b128, 0xe12d57a8, 0x9b15c9cc, + 0xab2ae1d3, 0xb4dc5074, 0x67d457c8, 0x8e46b00c, + 0xa29a1871, 0xcee40332, 0x80f93aa1, 0x85286096, + 0x09bd6b49, 0x95072088, 0x2093924b, 0x6a27328f, + 0xa796079b, 0xc3b488bc, 0xe29bcce0, 0x07048a4c, + 0x7d81bd99, 0x27aacb30, 0x44fc7a0e, 0xa2382241, + 0x8357a17d, 0x97e9c9cc, 0xad10ff52, 0x9923fc5c, + 0x8f2c840a, 0x20356ba2, 0x7997a677, 0x9a7f1800, + 0x35c7562b, 0xd901fe51, 0x8f4e053d, 0xa5b94923, + }; + + if(min == max) return min; + + if(min > max) { int32_t t = min; min = max; max = t; @@ -1174,11 +619,7 @@ static int32_t rnd_next(int32_t min, int32_t max) int32_t r = (rnd_map[rnd_act] % d) + min; rnd_act++; - if (rnd_act >= RND_NUM) { - rnd_act = 0; - } + if(rnd_act >= sizeof(rnd_map) / sizeof(rnd_map[0])) rnd_act = 0; return r; } - -#endif diff --git a/project/entry/gui_demo/lvgl/lvgl_demo.cpp b/project/entry/gui_demo/lvgl/lvgl_demo.cpp index af98b0f46..606072118 100644 --- a/project/entry/gui_demo/lvgl/lvgl_demo.cpp +++ b/project/entry/gui_demo/lvgl/lvgl_demo.cpp @@ -28,6 +28,8 @@ #include "flex_layout/demo_flex_layout.h" #elif defined(CONFIG_LVGL_SCROLL_TEST) #include "scroll/demo_scroll.h" +#elif defined(CONFIG_LVGL_RENDER_TEST) +#include "render/render.h" #endif #if defined(CONFIG_IMX6ULL) @@ -159,6 +161,8 @@ int lvgl_demo_init(int argc, char *argv[]) lvgl_demo_flex_layout(argc, argv); #elif defined(CONFIG_LVGL_SCROLL_TEST) lvgl_demo_scroll(argc, argv); +#elif defined(CONFIG_LVGL_RENDER_TEST) + lvgl_demo_render(argc, argv); #endif while (1) { diff --git a/project/entry/gui_demo/lvgl/multilang/demo_multilang.c b/project/entry/gui_demo/lvgl/multilang/demo_multilang.c index 2a7d10fa4..ea87f028c 100644 --- a/project/entry/gui_demo/lvgl/multilang/demo_multilang.c +++ b/project/entry/gui_demo/lvgl/multilang/demo_multilang.c @@ -65,7 +65,7 @@ static card_info_t card_info[] = { CARD_INFO_SET(&img_multilang_avatar_13, "Jamal Brown", "Photographer and amateur astronomer 📸"), CARD_INFO_SET(&img_multilang_avatar_15, "Pavel Svoboda", "Hudebník a návštěvník koncertů"), CARD_INFO_SET(&img_multilang_avatar_16, "Elin Lindqvist", "Språkinlärare och kulturentusiast "), - CARD_INFO_SET(&img_multilang_avatar_17, "William Carter", "DIY enthusiast and home improvement guru "), + CARD_INFO_SET(&img_multilang_avatar_17, "William Carter", "DIY enthusiast and home improvement guru"), CARD_INFO_SET(&img_multilang_avatar_22, "Ava Williams", "Artist and creative visionary 🎨"), CARD_INFO_SET(NULL, NULL, NULL), }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_corner_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_corner_large.c index 32eec141a..02cd5ce51 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_corner_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_corner_large.c @@ -125,7 +125,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_corner = { .w = 32, .h = 32 }, - .data_size = 1024 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 1024 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_corner_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_pause_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_pause_large.c index 959e5a3dc..293efdf8f 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_pause_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_pause_large.c @@ -344,7 +344,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_list_pause = { .w = 106, .h = 105 }, - .data_size = 11130 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 11130 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_list_pause_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_play_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_play_large.c index 7936b84ef..2e30cfbf4 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_play_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_list_play_large.c @@ -344,7 +344,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_list_play = { .w = 106, .h = 105 }, - .data_size = 11130 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 11130 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_list_play_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_loop_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_loop_large.c index c1f7b668e..509274daa 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_loop_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_loop_large.c @@ -137,7 +137,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_loop = { .w = 37, .h = 36 }, - .data_size = 1332 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 1332 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_loop_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_next_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_next_large.c index 02e356a3e..7d316987d 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_next_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_next_large.c @@ -359,7 +359,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_next = { .w = 110, .h = 110 }, - .data_size = 12100 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 12100 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_next_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_pause_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_pause_large.c index d8111b9b8..e9b56c58b 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_pause_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_pause_large.c @@ -455,7 +455,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_pause = { .w = 141, .h = 142 }, - .data_size = 20022 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 20022 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_pause_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_play_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_play_large.c index b0582da68..4254ed1dd 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_play_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_play_large.c @@ -455,7 +455,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_play = { .w = 141, .h = 142 }, - .data_size = 20022 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 20022 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_play_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_prev_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_prev_large.c index 37fc0becc..f34dbe8a0 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_prev_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_prev_large.c @@ -359,7 +359,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_prev = { .w = 110, .h = 110 }, - .data_size = 12100 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 12100 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_prev_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_rnd_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_rnd_large.c index e48c9dc1d..6db744bca 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_rnd_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_btn_rnd_large.c @@ -137,7 +137,7 @@ const lv_image_dsc_t img_lv_demo_music_btn_rnd = { .w = 37, .h = 36 }, - .data_size = 1332 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 1332 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_btn_rnd_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_left_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_left_large.c index 70e767215..104363ffe 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_left_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_left_large.c @@ -125,7 +125,7 @@ const lv_image_dsc_t img_lv_demo_music_corner_left = { .w = 32, .h = 32 }, - .data_size = 1024 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 1024 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_corner_left_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_right_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_right_large.c index 12e4eff24..5855947c4 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_right_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_corner_right_large.c @@ -125,7 +125,7 @@ const lv_image_dsc_t img_lv_demo_music_corner_right = { .w = 32, .h = 32 }, - .data_size = 1024 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 1024 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_corner_right_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_1_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_1_large.c index 7a115bbd4..aa8c4ce8c 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_1_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_1_large.c @@ -119,7 +119,7 @@ const lv_image_dsc_t img_lv_demo_music_icon_1 = { .w = 30, .h = 30 }, - .data_size = 900 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 900 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_icon_1_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_2_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_2_large.c index 8bd3b2912..861b85fb2 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_2_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_2_large.c @@ -122,7 +122,7 @@ const lv_image_dsc_t img_lv_demo_music_icon_2 = { .w = 31, .h = 31 }, - .data_size = 961 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 961 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_icon_2_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_3_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_3_large.c index a53982f07..61f109c58 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_3_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_3_large.c @@ -125,7 +125,7 @@ const lv_image_dsc_t img_lv_demo_music_icon_3 = { .w = 34, .h = 32 }, - .data_size = 1088 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 1088 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_icon_3_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_4_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_4_large.c index b5bfa1b12..bdee6e5ab 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_4_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_icon_4_large.c @@ -119,7 +119,7 @@ const lv_image_dsc_t img_lv_demo_music_icon_4 = { .w = 32, .h = 30 }, - .data_size = 960 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 960 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_icon_4_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_list_border_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_list_border_large.c index 1c8b51285..4122da17b 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_list_border_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_list_border_large.c @@ -50,7 +50,7 @@ const lv_image_dsc_t img_lv_demo_music_list_border = { .w = 479, .h = 7 }, - .data_size = 3353 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 3353 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_list_border_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_slider_knob_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_slider_knob_large.c index 96090d0d5..ad21504ed 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_slider_knob_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_slider_knob_large.c @@ -227,7 +227,7 @@ const lv_image_dsc_t img_lv_demo_music_slider_knob = { .w = 66, .h = 66 }, - .data_size = 4356 * LV_IMG_PX_SIZE_ALPHA_BYTE, + //.data_size = 4356 * LV_IMG_PX_SIZE_ALPHA_BYTE, .data = img_lv_demo_music_slider_knob_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_bottom_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_bottom_large.c index c95dbaa1a..cfb10cb66 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_bottom_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_bottom_large.c @@ -251,7 +251,7 @@ const lv_image_dsc_t img_lv_demo_music_wave_bottom = { .w = 479, .h = 74 }, - .data_size = 35446 * LV_COLOR_DEPTH / 8, + //.data_size = 35446 * LV_COLOR_DEPTH / 8, .data = img_lv_demo_music_wave_bottom_map }; diff --git a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_top_large.c b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_top_large.c index 28abbac5a..79638711f 100644 --- a/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_top_large.c +++ b/project/entry/gui_demo/lvgl/music/assets/img_lv_demo_music_wave_top_large.c @@ -251,7 +251,7 @@ const lv_image_dsc_t img_lv_demo_music_wave_top = { .w = 479, .h = 74 }, - .data_size = 35446 * LV_COLOR_DEPTH / 8, + //.data_size = 35446 * LV_COLOR_DEPTH / 8, .data = img_lv_demo_music_wave_top_map }; diff --git a/project/entry/gui_demo/lvgl/render/Makefile b/project/entry/gui_demo/lvgl/render/Makefile new file mode 100644 index 000000000..0705b620b --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/Makefile @@ -0,0 +1,2 @@ +obj-y += assets/ +obj-y += render.o diff --git a/project/entry/gui_demo/lvgl/render/assets/Makefile b/project/entry/gui_demo/lvgl/render/assets/Makefile new file mode 100644 index 000000000..54e89dfec --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/assets/Makefile @@ -0,0 +1,5 @@ +obj-y += img_render_arc_bg.o +obj-y += img_render_lvgl_logo_argb888.o +obj-y += img_render_lvgl_logo_rgb565.o +obj-y += img_render_lvgl_logo_rgb888.o +obj-y += img_render_lvgl_logo_xrgb888.o diff --git a/project/entry/gui_demo/lvgl/render/assets/img_render_arc_bg.c b/project/entry/gui_demo/lvgl/render/assets/img_render_arc_bg.c new file mode 100644 index 000000000..77f0642e7 --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/assets/img_render_arc_bg.c @@ -0,0 +1,122 @@ +#include "../../../lvgl.h" + +#ifndef LV_ATTRIBUTE_MEM_ALIGN + #define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMAGE_IMG_RENDER_ARC_BG + #define LV_ATTRIBUTE_IMAGE_IMG_RENDER_ARC_BG +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_RENDER_ARC_BG uint8_t +img_render_arc_bg_map[] = { + 0x00, 0xc0, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xc0, 0xff, + 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x01, 0xf4, 0xff, 0xff, 0x01, 0xf6, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xfe, 0xee, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, + 0x00, 0xbf, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x01, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x01, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, + 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x01, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, + 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, + 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x01, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbc, 0xff, + 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x01, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xbb, 0xff, + 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xfe, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xde, 0xfe, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x01, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x01, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, + 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, + 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x01, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, + 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xfe, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xfe, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, + 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb6, 0xff, + 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xfe, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x01, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb5, 0xff, + 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xfe, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x01, 0xe2, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, + 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x01, 0xb7, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xfe, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x01, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb2, 0xff, + 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, + 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xfe, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbc, 0xfe, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x01, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xca, 0xff, 0x01, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xfe, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, + 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xfe, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, + 0x00, 0xae, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xfe, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xfe, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x01, 0xf4, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xfe, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xaf, 0xff, + 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xfe, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, + 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x01, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x01, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xac, 0xff, + 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x01, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xfe, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, + 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xa9, 0xff, + 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x01, 0xab, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xd9, 0xfe, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xfe, 0xfd, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, + 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, + 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x01, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd4, 0xfe, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, + 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x01, 0xb4, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfe, 0xff, 0x00, 0xff, 0xfa, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xfe, 0xe6, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xfe, 0xc4, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, + 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xfe, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, + 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x01, 0xb5, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x01, 0xf2, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x01, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xfe, 0xeb, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x01, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x01, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, + 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x01, 0xb6, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x01, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, + 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xfe, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xfe, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9f, 0xff, + 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x01, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe5, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, + 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x01, 0xa0, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xf4, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xd7, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd1, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x01, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, + 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x01, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xea, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc0, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, + 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd4, 0xff, 0xff, 0x00, 0xd8, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xee, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x00, 0xfd, 0xff, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x9a, 0xff, + 0x00, 0x98, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xff, 0xfd, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, + 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x01, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xcb, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xd9, 0xff, 0xff, 0x00, 0xdc, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xe6, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xf1, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xe6, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xdc, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xcb, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x97, 0xff, 0x01, 0xff, 0x96, 0xff, + 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc1, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xc8, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xd0, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xe9, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xf6, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe5, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x01, 0xff, 0xb4, 0xff, 0x00, 0xfe, 0xb2, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x95, 0xff, + 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xd2, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xf6, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xff, 0xfc, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xee, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xe2, 0xff, 0x00, 0xff, 0xdd, 0xff, 0x00, 0xff, 0xd8, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xc1, 0xff, 0x00, 0xff, 0xbf, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x93, 0xff, + 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb8, 0xfe, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xed, 0xff, 0xff, 0x00, 0xf4, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf5, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xe0, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd4, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, + 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x01, 0xb1, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbf, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xd7, 0xff, 0xff, 0x00, 0xdd, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xf3, 0xff, 0xff, 0x00, 0xfb, 0xff, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xff, 0xec, 0xff, 0x00, 0xff, 0xe4, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xd0, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xba, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaf, 0xff, 0x00, 0xff, 0xac, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa6, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x90, 0xff, + 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x01, 0xa5, 0xff, 0xff, 0x00, 0xa6, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xba, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc7, 0xff, 0xff, 0x00, 0xcd, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xe1, 0xff, 0xff, 0x00, 0xea, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x01, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xe9, 0xff, 0x00, 0xff, 0xe1, 0xff, 0x00, 0xff, 0xd9, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xcd, 0xff, 0x00, 0xff, 0xc7, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xbe, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb3, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xfe, 0x9d, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8f, 0xff, + 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xaf, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xb5, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xbe, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd6, 0xff, 0xff, 0x00, 0xde, 0xff, 0xff, 0x00, 0xe7, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xff, 0xfb, 0xff, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xff, 0xe7, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xd6, 0xff, 0x00, 0xff, 0xcf, 0xff, 0x00, 0xff, 0xc8, 0xff, 0x00, 0xff, 0xc3, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xab, 0xff, 0x00, 0xfe, 0xa9, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x01, 0xff, 0x8c, 0xff, + 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8b, 0xfe, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xb1, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xb8, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xc3, 0xff, 0xff, 0x00, 0xca, 0xff, 0xff, 0x00, 0xd1, 0xff, 0xff, 0x00, 0xda, 0xff, 0xff, 0x00, 0xe4, 0xff, 0xff, 0x00, 0xef, 0xff, 0xff, 0x00, 0xfa, 0xff, 0xff, 0x00, 0xff, 0xf9, 0xff, 0x00, 0xff, 0xef, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xd2, 0xff, 0x00, 0xff, 0xca, 0xff, 0x00, 0xff, 0xc2, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xb8, 0xff, 0x00, 0xff, 0xb4, 0xff, 0x00, 0xff, 0xb0, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa7, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x91, 0xff, 0x01, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, + 0x00, 0x89, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa7, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xae, 0xff, 0xff, 0x00, 0xb3, 0xff, 0xff, 0x00, 0xb7, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xc4, 0xff, 0xff, 0x00, 0xcc, 0xff, 0xff, 0x00, 0xd5, 0xff, 0xff, 0x00, 0xe0, 0xff, 0xff, 0x00, 0xeb, 0xff, 0xff, 0x00, 0xf9, 0xff, 0xff, 0x00, 0xff, 0xf8, 0xff, 0x00, 0xff, 0xeb, 0xff, 0x00, 0xff, 0xdf, 0xff, 0x00, 0xff, 0xd5, 0xff, 0x00, 0xff, 0xcc, 0xff, 0x00, 0xff, 0xc4, 0xff, 0x00, 0xff, 0xbd, 0xff, 0x00, 0xff, 0xb7, 0xff, 0x00, 0xff, 0xb2, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, + 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9b, 0xff, 0xff, 0x00, 0x9d, 0xff, 0xff, 0x00, 0x9f, 0xff, 0xff, 0x00, 0xa2, 0xff, 0xff, 0x00, 0xa5, 0xff, 0xff, 0x00, 0xa8, 0xff, 0xff, 0x00, 0xab, 0xff, 0xff, 0x00, 0xb0, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xbd, 0xff, 0xff, 0x00, 0xc5, 0xff, 0xff, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xe8, 0xff, 0xff, 0x00, 0xf7, 0xff, 0xff, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xff, 0xe8, 0xff, 0x00, 0xff, 0xda, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xc5, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xb6, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xad, 0xff, 0x00, 0xff, 0xa8, 0xff, 0x00, 0xff, 0xa5, 0xff, 0x00, 0xff, 0xa2, 0xff, 0x01, 0xff, 0x9f, 0xff, 0x00, 0xff, 0x9d, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, + 0x00, 0x86, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x93, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x98, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0xa1, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xad, 0xff, 0xff, 0x00, 0xb4, 0xff, 0xff, 0x00, 0xbc, 0xff, 0xff, 0x00, 0xc6, 0xff, 0xff, 0x00, 0xd3, 0xff, 0xff, 0x00, 0xe3, 0xff, 0xff, 0x00, 0xf5, 0xff, 0xff, 0x00, 0xfe, 0xf6, 0xff, 0x00, 0xff, 0xe3, 0xff, 0x00, 0xff, 0xd3, 0xff, 0x00, 0xff, 0xc6, 0xff, 0x00, 0xff, 0xbc, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xae, 0xff, 0x00, 0xff, 0xa9, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa1, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x96, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x93, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xfe, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x86, 0xff, + 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8f, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x95, 0xff, 0xff, 0x00, 0x97, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0x9c, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xaa, 0xff, 0xff, 0x00, 0xb2, 0xff, 0xff, 0x00, 0xbb, 0xff, 0xff, 0x00, 0xc9, 0xff, 0xff, 0x00, 0xdb, 0xff, 0xff, 0x00, 0xf2, 0xff, 0xff, 0x00, 0xff, 0xf2, 0xff, 0x00, 0xff, 0xdb, 0xff, 0x00, 0xff, 0xc9, 0xff, 0x00, 0xff, 0xbb, 0xff, 0x00, 0xff, 0xb1, 0xff, 0x00, 0xff, 0xaa, 0xff, 0x00, 0xff, 0xa4, 0xff, 0x00, 0xff, 0xa0, 0xff, 0x00, 0xff, 0x9c, 0xff, 0x00, 0xff, 0x99, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x95, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8f, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8d, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x01, 0xff, 0x85, 0xff, + 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x87, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8a, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8d, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0x92, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x96, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xff, 0x00, 0x9e, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xac, 0xff, 0xff, 0x00, 0xb9, 0xff, 0xff, 0x00, 0xce, 0xff, 0xff, 0x00, 0xec, 0xff, 0xff, 0x00, 0xff, 0xed, 0xff, 0x00, 0xff, 0xce, 0xff, 0x00, 0xff, 0xb9, 0xff, 0x00, 0xff, 0xad, 0xff, 0x01, 0xff, 0xa4, 0xff, 0x00, 0xff, 0x9e, 0xff, 0x00, 0xff, 0x98, 0xff, 0x00, 0xff, 0x97, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x92, 0xff, 0x00, 0xff, 0x90, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8b, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xfe, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, + 0x00, 0x82, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x01, 0x81, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x84, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x86, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x89, 0xff, 0xff, 0x00, 0x8b, 0xff, 0xff, 0x00, 0x8c, 0xff, 0xff, 0x00, 0x8e, 0xff, 0xff, 0x00, 0x91, 0xff, 0xff, 0x00, 0x94, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0xa3, 0xff, 0xff, 0x00, 0xb6, 0xff, 0xff, 0x00, 0xdf, 0xff, 0xff, 0x00, 0xff, 0xde, 0xff, 0x00, 0xff, 0xb5, 0xff, 0x00, 0xff, 0xa3, 0xff, 0x01, 0xff, 0x9a, 0xff, 0x00, 0xff, 0x94, 0xff, 0x00, 0xff, 0x91, 0xff, 0x00, 0xff, 0x8e, 0xff, 0x00, 0xff, 0x8c, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x8a, 0xff, 0x00, 0xff, 0x89, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x87, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x86, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xfe, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x83, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, + 0x00, 0x81, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xfe, 0xff, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xfe, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x81, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x82, 0xff, 0xff, 0x00, 0x83, 0xff, 0xff, 0x00, 0x85, 0xff, 0xff, 0x00, 0x88, 0xff, 0xff, 0x00, 0x99, 0xff, 0xff, 0x00, 0xff, 0x9b, 0xff, 0x00, 0xff, 0x88, 0xff, 0x00, 0xff, 0x85, 0xff, 0x00, 0xff, 0x84, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x82, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x81, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xfe, 0x80, 0xff, 0x00, 0xfe, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x80, 0xff, 0x00, 0xff, 0x80, 0xff, + 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7e, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x01, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x78, 0xff, 0x01, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7f, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, 0x00, 0xff, 0x7e, 0xff, + 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7c, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xfe, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xfe, 0x7c, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7d, 0xff, 0x00, 0xff, 0x7c, 0xff, 0x00, 0xff, 0x7d, 0xff, + 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7b, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x01, 0x7a, 0xff, 0xff, 0x00, 0x7a, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x65, 0xfe, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x01, 0x58, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7a, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, 0x00, 0xff, 0x7b, 0xff, + 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x79, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xfe, 0x79, 0xff, 0x00, 0xff, 0x78, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, 0x00, 0xff, 0x79, 0xff, + 0x00, 0x78, 0xff, 0xff, 0x00, 0x78, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x77, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xfe, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x73, 0xff, 0x01, 0xff, 0x73, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, 0x00, 0xff, 0x77, 0xff, + 0x00, 0x76, 0xff, 0xff, 0x00, 0x76, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xfe, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x75, 0xff, 0x00, 0xff, 0x76, 0xff, 0x00, 0xff, 0x76, 0xff, + 0x00, 0x75, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x74, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x73, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xfe, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x01, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4c, 0xfe, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x01, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xfe, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, 0x00, 0xff, 0x74, 0xff, + 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x72, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x01, 0x68, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x72, 0xff, 0x00, 0xff, 0x73, 0xff, 0x00, 0xff, 0x73, 0xff, + 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x71, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x68, 0xfe, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xfe, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xfe, 0x70, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x70, 0xff, 0x00, 0xff, 0x71, 0xff, 0x00, 0xff, 0x71, 0xff, + 0x00, 0x70, 0xff, 0xff, 0x00, 0x70, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6f, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x01, 0xff, 0x6e, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x6f, 0xff, 0x00, 0xff, 0x70, 0xff, + 0x00, 0x6e, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xfe, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xfe, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6d, 0xff, 0x00, 0xff, 0x6e, 0xff, + 0x00, 0x6d, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6c, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x01, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, 0x00, 0xff, 0x6c, 0xff, + 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6b, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x53, 0xfe, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x44, 0xfe, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x33, 0xff, 0x01, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6a, 0xff, 0x00, 0xff, 0x6b, 0xff, 0x00, 0xff, 0x6a, 0xff, + 0x00, 0x6a, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x69, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xfe, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xfe, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3c, 0xfe, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x01, 0x14, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x68, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, 0x00, 0xff, 0x69, 0xff, + 0x00, 0x68, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x67, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x01, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x01, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x67, 0xff, 0x00, 0xff, 0x68, 0xff, + 0x00, 0x66, 0xff, 0xff, 0x00, 0x66, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x01, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xfe, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x16, 0xfe, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xfe, 0x0d, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x65, 0xff, 0x00, 0xff, 0x66, 0xff, 0x00, 0xff, 0x67, 0xff, + 0x00, 0x65, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x64, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x57, 0xfe, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2e, 0xfe, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x64, 0xff, 0x00, 0xff, 0x65, 0xff, + 0x00, 0x63, 0xff, 0xff, 0x00, 0x63, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x01, 0xff, 0x58, 0xff, 0x01, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, 0x00, 0xff, 0x63, 0xff, 0x00, 0xff, 0x64, 0xff, + 0x00, 0x62, 0xff, 0xff, 0x00, 0x62, 0xff, 0xff, 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0b, 0xfe, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xfe, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x61, 0xff, 0x00, 0xff, 0x62, 0xff, + 0x00, 0x61, 0xff, 0xff, 0x00, 0x60, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5f, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x60, 0xff, 0x00, 0xff, 0x60, 0xff, + 0x00, 0x60, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x59, 0xff, 0x01, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5e, 0xff, 0x00, 0xff, 0x5f, 0xff, 0x00, 0xff, 0x5f, 0xff, + 0x00, 0x5e, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xfe, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, 0x00, 0xff, 0x5e, 0xff, + 0x00, 0x5d, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5b, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5c, 0xff, 0x00, 0xff, 0x5d, 0xff, + 0x00, 0x5b, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x5a, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xfe, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xfe, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2a, 0xfe, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x50, 0xff, 0x01, 0xff, 0x51, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5b, 0xff, 0x00, 0xff, 0x5b, 0xff, + 0x01, 0x59, 0xff, 0xff, 0x00, 0x59, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xfe, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x01, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x01, 0xff, 0x02, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xfe, 0x58, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x59, 0xff, 0x00, 0xff, 0x5a, 0xff, + 0x00, 0x59, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xfe, 0x4b, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x58, 0xff, + 0x00, 0x58, 0xff, 0xff, 0x00, 0x57, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x55, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, 0x00, 0xff, 0x57, 0xff, 0x00, 0xff, 0x57, 0xff, + 0x00, 0x56, 0xff, 0xff, 0x00, 0x56, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xfe, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x55, 0xff, 0x00, 0xff, 0x56, 0xff, + 0x00, 0x55, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x54, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x01, 0x4c, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xfe, 0x15, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xfe, 0x39, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x54, 0xff, 0x00, 0xff, 0x54, 0xff, + 0x00, 0x53, 0xff, 0xff, 0x00, 0x53, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x01, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x52, 0xff, 0x00, 0xff, 0x53, 0xff, 0x00, 0xff, 0x53, 0xff, + 0x00, 0x52, 0xff, 0xff, 0x00, 0x52, 0xff, 0xff, 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xfe, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x01, 0x2b, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xfe, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x53, 0xff, + 0x00, 0x51, 0xff, 0xff, 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xfe, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x01, 0xff, 0x20, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x01, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xfe, 0x4b, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, 0x00, 0xff, 0x51, 0xff, 0x00, 0xff, 0x51, 0xff, + 0x00, 0x50, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xfe, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, 0x00, 0xff, 0x50, 0xff, + 0x00, 0x4f, 0xff, 0xff, 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x01, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4d, 0xff, 0x00, 0xff, 0x4e, 0xff, 0x00, 0xff, 0x4f, 0xff, + 0x00, 0x4e, 0xff, 0xff, 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4c, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xfe, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x01, 0x0d, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x08, 0xff, 0x01, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x00, 0xff, 0x4c, 0xff, 0x00, 0xfe, 0x4d, 0xff, 0x00, 0xff, 0x4d, 0xff, + 0x00, 0x4d, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xfe, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x01, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4b, 0xff, 0x01, 0xff, 0x4c, 0xff, 0x00, 0xff, 0x4d, 0xff, + 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4b, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x4a, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x26, 0xff, 0x01, 0xff, 0x28, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x01, 0xff, 0x47, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4a, 0xff, 0x00, 0xff, 0x4c, 0xff, + 0x00, 0x4b, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0e, 0xfe, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x31, 0xff, 0x01, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, 0x00, 0xff, 0x4a, 0xff, + 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x01, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x4a, 0xff, + 0x00, 0x49, 0xff, 0xff, 0x00, 0x48, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x01, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x48, 0xff, 0x00, 0xff, 0x49, 0xff, + 0x00, 0x47, 0xff, 0xff, 0x00, 0x47, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x46, 0xff, 0x00, 0xff, 0x47, 0xff, 0x00, 0xff, 0x48, 0xff, + 0x00, 0x47, 0xff, 0xff, 0x00, 0x46, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x01, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x47, 0xff, + 0x00, 0x46, 0xff, 0xff, 0x00, 0x45, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x24, 0xff, 0x01, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, 0x00, 0xff, 0x45, 0xff, + 0x00, 0x44, 0xff, 0xff, 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x01, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, 0x00, 0xff, 0x44, 0xff, 0x00, 0xff, 0x45, 0xff, + 0x00, 0x44, 0xff, 0xff, 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x01, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x01, 0x28, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x18, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xfe, 0x43, 0xff, 0x00, 0xff, 0x43, 0xff, + 0x00, 0x43, 0xff, 0xff, 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x01, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x01, 0x2c, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x29, 0xfe, 0xff, 0x00, 0x28, 0xff, 0xff, 0x01, 0x26, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x14, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x05, 0xff, 0xff, 0x00, 0x02, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x08, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, 0x00, 0xff, 0x43, 0xff, + 0x00, 0x42, 0xff, 0xff, 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xfe, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1d, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x12, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0d, 0xff, 0x00, 0xff, 0x0f, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x17, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x20, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2f, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x35, 0xff, 0x01, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x41, 0xff, 0x00, 0xff, 0x42, 0xff, + 0x00, 0x41, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3f, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x01, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x39, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x36, 0xfe, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x31, 0xff, 0xff, 0x00, 0x2f, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2d, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x28, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x25, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x22, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1b, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x10, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0d, 0xff, 0xff, 0x00, 0x0b, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x08, 0xff, 0xff, 0x00, 0x06, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x03, 0xff, 0x00, 0xff, 0x04, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x0a, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x12, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x14, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1b, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1f, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x24, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x28, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x40, 0xff, 0x00, 0xff, 0x42, 0xff, + 0x00, 0x40, 0xff, 0xff, 0x00, 0x40, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3e, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xff, 0x00, 0x3c, 0xff, 0xff, 0x00, 0x3b, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x3a, 0xff, 0xff, 0x00, 0x38, 0xff, 0xff, 0x00, 0x37, 0xff, 0xff, 0x00, 0x36, 0xff, 0xff, 0x00, 0x35, 0xff, 0xff, 0x00, 0x34, 0xff, 0xff, 0x00, 0x33, 0xff, 0xff, 0x00, 0x32, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x30, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2e, 0xff, 0xff, 0x00, 0x2c, 0xff, 0xff, 0x00, 0x2b, 0xff, 0xff, 0x00, 0x2a, 0xff, 0xff, 0x00, 0x29, 0xff, 0xff, 0x00, 0x27, 0xff, 0xff, 0x00, 0x26, 0xff, 0xff, 0x00, 0x24, 0xff, 0xff, 0x00, 0x23, 0xff, 0xff, 0x00, 0x21, 0xff, 0xff, 0x00, 0x20, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1e, 0xff, 0xff, 0x00, 0x1c, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xff, 0x00, 0x19, 0xff, 0xff, 0x00, 0x17, 0xff, 0xff, 0x00, 0x16, 0xff, 0xff, 0x00, 0x15, 0xff, 0xff, 0x00, 0x13, 0xff, 0xff, 0x00, 0x11, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0e, 0xff, 0xff, 0x00, 0x0c, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x07, 0xff, 0xff, 0x00, 0x04, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0x00, 0xff, 0x02, 0xff, 0x00, 0xff, 0x05, 0xff, 0x00, 0xff, 0x06, 0xff, 0x00, 0xff, 0x07, 0xff, 0x00, 0xff, 0x09, 0xff, 0x00, 0xff, 0x0b, 0xff, 0x00, 0xff, 0x0c, 0xff, 0x00, 0xff, 0x0e, 0xff, 0x00, 0xff, 0x10, 0xff, 0x00, 0xff, 0x11, 0xff, 0x00, 0xff, 0x13, 0xff, 0x00, 0xff, 0x15, 0xff, 0x00, 0xff, 0x16, 0xff, 0x00, 0xff, 0x18, 0xff, 0x00, 0xff, 0x19, 0xff, 0x00, 0xff, 0x1a, 0xff, 0x00, 0xff, 0x1c, 0xff, 0x00, 0xff, 0x1d, 0xff, 0x00, 0xff, 0x1e, 0xff, 0x00, 0xff, 0x21, 0xff, 0x00, 0xff, 0x22, 0xff, 0x00, 0xff, 0x23, 0xff, 0x00, 0xff, 0x25, 0xff, 0x00, 0xff, 0x26, 0xff, 0x00, 0xff, 0x27, 0xff, 0x00, 0xff, 0x29, 0xff, 0x00, 0xff, 0x2a, 0xff, 0x00, 0xff, 0x2b, 0xff, 0x00, 0xff, 0x2c, 0xff, 0x00, 0xff, 0x2d, 0xff, 0x00, 0xff, 0x2e, 0xff, 0x00, 0xff, 0x30, 0xff, 0x00, 0xff, 0x31, 0xff, 0x00, 0xff, 0x32, 0xff, 0x00, 0xff, 0x33, 0xff, 0x00, 0xff, 0x34, 0xff, 0x00, 0xff, 0x35, 0xff, 0x00, 0xff, 0x36, 0xff, 0x00, 0xff, 0x37, 0xff, 0x00, 0xff, 0x38, 0xff, 0x00, 0xff, 0x39, 0xff, 0x00, 0xff, 0x3a, 0xff, 0x00, 0xff, 0x3b, 0xff, 0x00, 0xff, 0x3c, 0xff, 0x00, 0xff, 0x3d, 0xff, 0x00, 0xff, 0x3e, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x3f, 0xff, 0x00, 0xff, 0x40, 0xff, +}; + +const lv_image_dsc_t img_render_arc_bg = { + .header.cf = LV_COLOR_FORMAT_ARGB8888, + .header.always_zero = 0, + .header.w = 100, + .header.h = 100, + .data_size = 0, + .data = img_render_arc_bg_map, +}; diff --git a/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_argb8888.c b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_argb8888.c new file mode 100644 index 000000000..4095e1dee --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_argb8888.c @@ -0,0 +1,66 @@ +#ifdef __has_include + #if __has_include("lvgl.h") + #ifndef LV_LVGL_H_INCLUDE_SIMPLE + #define LV_LVGL_H_INCLUDE_SIMPLE + #endif + #endif +#endif + +#if defined(LV_LVGL_H_INCLUDE_SIMPLE) + #include "lvgl.h" +#else + #include "lvgl/lvgl.h" +#endif + + +#ifndef LV_ATTRIBUTE_MEM_ALIGN + #define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_ARGB8888 + #define LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_ARGB8888 +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_ARGB8888 uint8_t +img_render_lvgl_logo_argb8888_map[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x1f, 0x1f, 0x42, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1f, 0x66, 0x20, 0x1f, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1f, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1f, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1f, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1f, 0x66, 0x20, 0x1f, 0x1e, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1e, 0x1f, 0x66, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1e, 0x1e, 0x66, 0x22, 0x22, 0x1b, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x21, 0x1f, 0x1e, 0x9b, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xfe, 0x20, 0x20, 0x1d, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x1f, 0x1f, 0x42, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xf2, 0x00, 0x00, 0x00, 0x03, + 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xf5, 0x21, 0x1f, 0x1d, 0x7a, 0x22, 0x1e, 0x1e, 0x8f, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x1f, 0x1f, 0x1f, 0x32, + 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x1f, 0x1e, 0xbd, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x20, 0x1e, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x1a, 0x1a, 0x0a, 0x21, 0x1f, 0x1e, 0xde, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xd6, 0x21, 0x1e, 0x1d, 0xe1, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x20, 0x1e, 0x1f, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x20, 0x20, 0x21, 0x40, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1b, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1f, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x21, 0x1d, 0x1c, 0x3d, 0x22, 0x1f, 0x1e, 0xcd, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xcc, 0x0a, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x01, 0x00, 0xd8, 0x54, 0x00, 0x00, 0x00, 0x00, 0x21, 0x1e, 0x1e, 0x6d, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xda, 0x29, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1f, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd6, 0x66, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd6, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1f, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd8, 0x5c, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd4, 0x1e, 0x21, 0x1e, 0x1e, 0x45, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd6, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x01, 0xd7, 0x33, 0x00, 0x00, 0xd8, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x21, 0x21, 0x1f, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x22, 0x1e, 0x1e, 0x43, 0x20, 0x1f, 0x1f, 0xd1, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xcd, 0x0a, 0x00, 0x01, 0xd8, 0x62, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x01, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x0a, 0x00, 0x00, 0xd8, 0x62, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x21, 0x1e, 0x1e, 0x6d, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0x28, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0x28, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x01, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x22, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x01, 0xd7, 0x33, 0x21, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x23, 0x1e, 0x1e, 0x33, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x66, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x24, 0x1e, 0x1e, 0x2b, + 0x00, 0x00, 0xd7, 0x66, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x66, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd7, 0x33, 0x20, 0x1e, 0x1e, 0x66, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1d, 0xe1, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xd8, 0x5c, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd6, 0x1f, 0x00, 0x00, 0xd8, 0x5c, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd6, 0x1f, 0x20, 0x20, 0x1d, 0x47, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xea, 0x21, 0x1c, 0x1d, 0x3d, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0xd7, 0x33, 0x01, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd9, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd6, 0x33, 0x00, 0x01, 0xd7, 0x33, 0x01, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd6, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd7, 0x33, 0x00, 0x00, 0xd9, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x1c, 0x1c, 0x25, 0x23, 0x1e, 0x1e, 0x33, 0x22, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x23, 0x1e, 0x1e, 0x33, 0x20, 0x20, 0x20, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +const lv_img_dsc_t img_render_lvgl_logo_argb8888 = { + .header.cf = LV_COLOR_FORMAT_ARGB8888, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 30, + .header.h = 30, + .data_size = 900 * 4, + .data = img_render_lvgl_logo_argb8888_map, +}; diff --git a/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_rgb565.c b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_rgb565.c new file mode 100644 index 000000000..124e65bc2 --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_rgb565.c @@ -0,0 +1,67 @@ +#ifdef __has_include + #if __has_include("lvgl.h") + #ifndef LV_LVGL_H_INCLUDE_SIMPLE + #define LV_LVGL_H_INCLUDE_SIMPLE + #endif + #endif +#endif + +#if defined(LV_LVGL_H_INCLUDE_SIMPLE) + #include "lvgl.h" +#else + #include "lvgl/lvgl.h" +#endif + + +#ifndef LV_ATTRIBUTE_MEM_ALIGN + #define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_RGB565 + #define LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_RGB565 +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_RGB565 uint8_t +img_render_lvgl_logo_rgb565_map[] = { + /*Pixel format: Red: 5 bit, Green: 6 bit, Blue: 5 bit*/ + 0xff, 0xff, 0xff, 0xff, 0x1c, 0xe7, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x7a, 0xd6, 0x9e, 0xf7, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x75, 0xad, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x25, 0x21, 0x9a, 0xd6, 0xff, 0xff, + 0x1c, 0xe7, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x49, 0x4a, 0xff, 0xff, + 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x08, 0x42, 0x18, 0xc6, 0xb6, 0xb5, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0xf7, 0xbd, 0xff, 0xff, 0xff, 0xff, 0x92, 0x94, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0xd3, 0x9c, 0xff, 0xff, 0xff, 0xff, 0x4d, 0x6b, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0xaf, 0x73, 0x2d, 0x6b, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x1c, 0xe7, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0xff, 0xff, 0xbe, 0xf7, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x3c, 0xe7, 0x10, 0x84, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0xff, 0xff, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0xdb, 0xf6, 0xff, 0xff, 0x59, 0xce, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x7e, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x9a, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x9e, 0xff, 0x1c, 0xe7, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0xff, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x9e, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9e, 0xf7, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x1c, 0xe7, 0xcf, 0x7b, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0xff, 0xff, 0x9a, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0xdb, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x9a, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0x79, 0xf6, 0xdb, 0xfe, 0xff, 0xff, 0x59, 0xce, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x7e, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x7e, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x5d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x7d, 0xef, + 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x79, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x5d, 0xff, 0x7a, 0xd6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x2d, 0x6b, 0xff, 0xff, + 0x9a, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x9e, 0xff, 0x9a, 0xf6, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x00, 0xd8, 0x9e, 0xff, 0xfc, 0xe6, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0x04, 0x21, 0xcb, 0x5a, 0x3c, 0xe7, 0xff, 0xff, + 0xff, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x5d, 0xff, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0x9e, 0xf7, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0x5d, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +const lv_img_dsc_t img_render_lvgl_logo_rgb565 = { + .header.cf = LV_COLOR_FORMAT_RGB565, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 30, + .header.h = 30, + .data_size = 900 * 2, + .data = img_render_lvgl_logo_rgb565_map, +}; diff --git a/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_rgb888.c b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_rgb888.c new file mode 100644 index 000000000..d3deff2dc --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_rgb888.c @@ -0,0 +1,206 @@ +#ifdef __has_include + #if __has_include("lvgl.h") + #ifndef LV_LVGL_H_INCLUDE_SIMPLE + #define LV_LVGL_H_INCLUDE_SIMPLE + #endif + #endif +#endif + +#if defined(LV_LVGL_H_INCLUDE_SIMPLE) + #include "lvgl.h" +#else + #include "lvgl/lvgl.h" +#endif + + +#ifndef LV_ATTRIBUTE_MEM_ALIGN + #define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_RGB888 + #define LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_RGB888 +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_RGB888 uint8_t +img_render_lvgl_logo_rgb888_map[] = { + + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xdf, 0xdf, 0xdf, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, + 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, + 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, + 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, + 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, 0xcb, + 0xcb, 0xed, 0xed, 0xed, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xa9, 0xa9, 0xa9, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x25, 0x23, 0x22, 0xcf, 0xcf, + 0xcf, 0xfe, 0xfe, 0xfe, 0xdf, 0xdf, 0xdf, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x47, 0x47, 0x46, 0xfd, 0xfd, 0xfd, 0xcb, 0xcb, + 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x41, 0x40, 0x3f, 0xbf, 0xbf, 0xbf, 0xb1, 0xb1, 0xb1, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe7, 0xe7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xb9, 0xb9, 0xb9, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x8d, 0x8d, 0x8d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, + 0xe6, 0xe6, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x98, 0x97, 0x97, 0xfe, 0xfe, 0xfe, 0xfa, 0xfa, 0xfa, + 0x68, 0x68, 0x68, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xcb, 0xcb, 0xcb, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x73, 0x72, 0x72, 0x64, 0x64, 0x64, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, + 0xe0, 0xe0, 0xe0, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xfe, 0xfe, 0xfe, 0xf2, 0xf2, 0xf2, + 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, + 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe2, 0xe1, 0xe1, 0x7d, 0x7d, 0x7c, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0xe7, 0xe6, 0xe6, 0xfa, 0xfa, 0xfd, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, + 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xd5, 0xd5, 0xf2, 0xfe, + 0xfe, 0xfe, 0xc7, 0xc7, 0xc7, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, + 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xeb, 0xeb, 0xf8, 0xcb, 0xcb, 0xcb, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, + 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, + 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, + 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, + 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0xe7, 0xe6, 0xe6, 0xd0, 0xd0, 0xf1, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xf0, + 0xf0, 0xfa, 0xdd, 0xdd, 0xdd, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xfe, 0xfe, + 0xfe, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, + 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xef, 0xef, 0xf9, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xf0, + 0xf0, 0xf0, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, + 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xde, 0xde, 0xde, 0x78, 0x78, 0x78, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xfa, 0xfa, 0xfd, 0xcd, 0xcd, 0xf0, 0xca, 0xca, + 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, + 0xd7, 0xd7, 0xf3, 0xfe, 0xfe, 0xfe, 0xfa, 0xfa, 0xfd, 0xcd, 0xcd, 0xf0, 0xca, 0xca, 0xef, 0xca, + 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xca, 0xca, 0xef, 0xd7, 0xd7, + 0xf3, 0xfe, 0xfe, 0xfe, 0xc7, 0xc7, 0xc7, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, + 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xec, 0xec, 0xf8, + 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xec, 0xec, 0xf8, 0xcb, 0xcb, + 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0xe6, 0xe6, 0xf7, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, + 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, + 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xca, 0xca, + 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, + 0x1d, 0xe7, 0xe6, 0xe6, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, + 0xe6, 0xf7, 0xca, 0xca, 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, + 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0xea, 0xea, 0xea, 0xca, 0xca, + 0xef, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xca, 0xca, 0xef, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0xe6, 0xe6, 0xf7, 0xcb, 0xcb, 0xcb, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, + 0x1e, 0x1d, 0x64, 0x64, 0x64, 0xfe, 0xfe, 0xfe, 0xd0, 0xd0, 0xf1, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, + 0x0, 0x0, 0xd7, 0xf0, 0xf0, 0xfa, 0xd0, 0xd0, 0xf1, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, + 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, 0xd7, 0x0, 0x0, + 0xd7, 0xf0, 0xf0, 0xfa, 0xdc, 0xdc, 0xdc, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, + 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x20, 0x1e, 0x1d, 0x56, 0x56, 0x56, 0xe2, 0xe1, 0xe1, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, + 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xec, 0xec, 0xf8, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, + 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xe6, 0xe6, 0xf7, 0xec, 0xec, 0xf8, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xed, 0xed, 0xed, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, 0xe7, 0xe6, 0xe6, + 0xe7, 0xe6, 0xe6, 0xfb, 0xfa, 0xfa, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, +}; + +const lv_img_dsc_t img_render_lvgl_logo_rgb888 = { + .header.cf = LV_COLOR_FORMAT_RGB888, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 30, + .header.h = 30, + .data_size = 900 * 3, + .data = img_render_lvgl_logo_rgb888_map, +}; diff --git a/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_xrgb8888.c b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_xrgb8888.c new file mode 100644 index 000000000..aa668a521 --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/assets/img_render_lvgl_logo_xrgb8888.c @@ -0,0 +1,66 @@ +#ifdef __has_include + #if __has_include("lvgl.h") + #ifndef LV_LVGL_H_INCLUDE_SIMPLE + #define LV_LVGL_H_INCLUDE_SIMPLE + #endif + #endif +#endif + +#if defined(LV_LVGL_H_INCLUDE_SIMPLE) + #include "lvgl.h" +#else + #include "lvgl/lvgl.h" +#endif + + +#ifndef LV_ATTRIBUTE_MEM_ALIGN + #define LV_ATTRIBUTE_MEM_ALIGN +#endif + +#ifndef LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_XRGB8888 + #define LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_XRGB8888 +#endif + +const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_RENDER_LVGL_LOGO_XRGB8888 uint8_t +img_render_lvgl_logo_xrgb8888_map[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xff, 0xcc, 0xcc, 0xcd, 0xff, 0xcc, 0xcd, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcd, 0xff, 0xcc, 0xcd, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcd, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcd, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0xee, 0xee, 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0xff, 0xaa, 0xaa, 0xaa, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x26, 0x24, 0x23, 0xff, 0xd0, 0xd0, 0xd0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xe0, 0xe0, 0xe0, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x48, 0x48, 0x47, 0xff, 0xfe, 0xfe, 0xfe, 0xff, + 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x42, 0x41, 0x40, 0xff, 0xc0, 0xc0, 0xc0, 0xff, 0xb2, 0xb2, 0xb2, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe8, 0xe8, 0xff, + 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xba, 0xba, 0xba, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0x8e, 0x8e, 0x8e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x99, 0x98, 0x98, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xfb, 0xff, 0x69, 0x69, 0x69, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe9, 0xe7, 0xe7, 0xff, + 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x74, 0x73, 0x73, 0xff, 0x65, 0x65, 0x65, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xe1, 0xe1, 0xe1, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe9, 0xe7, 0xe7, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf3, 0xf3, 0xf3, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe9, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe6, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe9, 0xe7, 0xe7, 0xff, 0xe3, 0xe2, 0xe3, 0xff, 0x7e, 0x7e, 0x7d, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xfb, 0xfb, 0xfe, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xca, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xd6, 0xd6, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xec, 0xec, 0xf9, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf9, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe9, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf1, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf9, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xd1, 0xd1, 0xf2, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xf1, 0xf1, 0xfb, 0xff, 0xde, 0xde, 0xde, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe9, 0xe7, 0xe7, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe6, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe6, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xf0, 0xf0, 0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xf1, 0xf1, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xdf, 0xdf, 0xdf, 0xff, 0x79, 0x79, 0x79, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xfb, 0xfb, 0xfe, 0xff, 0xce, 0xce, 0xf1, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xca, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf1, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xd8, 0xd8, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xfb, 0xfe, 0xff, 0xce, 0xce, 0xf1, 0xff, 0xcb, 0xcb, 0xf1, 0xff, 0xcb, 0xca, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0xd8, 0xd8, 0xf5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc8, 0xc8, 0xc8, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xed, 0xed, 0xf9, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0xed, 0xed, 0xf9, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf1, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcb, 0xca, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf9, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0xe9, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1e, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xe8, 0xe7, 0xe7, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf9, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcd, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1f, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0xeb, 0xeb, 0xeb, 0xff, + 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x01, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcb, 0xcb, 0xf0, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xcc, 0xcc, 0xcc, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x65, 0x64, 0x65, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xd1, 0xd1, 0xf3, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x01, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0xf1, 0xf1, 0xfb, 0xff, 0xd1, 0xd1, 0xf2, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd8, 0xff, 0x00, 0x00, 0xd9, 0xff, 0xf1, 0xf1, 0xfb, 0xff, 0xdd, 0xdd, 0xdd, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x20, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x21, 0x1f, 0x1e, 0xff, 0x57, 0x57, 0x57, 0xff, 0xe3, 0xe2, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe6, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe6, 0xf8, 0xff, 0xed, 0xed, 0xf9, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xe7, 0xe7, 0xf8, 0xff, 0xed, 0xed, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xee, 0xee, 0xef, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xe8, 0xe7, 0xe7, 0xff, 0xfc, 0xfb, 0xfb, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +const lv_img_dsc_t img_render_lvgl_logo_xrgb8888 = { + .header.cf = LV_COLOR_FORMAT_XRGB8888, + .header.always_zero = 0, + .header.reserved = 0, + .header.w = 30, + .header.h = 30, + .data_size = 900 * 4, + .data = img_render_lvgl_logo_xrgb8888_map, +}; diff --git a/project/entry/gui_demo/lvgl/render/render.c b/project/entry/gui_demo/lvgl/render/render.c new file mode 100644 index 000000000..55eaa3bdf --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/render.c @@ -0,0 +1,776 @@ +#include "render.h" + +#include "render.h" +#include "../../src/display/lv_display_private.h" +#include "../../src/core/lv_global.h" + +/********************* + * DEFINES + *********************/ + +#define COL_CNT 8 +#define ROW_CNT 8 +#define DEF_WIDTH 55 +#define DEF_HEIGHT 30 + +/********************** + * TYPEDEFS + **********************/ +typedef struct { + const char * name; + void (*create_cb)(lv_obj_t * parent); +} scene_dsc_t; + +/********************** + * STATIC PROTOTYPES + **********************/ +static lv_opa_t opa_saved; +static void add_to_cell(lv_obj_t * obj, lv_coord_t col, lv_coord_t row); + +static lv_obj_t * fill_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row) +{ + lv_color_t colors[] = {lv_color_hex3(0x000), + lv_color_hex3(0xfff), + lv_color_hex3(0xf00), + lv_color_hex3(0x0f0), + lv_color_hex3(0x00f), + lv_color_hex3(0xff0), + lv_color_hex3(0x0ff), + lv_color_hex3(0xf0f), + }; + + lv_obj_t * obj = lv_obj_create(parent); + lv_obj_remove_style_all(obj); + lv_obj_set_style_opa(obj, opa_saved, 0); + lv_obj_set_style_bg_opa(obj, LV_OPA_COVER, 0); + lv_obj_set_style_bg_color(obj, colors[col], 0); + lv_obj_set_size(obj, DEF_WIDTH, DEF_HEIGHT); + add_to_cell(obj, col, row); + + return obj; + +} + +static void fill_cb(lv_obj_t * parent) +{ + + uint32_t i; + for(i = 0; i < COL_CNT; i++) { + fill_obj_create(parent, i, 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = fill_obj_create(parent, i, 1); + lv_obj_set_style_radius(obj, 10, 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = fill_obj_create(parent, i, 2); + lv_obj_set_style_radius(obj, 100, 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = fill_obj_create(parent, i, 3); + lv_obj_set_style_radius(obj, 10, 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_HOR, 0); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0x888), 0); + lv_obj_set_style_bg_grad_stop(obj, 200, 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = fill_obj_create(parent, i, 4); + lv_obj_set_style_radius(obj, 10, 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0x888), 0); + lv_obj_set_style_bg_grad_stop(obj, 200, 0); + } + + for(i = 0; i < COL_CNT; i++) { + + lv_obj_t * obj = fill_obj_create(parent, i, 5); + lv_obj_set_style_radius(obj, 10, 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_HOR, 0); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0x888), 0); + lv_obj_set_style_bg_grad_opa(obj, LV_OPA_TRANSP, 0); + lv_obj_set_style_bg_grad_stop(obj, 200, 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = fill_obj_create(parent, i, 6); + lv_obj_set_style_radius(obj, 10, 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0x888), 0); + lv_obj_set_style_bg_grad_opa(obj, LV_OPA_TRANSP, 0); + lv_obj_set_style_bg_grad_stop(obj, 200, 0); + } +} + +static lv_obj_t * border_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row) +{ + + lv_obj_t * obj = lv_obj_create(parent); + lv_obj_remove_style_all(obj); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x000), 0); + lv_obj_set_style_border_width(obj, 3, 0); + lv_obj_set_style_opa(obj, opa_saved, 0); + lv_obj_set_size(obj, DEF_WIDTH, DEF_HEIGHT); + add_to_cell(obj, col, row); + + return obj; + +} + +static void border_cb(lv_obj_t * parent) +{ + lv_border_side_t sides[] = { + LV_BORDER_SIDE_NONE, + LV_BORDER_SIDE_FULL, + LV_BORDER_SIDE_LEFT, + LV_BORDER_SIDE_RIGHT, + LV_BORDER_SIDE_TOP, + LV_BORDER_SIDE_BOTTOM, + LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_RIGHT, + LV_BORDER_SIDE_RIGHT | LV_BORDER_SIDE_BOTTOM, + LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_BOTTOM, + LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_TOP, + LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_RIGHT, + LV_BORDER_SIDE_TOP | LV_BORDER_SIDE_BOTTOM, + LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_RIGHT | LV_BORDER_SIDE_BOTTOM, + LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_BOTTOM | LV_BORDER_SIDE_TOP, + LV_BORDER_SIDE_LEFT | LV_BORDER_SIDE_RIGHT | LV_BORDER_SIDE_TOP, + LV_BORDER_SIDE_BOTTOM | LV_BORDER_SIDE_RIGHT | LV_BORDER_SIDE_TOP, + }; + + uint32_t i; + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 0); + lv_obj_set_style_radius(obj, 0, 0); + lv_obj_set_style_border_side(obj, sides[i], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0xf00), 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 1); + lv_obj_set_style_radius(obj, 0, 0); + lv_obj_set_style_border_side(obj, sides[i + 8], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0xf00), 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 2); + lv_obj_set_style_radius(obj, 10, 0); + lv_obj_set_style_border_side(obj, sides[i], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x0f0), 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 3); + lv_obj_set_style_radius(obj, 10, 0); + lv_obj_set_style_border_side(obj, sides[i + 8], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x0f0), 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 4); + lv_obj_set_style_radius(obj, 100, 0); + lv_obj_set_style_border_side(obj, sides[i], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x00f), 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 5); + lv_obj_set_style_radius(obj, 100, 0); + lv_obj_set_style_border_side(obj, sides[i + 8], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x00f), 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 6); + lv_obj_set_style_radius(obj, 100, 0); + lv_obj_set_style_border_side(obj, sides[i], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x888), 0); + lv_obj_set_style_border_width(obj, 10, 0); + } + + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = border_obj_create(parent, i, 7); + lv_obj_set_style_radius(obj, 100, 0); + lv_obj_set_style_border_side(obj, sides[i + 8], 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x888), 0); + lv_obj_set_style_border_width(obj, 10, 0); + } +} + +static lv_obj_t * box_shadow_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row) +{ + lv_obj_t * obj = lv_obj_create(parent); + lv_obj_remove_style_all(obj); + lv_obj_set_style_bg_opa(obj, LV_OPA_20, 0); + lv_obj_set_style_shadow_color(obj, lv_color_hex3(0xf00), 0); + lv_obj_set_style_opa(obj, opa_saved, 0); + lv_obj_set_size(obj, DEF_WIDTH - 20, DEF_HEIGHT - 5); + add_to_cell(obj, col, row); + + return obj; +} + +static void box_shadow_cb(lv_obj_t * parent) +{ + + static const lv_coord_t grid_rows[] = {45, 45, 45, 45, 45, 45, LV_GRID_TEMPLATE_LAST}; + static const lv_coord_t grid_cols[] = {68, 68, 68, 68, 68, 68, 68, LV_GRID_TEMPLATE_LAST}; + lv_obj_set_grid_dsc_array(parent, grid_cols, grid_rows); + + lv_point_t ofs[] = { + {0, 0}, + {5, 5}, + {5, -5}, + {-5, 5}, + {-5, -5}, + {10, 0}, + {0, 10}, + }; + + uint32_t i; + for(i = 0; i < 7; i++) { + lv_obj_t * obj = box_shadow_obj_create(parent, i, 0); + lv_obj_set_style_radius(obj, 0, 0); + lv_obj_set_style_shadow_width(obj, 10, 0); + lv_obj_set_style_shadow_ofs_x(obj, ofs[i].x, 0); + lv_obj_set_style_shadow_ofs_y(obj, ofs[i].y, 0); + } + + for(i = 0; i < 7; i++) { + lv_obj_t * obj = box_shadow_obj_create(parent, i, 1); + lv_obj_set_style_radius(obj, 5, 0); + lv_obj_set_style_shadow_width(obj, 10, 0); + lv_obj_set_style_shadow_ofs_x(obj, ofs[i].x, 0); + lv_obj_set_style_shadow_ofs_y(obj, ofs[i].y, 0); + } + + for(i = 0; i < 7; i++) { + lv_obj_t * obj = box_shadow_obj_create(parent, i, 2); + lv_obj_set_style_radius(obj, 100, 0); + lv_obj_set_style_shadow_width(obj, 10, 0); + lv_obj_set_style_shadow_ofs_x(obj, ofs[i].x, 0); + lv_obj_set_style_shadow_ofs_y(obj, ofs[i].y, 0); + } + + for(i = 0; i < 7; i++) { + lv_obj_t * obj = box_shadow_obj_create(parent, i, 3); + lv_obj_set_style_radius(obj, 5, 0); + lv_obj_set_style_shadow_width(obj, 10, 0); + lv_obj_set_style_shadow_spread(obj, 3, 0); + lv_obj_set_style_shadow_ofs_x(obj, ofs[i].x, 0); + lv_obj_set_style_shadow_ofs_y(obj, ofs[i].y, 0); + } +} + + +static lv_obj_t * text_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row) +{ + + lv_obj_t * obj = lv_label_create(parent); + lv_obj_remove_style_all(obj); + lv_label_set_text(obj, "Hello LVGL! It should be a placeholder: ű. Looks good?"); + lv_obj_set_style_opa(obj, opa_saved, 0); + add_to_cell(obj, col, row); + + return obj; + +} + +static void text_cb(lv_obj_t * parent) +{ + lv_obj_t * obj; + + obj = text_obj_create(parent, 3, 0); + + obj = text_obj_create(parent, 3, 1); + lv_obj_set_style_text_color(obj, lv_color_hex3(0xff0), 0); + + obj = text_obj_create(parent, 3, 2); + lv_label_set_text_selection_start(obj, 12); + lv_label_set_text_selection_end(obj, 21); + lv_obj_set_style_bg_color(obj, lv_color_hex3(0x0ff), LV_PART_SELECTED); + + obj = text_obj_create(parent, 3, 3); + lv_obj_set_style_text_decor(obj, LV_TEXT_DECOR_UNDERLINE, 0); + + obj = text_obj_create(parent, 3, 4); + lv_obj_set_style_text_decor(obj, LV_TEXT_DECOR_STRIKETHROUGH, 0); + + obj = text_obj_create(parent, 3, 5); + lv_obj_set_style_text_decor(obj, LV_TEXT_DECOR_UNDERLINE | LV_TEXT_DECOR_STRIKETHROUGH, 0); + + +} + +static lv_obj_t * image_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row, bool recolor) +{ + lv_obj_t * obj = lv_image_create(parent); + lv_obj_remove_style_all(obj); + if(recolor) { + lv_obj_set_style_image_recolor_opa(obj, LV_OPA_50, 0); + lv_obj_set_style_image_recolor(obj, lv_color_hex3(0x0f0), 0); + } + + lv_obj_set_style_opa(obj, opa_saved, 0); + add_to_cell(obj, col, row); + + return obj; + +} + +static void image_core_cb(lv_obj_t * parent, bool recolor) +{ + LV_IMG_DECLARE(img_render_lvgl_logo_xrgb8888); + LV_IMG_DECLARE(img_render_lvgl_logo_rgb888); + LV_IMG_DECLARE(img_render_lvgl_logo_rgb565); + LV_IMG_DECLARE(img_render_lvgl_logo_argb8888); + const void * srcs[] = { + &img_render_lvgl_logo_argb8888, + &img_render_lvgl_logo_xrgb8888, + &img_render_lvgl_logo_rgb888, + &img_render_lvgl_logo_rgb565, + }; + + const void * names[] = { + "ARGB\n8888", + "XRGB\n8888", + "RGB\n888", + "RGB\n565", + }; + + uint32_t i; + for(i = 0; i < 4; i++) { + lv_obj_t * obj; + + obj = lv_label_create(parent); + lv_label_set_text(obj, names[i]); + add_to_cell(obj, 0, i * 2); + + obj = image_obj_create(parent, 1, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + + obj = image_obj_create(parent, 2, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + lv_image_set_rotation(obj, 300); + lv_image_set_pivot(obj, 0, 0); + + obj = image_obj_create(parent, 3, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + lv_image_set_scale(obj, 400); + lv_image_set_pivot(obj, 0, 0); + + obj = image_obj_create(parent, 4, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + lv_image_set_scale_x(obj, 400); + lv_image_set_pivot(obj, 0, 0); + + obj = image_obj_create(parent, 5, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + lv_image_set_scale_y(obj, 400); + lv_image_set_pivot(obj, 0, 0); + + obj = image_obj_create(parent, 6, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + lv_image_set_rotation(obj, 300); + lv_image_set_scale(obj, 400); + lv_image_set_pivot(obj, 0, 0); + + obj = image_obj_create(parent, 7, i * 2, recolor); + lv_image_set_src(obj, srcs[i]); + lv_image_set_scale_y(obj, 400); + lv_image_set_rotation(obj, 300); + lv_image_set_pivot(obj, 0, 0); + } +} + + +static void image_normal_cb(lv_obj_t * parent) +{ + image_core_cb(parent, false); +} + +static void image_recolored_cb(lv_obj_t * parent) +{ + image_core_cb(parent, true); +} + + +static lv_obj_t * line_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row, lv_point_t p[]) +{ + lv_obj_t * obj = lv_line_create(parent); + lv_obj_remove_style_all(obj); + lv_line_set_points(obj, p, 2); + lv_obj_set_size(obj, DEF_WIDTH, DEF_HEIGHT); + lv_obj_set_style_line_color(obj, lv_color_hex3(0xff0), 0); + lv_obj_set_style_opa(obj, opa_saved, 0); + add_to_cell(obj, col, row); + + return obj; +} + +static void line_cb(lv_obj_t * parent) +{ + + static lv_point_t points[][2] = { + {{5, DEF_HEIGHT / 2}, {DEF_WIDTH - 5, DEF_HEIGHT / 2}}, /* - */ + {{5, DEF_HEIGHT / 2}, {DEF_WIDTH - 5, DEF_HEIGHT / 2 + 1}}, /* - */ + {{5, DEF_HEIGHT / 2}, {DEF_WIDTH - 5, DEF_HEIGHT / 2 - 1}}, /* - */ + {{DEF_WIDTH / 2, 5}, {DEF_WIDTH / 2, DEF_HEIGHT - 5}}, /* | */ + {{DEF_WIDTH / 2, 5}, {DEF_WIDTH / 2 + 1, DEF_HEIGHT - 5}}, /* | */ + {{DEF_WIDTH / 2, 5}, {DEF_WIDTH / 2 - 1, DEF_HEIGHT - 5}}, /* | */ + {{5, 5}, {DEF_WIDTH - 5, DEF_HEIGHT - 5}}, /* \ */ + {{DEF_WIDTH - 5, 5}, {5, DEF_HEIGHT - 5}}, /* / */ + }; + + lv_coord_t widths[] = {1, 3, 5, 10}; + + uint32_t r; + for(r = 0; r < 2; r++) { + uint32_t w; + for(w = 0; w < 4; w++) { + uint32_t i; + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = line_obj_create(parent, i, w + 4 * r, points[i]); + lv_obj_set_style_line_width(obj, widths[w], 0); + lv_obj_set_style_line_rounded(obj, r, 0); + } + } + } +} + +static lv_obj_t * arc_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row, lv_coord_t w, + lv_value_precise_t start, lv_value_precise_t end) +{ + lv_obj_t * obj = lv_arc_create(parent); + lv_obj_remove_style_all(obj); + lv_obj_set_style_arc_width(obj, w, 0); + lv_obj_set_style_opa(obj, opa_saved, 0); + lv_arc_set_bg_angles(obj, start, end); + lv_obj_set_size(obj, DEF_HEIGHT, DEF_HEIGHT); + lv_obj_set_style_line_color(obj, lv_color_hex3(0xff0), 0); + add_to_cell(obj, col, row); + + return obj; +} + +static void arc_core_cb(lv_obj_t * parent, const void * img_src) +{ + static lv_value_precise_t angles[][2] = { + {355, 5}, + {85, 95}, + {175, 185}, + {265, 275}, + {30, 330}, + {120, 60}, + {0, 180}, + {0, 360}, + }; + + lv_coord_t widths[] = {1, 5, 10, 100}; + + uint32_t r; + for(r = 0; r < 2; r++) { + uint32_t w; + for(w = 0; w < 4; w++) { + uint32_t i; + for(i = 0; i < COL_CNT; i++) { + lv_obj_t * obj = arc_obj_create(parent, i, w + 4 * r, widths[w], angles[i][0], angles[i][1]); + lv_obj_set_style_arc_rounded(obj, r, 0); + lv_obj_set_style_arc_image_src(obj, img_src, 0); + } + } + } +} + +static void arc_normal_cb(lv_obj_t * parent) +{ + arc_core_cb(parent, NULL); +} + +static void arc_image_cb(lv_obj_t * parent) +{ + LV_IMAGE_DECLARE(img_render_arc_bg); + arc_core_cb(parent, &img_render_arc_bg); +} + +static void triangle_draw_event_cb(lv_event_t * e) +{ + lv_draw_triangle_dsc_t dsc; + lv_draw_triangle_dsc_init(&dsc); + + lv_obj_t * obj = lv_event_get_target(e); + + lv_point_t * p_rel = lv_event_get_user_data(e); + + dsc.p[0].x = p_rel[0].x + obj->coords.x1 + 8; + dsc.p[0].y = p_rel[0].y + obj->coords.y1 + 2; + dsc.p[1].x = p_rel[1].x + obj->coords.x1 + 8; + dsc.p[1].y = p_rel[1].y + obj->coords.y1 + 2; + dsc.p[2].x = p_rel[2].x + obj->coords.x1 + 8; + dsc.p[2].y = p_rel[2].y + obj->coords.y1 + 2; + + lv_opa_t opa = lv_obj_get_style_opa(obj, 0); + dsc.bg_grad.dir = lv_obj_get_style_bg_grad_dir(obj, 0); + dsc.bg_grad.stops[0].color = lv_obj_get_style_bg_color(obj, 0); + dsc.bg_grad.stops[0].frac = lv_obj_get_style_bg_main_stop(obj, 0); + dsc.bg_grad.stops[0].opa = LV_OPA_MIX2(lv_obj_get_style_bg_main_opa(obj, 0), opa); + dsc.bg_grad.stops[1].color = lv_obj_get_style_bg_grad_color(obj, 0); + dsc.bg_grad.stops[1].frac = lv_obj_get_style_bg_grad_stop(obj, 0); + dsc.bg_grad.stops[1].opa = LV_OPA_MIX2(lv_obj_get_style_bg_grad_opa(obj, 0), opa); + dsc.bg_grad.stops_count = 2; + + dsc.bg_color = dsc.bg_grad.stops[0].color; + dsc.bg_opa = dsc.bg_grad.stops[0].opa; + + lv_draw_triangle(lv_event_get_layer(e), &dsc); +} + + +static lv_obj_t * triangle_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row, lv_point_t p[]) +{ + lv_obj_t * obj = lv_arc_create(parent); + lv_obj_remove_style_all(obj); + lv_obj_set_size(obj, DEF_WIDTH, DEF_HEIGHT); + lv_obj_set_style_bg_color(obj, lv_color_hex3(0xff0), 0); + lv_obj_set_style_opa(obj, opa_saved, 0); + lv_obj_add_event(obj, triangle_draw_event_cb, LV_EVENT_DRAW_MAIN, p); + add_to_cell(obj, col, row); + + return obj; +} + +static void triangle_cb(lv_obj_t * parent) +{ + static lv_point_t points[16][3] = { + + /*Right angle triangles*/ + {{0, 0}, {0, 26}, {26, 26}}, /* |\ */ + {{0, 26}, {26, 0}, {26, 26}}, /* /| */ + {{0, 0}, {26, 0}, {26, 26}}, /* \| */ + {{0, 0}, {0, 26}, {26, 0}}, /* |/ */ + + /*One side vertical or horizontal triangles*/ + {{0, 0}, {26, 0}, {13, 26}}, /* \/ */ + {{0, 26}, {26, 26}, {13, 0 }}, /* /\ */ + {{0, 0}, {0, 26}, {26, 13}}, /* > */ + {{0, 13}, {26, 0}, {26, 26}}, /* < */ + + /*Thin triangles*/ + {{0, 0}, {26, 26}, {13, 18}}, /* \ */ + {{0, 0}, {26, 26}, {13, 8}}, /* \ */ + {{26, 0}, {0, 26}, {13, 18}}, /* / */ + {{26, 0}, {0, 26}, {13, 8}}, /* / */ + + /*General triangles with various point orders*/ + {{0, 1}, {26, 6}, {13, 26}}, /*ABC*/ + {{0, 1}, {13, 26}, {26, 6}}, /*ACB*/ + {{26, 6}, {0, 1}, {13, 26}}, /*BAC*/ + {{13, 26}, {26, 6}, {0, 1}}, /*CBA*/ + }; + + uint32_t i; + for(i = 0; i < 16; i++) { + triangle_obj_create(parent, i % 8, i / 8, points[i]); + } + + for(i = 0; i < 16; i++) { + lv_obj_t * obj = triangle_obj_create(parent, i % 8, 2 + i / 8, points[i]); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0xf00), 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0); + } + + for(i = 0; i < 16; i++) { + lv_obj_t * obj = triangle_obj_create(parent, i % 8, 4 + i / 8, points[i]); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0xf00), 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_HOR, 0); + } + + for(i = 0; i < 8; i++) { + lv_obj_t * obj = triangle_obj_create(parent, i % 8, 6 + i / 8, points[i]); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0xf00), 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0); + lv_obj_set_style_bg_grad_opa(obj, LV_OPA_TRANSP, 0); + } + + for(i = 0; i < 8; i++) { + lv_obj_t * obj = triangle_obj_create(parent, i % 8, 7 + i / 8, points[i]); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0xf00), 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_HOR, 0); + lv_obj_set_style_bg_grad_opa(obj, LV_OPA_TRANSP, 0); + } +} + + +static lv_obj_t * layer_obj_create(lv_obj_t * parent, lv_coord_t col, lv_coord_t row, lv_blend_mode_t blend_mode) +{ + lv_obj_t * obj = lv_obj_create(parent); + lv_obj_remove_style_all(obj); + lv_obj_set_size(obj, DEF_WIDTH - 10, DEF_HEIGHT); + lv_obj_set_style_bg_opa(obj, LV_OPA_COVER, 0); + lv_obj_set_style_bg_color(obj, lv_color_hex3(0xff0), 0); + lv_obj_set_style_bg_grad_color(obj, lv_color_hex3(0xf00), 0); + lv_obj_set_style_bg_grad_dir(obj, LV_GRAD_DIR_VER, 0); + lv_obj_set_style_border_width(obj, 3, 0); + lv_obj_set_style_border_color(obj, lv_color_hex3(0x000), 0); + lv_obj_set_style_transform_pivot_x(obj, 0, 0); + lv_obj_set_style_transform_pivot_y(obj, 0, 0); + lv_obj_set_style_blend_mode(obj, blend_mode, 0); + lv_obj_set_style_opa(obj, opa_saved, 0); + add_to_cell(obj, col, row); + + lv_obj_t * label = lv_label_create(obj); + lv_label_set_text(label, "ABC"); + lv_obj_center(label); + + return obj; +} + +static void layer_core_cb(lv_obj_t * parent, lv_blend_mode_t blend_mode) +{ + + uint32_t i; + for(i = 0; i < 2; i++) { + lv_coord_t row = 4 * i; + lv_obj_t * obj; + + obj = layer_obj_create(parent, 0, row, blend_mode); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 1, row, blend_mode); + lv_obj_set_style_transform_rotation(obj, 300, 0); + lv_obj_set_style_translate_x(obj, 10, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 2, row, blend_mode); + lv_obj_set_style_transform_scale(obj, 400, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 4, row, blend_mode); + lv_obj_set_style_transform_rotation(obj, 300, 0); + lv_obj_set_style_transform_scale(obj, 400, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 5, row, blend_mode); + lv_obj_set_style_transform_scale_x(obj, 400, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 7, row, blend_mode); + lv_obj_set_style_transform_scale_y(obj, 400, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 0, row + 2, blend_mode); + lv_obj_set_style_transform_rotation(obj, 300, 0); + lv_obj_set_style_transform_scale_x(obj, 400, 0); + lv_obj_set_style_translate_x(obj, 10, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 2, row + 2, blend_mode); + lv_obj_set_style_transform_rotation(obj, 300, 0); + lv_obj_set_style_transform_scale_y(obj, 400, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 5, row + 2, blend_mode); + lv_obj_set_style_opa_layered(obj, LV_OPA_50, 0); + lv_obj_set_style_translate_y(obj, 10, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + + obj = layer_obj_create(parent, 7, row + 2, blend_mode); + lv_obj_set_style_opa_layered(obj, LV_OPA_50, 0); + lv_obj_set_style_transform_rotation(obj, 300, 0); + lv_obj_set_style_translate_y(obj, 10, 0); + lv_obj_set_style_radius(obj, 8 * i, 0); + } +} + +static void layer_normal_cb(lv_obj_t * parent) +{ + layer_core_cb(parent, LV_BLEND_MODE_NORMAL); +} + +static void layer_additive_cb(lv_obj_t * parent) +{ + return; /*Not working*/ + + /*Make the parent darker for additive blending*/ + lv_obj_set_style_bg_color(parent, lv_color_hex3(0x008), 0); + layer_core_cb(parent, LV_BLEND_MODE_ADDITIVE); +} + +/********************** + * STATIC VARIABLES + **********************/ + +static scene_dsc_t scenes[] = { + {.name = "fill", .create_cb = fill_cb}, + {.name = "border", .create_cb = border_cb}, + {.name = "box_shadow", .create_cb = box_shadow_cb}, + {.name = "text", .create_cb = text_cb}, + {.name = "image normal", .create_cb = image_normal_cb}, + {.name = "image_recolor", .create_cb = image_recolored_cb}, + {.name = "line", .create_cb = line_cb}, + {.name = "arc_normal", .create_cb = arc_normal_cb}, + {.name = "arc_image", .create_cb = arc_image_cb}, + {.name = "triangle", .create_cb = triangle_cb}, + {.name = "layer_normal", .create_cb = layer_normal_cb}, + {.name = "layer_additive", .create_cb = layer_additive_cb}, + + {.name = "", .create_cb = NULL} +}; + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +void lv_demo_render(uint32_t idx, lv_opa_t opa) +{ + lv_obj_t * scr = lv_screen_active(); + lv_obj_clean(scr); + lv_obj_remove_style_all(scr); + lv_obj_set_style_bg_opa(scr, LV_OPA_COVER, 0); + lv_obj_set_style_text_color(scr, lv_color_black(), 0); + lv_obj_set_style_bg_color(scr, lv_color_white(), 0); + + lv_obj_t * main_parent = lv_obj_create(scr); + lv_obj_remove_style_all(main_parent); + lv_obj_set_style_bg_opa(main_parent, LV_OPA_COVER, 0); + lv_obj_set_style_bg_color(main_parent, lv_color_hex3(0xaaf), 0); + lv_obj_set_size(main_parent, 480, 272); + + static const lv_coord_t grid_cols[] = {60, 60, 60, 60, 60, 60, 60, 60, LV_GRID_TEMPLATE_LAST}; + static const lv_coord_t grid_rows[] = {34, 34, 34, 34, 34, 34, 34, 34, LV_GRID_TEMPLATE_LAST}; + lv_obj_set_grid_dsc_array(main_parent, grid_cols, grid_rows); + + opa_saved = opa; + + if(scenes[idx].create_cb) scenes[idx].create_cb(main_parent); +} + + +const char * lv_demo_render_get_scene_name(lvgl_demo_render_scene_t id) +{ + if(id > _LV_DEMO_RENDER_SCENE_NUM) return NULL; + return scenes[id].name; +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +static void add_to_cell(lv_obj_t * obj, lv_coord_t col, lv_coord_t row) +{ + lv_obj_set_grid_cell(obj, LV_GRID_ALIGN_CENTER, col, 1, LV_GRID_ALIGN_CENTER, row, 1); +} + +int lvgl_demo_render(int argc, char *argv[]) +{ + lv_demo_render(LV_DEMO_RENDER_SCENE_FILL, 0); + return 0; +} diff --git a/project/entry/gui_demo/lvgl/render/render.h b/project/entry/gui_demo/lvgl/render/render.h new file mode 100644 index 000000000..9bcd63d28 --- /dev/null +++ b/project/entry/gui_demo/lvgl/render/render.h @@ -0,0 +1,42 @@ +#ifndef LVGL_DEMO_RENDER_H +#define LVGL_DEMO_RENDER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef enum { + LV_DEMO_RENDER_SCENE_FILL, + LV_DEMO_RENDER_SCENE_BORDER, + LV_DEMO_RENDER_SCENE_BOX_SHADOW, + LV_DEMO_RENDER_SCENE_TEXT, + LV_DEMO_RENDER_SCENE_IMAGE_NORMAL, + LV_DEMO_RENDER_SCENE_IMAGE_RECOLOR, + LV_DEMO_RENDER_SCENE_LINE, + LV_DEMO_RENDER_SCENE_ARC_NORMAL, + LV_DEMO_RENDER_SCENE_ARC_IMAGE, + LV_DEMO_RENDER_SCENE_TRIANGLE, + LV_DEMO_RENDER_SCENE_LAYER_NORMAL, + _LV_DEMO_RENDER_SCENE_NUM, +} lvgl_demo_render_scene_t; + +/** + * Run the render verification for a scenario + * @param id ID of the scenario to run. Element of `lv_demo_render_scene_t` + * @param opa set this opacity for each object + */ +int lv_demo_render(lv_demo_render_scene_t id, lv_opa_t opa); + +const char *lv_demo_render_get_scene_name(lv_demo_render_scene_t id); + +int lvgl_demo_render(int argc, char *argv[]); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/project/entry/gui_demo/lvgl/scroll/demo_scroll.c b/project/entry/gui_demo/lvgl/scroll/demo_scroll.c index dd8893329..6b4127105 100644 --- a/project/entry/gui_demo/lvgl/scroll/demo_scroll.c +++ b/project/entry/gui_demo/lvgl/scroll/demo_scroll.c @@ -2,7 +2,7 @@ static lv_obj_t *list; -static void generic_swicth_event_cb(lv_event_t *e); +static void generic_switch_event_cb(lv_event_t *e); static lv_obj_t *switch_create(lv_obj_t *parent, const char *title, lv_obj_flag_t flag, bool en); int lvgl_demo_scroll(int argc, char *argv[]) @@ -53,7 +53,7 @@ static lv_obj_t *switch_create(lv_obj_t *parent, const char *title, lv_obj_flag_ lv_obj_set_flex_grow(label, 1); lv_obj_t *sw = lv_switch_create(cont); - lv_obj_add_event(sw, generic_swicth_event_cb, LV_EVENT_VALUE_CHANGED, (void *)((lv_uintptr_t) flag)); + lv_obj_add_event(sw, generic_switch_event_cb, LV_EVENT_VALUE_CHANGED, (void *)((lv_uintptr_t) flag)); if (en) { lv_obj_add_state(sw, LV_STATE_CHECKED); lv_obj_add_flag(list, flag); @@ -65,7 +65,7 @@ static lv_obj_t *switch_create(lv_obj_t *parent, const char *title, lv_obj_flag_ return cont; } -static void generic_swicth_event_cb(lv_event_t *e) +static void generic_switch_event_cb(lv_event_t *e) { lv_obj_t *sw = lv_event_get_target(e); lv_obj_flag_t flag = (lv_obj_flag_t)((lv_uintptr_t)lv_event_get_user_data(e)); diff --git a/project/entry/gui_demo/lvgl/transform/demo_transform.c b/project/entry/gui_demo/lvgl/transform/demo_transform.c index 4a765fc74..8e1d5e981 100644 --- a/project/entry/gui_demo/lvgl/transform/demo_transform.c +++ b/project/entry/gui_demo/lvgl/transform/demo_transform.c @@ -115,7 +115,7 @@ static void arc_event_cb(lv_event_t *e) { lv_obj_t *arc = lv_event_get_target(e); - int32_t v = lv_arc_get_angle_end(arc); + int32_t v = (int32_t)lv_arc_get_angle_end(arc); lv_obj_set_style_transform_rotation(card_to_transform, v * 10, 0); } @@ -123,5 +123,6 @@ static void slider_event_cb(lv_event_t *e) { lv_obj_t *slider = lv_event_get_target(e); int32_t v = lv_slider_get_value(slider); - lv_obj_set_style_transform_scale(card_to_transform, v, 0); + lv_obj_set_style_transform_scale_x(card_to_transform, v, 0); + lv_obj_set_style_transform_scale_y(card_to_transform, v, 0); } diff --git a/project/entry/gui_demo/lvgl/widget/widget.c b/project/entry/gui_demo/lvgl/widget/widget.c index 956e08857..96a390d16 100644 --- a/project/entry/gui_demo/lvgl/widget/widget.c +++ b/project/entry/gui_demo/lvgl/widget/widget.c @@ -46,10 +46,13 @@ static void calendar_event_cb(lv_event_t * e); static void slider_event_cb(lv_event_t * e); static void chart_event_cb(lv_event_t * e); static void shop_chart_event_cb(lv_event_t * e); -static void scale2_event_cb(lv_event_t * e); static void scale1_indic1_anim_cb(void * var, int32_t v); static void scale2_timer_cb(lv_timer_t * timer); static void scale3_anim_cb(void * var, int32_t v); +static void scroll_anim_y_cb(void * var, int32_t v); +static void scroll_anim_y_cb(void * var, int32_t v); +static void delete_timer_event_cb(lv_event_t * e); +static void slideshow_anim_ready_cb(lv_anim_t * a_old); /********************** * STATIC VARIABLES @@ -194,6 +197,27 @@ int lvgl_demo_widget(int argc, char *argv[]) return 0; } +void lvgl_demo_widgets_start_slideshow(void) +{ + lv_obj_update_layout(tv); + + lv_obj_t * cont = lv_tabview_get_content(tv); + + lv_obj_t * tab = lv_obj_get_child(cont, 0); + + int32_t v = lv_obj_get_scroll_bottom(tab); + uint32_t t = lv_anim_speed_to_time(lv_display_get_dpi(NULL), 0, v); + lv_anim_t a; + lv_anim_init(&a); + lv_anim_set_exec_cb(&a, scroll_anim_y_cb); + lv_anim_set_time(&a, t); + lv_anim_set_playback_time(&a, t); + lv_anim_set_values(&a, 0, v); + lv_anim_set_var(&a, tab); + lv_anim_set_ready_cb(&a, slideshow_anim_ready_cb); + lv_anim_start(&a); +} + /********************** * STATIC FUNCTIONS **********************/ @@ -739,7 +763,7 @@ static void analytics_create(lv_obj_t * parent) lv_obj_center(arc); lv_timer_t * scale2_timer = lv_timer_create(scale2_timer_cb, 100, scale2); - lv_obj_add_event(scale2, scale2_event_cb, LV_EVENT_DELETE, scale2_timer); + lv_obj_add_event(scale2, delete_timer_event_cb, LV_EVENT_DELETE, scale2_timer); /*Scale 3*/ lv_scale_set_range(scale3, 10, 60); @@ -1534,15 +1558,6 @@ static void scale1_indic1_anim_cb(void * var, int32_t v) lv_label_set_text_fmt(label, "Revenue: %"LV_PRId32" %%", v); } -static void scale2_event_cb(lv_event_t * e) -{ - lv_event_code_t code = lv_event_get_code(e); - if(code == LV_EVENT_DELETE) { - lv_timer_t * scale2_timer = lv_event_get_user_data(e); - if(scale2_timer) lv_timer_delete(scale2_timer); - } -} - static void scale2_timer_cb(lv_timer_t * timer) { LV_UNUSED(timer); @@ -1611,3 +1626,45 @@ static void scale3_anim_cb(void * var, int32_t v) lv_obj_t * label = lv_obj_get_child(scale3, 1); lv_label_set_text_fmt(label, "%"LV_PRId32, v); } + +static void scroll_anim_y_cb(void * var, int32_t v) +{ + lv_obj_scroll_to_y(var, v, LV_ANIM_OFF); +} + +static void delete_timer_event_cb(lv_event_t * e) +{ + lv_event_code_t code = lv_event_get_code(e); + if(code == LV_EVENT_DELETE) { + lv_timer_t * t = lv_event_get_user_data(e); + if(t) lv_timer_delete(t); + } +} + +static void slideshow_anim_ready_cb(lv_anim_t * a_old) +{ + LV_UNUSED(a_old); + + lv_obj_t * cont = lv_tabview_get_content(tv); + uint32_t tab_id = lv_tabview_get_tab_act(tv); + tab_id += 1; + if(tab_id > 2) tab_id = 0; + lv_tabview_set_act(tv, tab_id, LV_ANIM_ON); + + lv_obj_t * tab = lv_obj_get_child(cont, tab_id); + lv_obj_scroll_to_y(tab, 0, LV_ANIM_OFF); + lv_obj_update_layout(tv); + + int32_t v = lv_obj_get_scroll_bottom(tab); + uint32_t t = lv_anim_speed_to_time(lv_display_get_dpi(NULL), 0, v); + + lv_anim_t a; + lv_anim_init(&a); + lv_anim_set_exec_cb(&a, scroll_anim_y_cb); + lv_anim_set_time(&a, t); + lv_anim_set_playback_time(&a, t); + lv_anim_set_values(&a, 0, v); + lv_anim_set_var(&a, tab); + lv_anim_set_ready_cb(&a, slideshow_anim_ready_cb); + lv_anim_start(&a); +} diff --git a/project/entry/gui_demo/lvgl/widget/widget.h b/project/entry/gui_demo/lvgl/widget/widget.h index cf413f582..43b097ab6 100644 --- a/project/entry/gui_demo/lvgl/widget/widget.h +++ b/project/entry/gui_demo/lvgl/widget/widget.h @@ -8,6 +8,7 @@ extern "C" { #include int lvgl_demo_widget(int argc, char *argv[]); +void lvgl_demo_widgets_start_slideshow(void); #ifdef __cplusplus } diff --git a/project/gui/awtk/src/awtk_main.inc b/project/gui/awtk/src/awtk_main.inc index b20e13099..267045d58 100644 --- a/project/gui/awtk/src/awtk_main.inc +++ b/project/gui/awtk/src/awtk_main.inc @@ -66,13 +66,13 @@ int gui_app_start_ex(size_t disp_width, size_t disp_height, int app_type, const } #endif +#ifndef TK_IS_PC #ifdef APP_LCD_ORIENTATION - if (system_info()->app_type != APP_SIMULATOR) { #if defined(APP_ENABLE_FAST_LCD_PORTRAIT) - tk_enable_fast_lcd_portrait(TRUE); + tk_enable_fast_lcd_portrait(TRUE); +#endif + tk_set_lcd_orientation(APP_LCD_ORIENTATION); #endif - tk_set_lcd_orientation(APP_LCD_ORIENTATION); - } #endif system_info_set_default_font(system_info(), app_font); diff --git a/project/gui/awtk/src/base/widget.c b/project/gui/awtk/src/base/widget.c index 92004fbcf..dc6acd2d1 100644 --- a/project/gui/awtk/src/base/widget.c +++ b/project/gui/awtk/src/base/widget.c @@ -49,10 +49,6 @@ #include "blend/image_g2d.h" #include "base/style_const.h" -#ifndef WITH_FS_RES -#define WITH_FS_RES 1 -#endif - ret_t widget_focus_up(widget_t* widget); ret_t widget_focus_down(widget_t* widget); ret_t widget_focus_left(widget_t* widget); @@ -1609,6 +1605,25 @@ ret_t widget_draw_icon_text(widget_t* widget, canvas_t* c, const char* icon, wst return RET_OK; } +ret_t widget_draw_image_with_region(widget_t* widget, canvas_t* c, bitmap_t* img, + const char* region, const rect_t* dst, image_draw_type_t draw_type) { + rect_t src; + return_value_if_fail(widget != NULL && img != NULL, RET_BAD_PARAMS); + return_value_if_fail(c != NULL && region != NULL && dst != NULL, RET_BAD_PARAMS); + + if (tk_str_eq(region, "#")) { + src = rect_init(widget->x, widget->y, widget->w, widget->h); + } else if (tk_str_eq(region, "#g")) { + point_t p = {widget->x, widget->y}; + widget_to_global(widget, &p); + src = rect_init(p.x, p.y, widget->w, widget->h); + } else { + image_region_parse(img->w, img->h, region, &src); + } + + return canvas_draw_image_ex2(c, img, draw_type, &src, dst); +} + ret_t widget_fill_rect(widget_t* widget, canvas_t* c, const rect_t* r, bool_t bg, image_draw_type_t draw_type) { bitmap_t img; @@ -1659,33 +1674,14 @@ ret_t widget_fill_rect(widget_t* widget, canvas_t* c, const rect_t* r, bool_t bg } if (image_name != NULL && *image_name && r->w > 0 && r->h > 0) { - char name[MAX_PATH + 1]; - const char* region = strrchr(image_name, '#'); - if (region != NULL) { - memset(name, 0x00, sizeof(name)); - tk_strncpy(name, image_name, region - image_name); - image_name = name; - } - if (widget_load_image(widget, image_name, &img) == RET_OK) { + const char* region = strrchr(image_name, '#'); draw_type = (image_draw_type_t)style_get_int(style, draw_type_key, draw_type); if (region == NULL) { canvas_draw_image_ex(c, &img, draw_type, r); } else { - rect_t src; - rect_t dst = *r; - if (tk_str_eq(region, "#")) { - src = rect_init(widget->x, widget->y, widget->w, widget->h); - } else if (tk_str_eq(region, "#g")) { - point_t p = {widget->x, widget->y}; - widget_to_global(widget, &p); - src = rect_init(p.x, p.y, widget->w, widget->h); - } else { - image_region_parse(img.w, img.h, region, &src); - } - - canvas_draw_image_ex2(c, &img, draw_type, &src, &dst); + widget_draw_image_with_region(widget, c, &img, region, r, draw_type); } } } @@ -4036,11 +4032,19 @@ float_t widget_measure_text(widget_t* widget, const wchar_t* text) { } ret_t widget_load_image(widget_t* widget, const char* name, bitmap_t* bitmap) { + char real_name[MAX_PATH+1]; + const char* region = NULL; image_manager_t* imm = widget_get_image_manager(widget); return_value_if_fail(imm != NULL, RET_BAD_PARAMS); return_value_if_fail(widget != NULL && name != NULL && bitmap != NULL, RET_BAD_PARAMS); + region = strrchr(name, '#'); + if (region != NULL) { + tk_strncpy(real_name, name, region-name); + name = real_name; + } + return image_manager_get_bitmap(imm, name, bitmap); } diff --git a/project/gui/awtk/src/base/widget.h b/project/gui/awtk/src/base/widget.h index 6d5b1a731..71ffc15fd 100644 --- a/project/gui/awtk/src/base/widget.h +++ b/project/gui/awtk/src/base/widget.h @@ -3386,6 +3386,8 @@ ret_t widget_stroke_border_rect_for_border_type(canvas_t* c, const rect_t* r, co /* internal use */ rect_t widget_get_content_area_ex(widget_t* widget, int32_t default_margin); +ret_t widget_draw_image_with_region(widget_t* widget, canvas_t* c, bitmap_t* img, + const char* region, const rect_t* dst, image_draw_type_t draw_type); END_C_DECLS diff --git a/project/gui/awtk/src/base/window_manager.c b/project/gui/awtk/src/base/window_manager.c index 6e72be596..f5dd074d0 100644 --- a/project/gui/awtk/src/base/window_manager.c +++ b/project/gui/awtk/src/base/window_manager.c @@ -1,757 +1,768 @@ -/** - * File: window_manager.c - * Author: AWTK Develop Team - * Brief: window manager - * - * Copyright (c) 2018 - 2022 Guangzhou ZHIYUAN Electronics Co.,Ltd. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * License file for more details. - * - */ - -/** - * History: - * ================================================================ - * 2018-01-13 Li XianJing created - * - */ - -#include "base/widget.h" -#include "base/canvas.h" -#include "base/dialog.h" -#include "base/window.h" -#include "base/layout.h" -#include "base/dialog_highlighter.h" -#include "base/input_device_status.h" -#include "base/window_manager.h" -#include "base/window_animator_factory.h" - -static widget_t* s_window_manager = NULL; - -widget_t* window_manager(void) { - return s_window_manager; -} - -ret_t window_manager_set(widget_t* widget) { - s_window_manager = widget; - - return RET_OK; -} - -static ret_t window_manager_close_keyboard(widget_t* widget) { - widget_t* top_window = window_manager_get_top_window(widget); - if (widget_is_keyboard(top_window)) { - window_manager_close_window_force(widget, top_window); - top_window = window_manager_get_top_window(widget); - } - - return RET_OK; -} - -static ret_t window_manager_default_impl_back(widget_t* widget) { - event_t e; - widget_t* top = window_manager_get_top_window(widget); - return_value_if_fail(top != NULL, RET_NOT_FOUND); - - if (widget_is_normal_window(top)) { - e = event_init(EVT_REQUEST_CLOSE_WINDOW, top); - return widget_dispatch(top, &e); - } else if (widget_is_dialog(top)) { - if (dialog_is_modal(top)) { - dialog_quit(top, DIALOG_QUIT_NONE); - } else { - window_close(top); - } - } else if (!widget_is_system_bar(top)) { - window_close(top); - } - - return RET_OK; -} - -static ret_t window_manager_back_to_win_sync(widget_t* widget, widget_t* target) { - uint32_t k = 0; - darray_t wins; - widget_t* top = NULL; - widget_t* prev = NULL; - int32_t children_nr = widget_count_children(widget); - return_value_if_fail(widget != NULL, RET_BAD_PARAMS); - - if (children_nr < 2) { - return RET_OK; - } - - darray_init(&wins, 10, NULL, NULL); - WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) - if (prev == NULL) { - if (widget_is_normal_window(iter)) { - if (target == NULL || target == iter) { - prev = iter; - } - } - } else { - if (!widget_is_system_bar(iter)) { - darray_push(&wins, iter); - } - } - WIDGET_FOR_EACH_CHILD_END() - - top = wins.size > 0 ? WIDGET(darray_pop(&wins)) : NULL; - for (k = 0; k < wins.size; k++) { - widget_t* iter = WIDGET(wins.elms[k]); - if (widget_is_dialog(iter) && dialog_is_modal(iter)) { - dialog_quit(iter, DIALOG_QUIT_NONE); - } else { - window_manager_close_window_force(widget, iter); - } - } - darray_deinit(&wins); - - if (top == NULL) { - return RET_OK; - } - - return window_manager_close_window(widget, top); -} - -typedef struct _back_to_win_info_t { - widget_t* widget; - widget_t* target; -} back_to_win_info_t; - -static ret_t window_manager_back_to_home_async(const idle_info_t* info) { - back_to_win_info_t* back_to_win_info = (back_to_win_info_t*)(info->ctx); - window_manager_back_to_win_sync(back_to_win_info->widget, back_to_win_info->target); - TKMEM_FREE(back_to_win_info); - - return RET_REMOVE; -} - -static ret_t window_manager_back_to_home_on_dialog_destroy(void* ctx, event_t* e) { - back_to_win_info_t* back_to_win_info = (back_to_win_info_t*)(ctx); - window_manager_back_to_win_sync(back_to_win_info->widget, back_to_win_info->target); - TKMEM_FREE(back_to_win_info); - - return RET_REMOVE; -} - -static ret_t window_manager_default_impl_back_to(widget_t* widget, widget_t* target) { - widget_t* top = NULL; - back_to_win_info_t* info = NULL; - return_value_if_fail(widget != NULL, RET_BAD_PARAMS); - - top = window_manager_get_top_window(widget); - return_value_if_fail(top != NULL, RET_BAD_PARAMS); - - info = TKMEM_ZALLOC(back_to_win_info_t); - return_value_if_fail(info != NULL, RET_OOM); - - info->widget = widget; - info->target = target; - - if (!widget_is_dialog(top) || !dialog_is_modal(top)) { - idle_add(window_manager_back_to_home_async, info); - } else { - assert(widget_is_dialog(top) && dialog_is_modal(top)); - dialog_quit(top, DIALOG_QUIT_NONE); - widget_on(top, EVT_DESTROY, window_manager_back_to_home_on_dialog_destroy, info); - } - - return RET_OK; -} - -static widget_t* window_manager_default_impl_get_top_main_window(widget_t* widget) { - return_value_if_fail(widget != NULL, NULL); - - WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) - if (iter != NULL && widget_is_normal_window(iter) && iter->visible) { - return iter; - } - WIDGET_FOR_EACH_CHILD_END(); - - return NULL; -} - -static widget_t* window_manager_default_impl_get_top_window(widget_t* widget) { - return_value_if_fail(widget != NULL, NULL); - - WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) - if (iter->visible) { - return iter; - } - WIDGET_FOR_EACH_CHILD_END(); - - return NULL; -} - -widget_t* window_manager_cast(widget_t* widget) { - return_value_if_fail(widget != NULL, NULL); - - return widget; -} - -widget_t* window_manager_get_top_main_window(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); - if (wm->vt->get_top_main_window != NULL) { - return wm->vt->get_top_main_window(widget); - } else { - return window_manager_default_impl_get_top_main_window(widget); - } -} - -widget_t* window_manager_get_top_window(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); - - if (wm->vt->get_top_window != NULL) { - return wm->vt->get_top_window(widget); - } else { - return window_manager_default_impl_get_top_window(widget); - } -} - -widget_t* window_manager_get_prev_window(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); - return_value_if_fail(wm->vt->get_prev_window != NULL, NULL); - - return wm->vt->get_prev_window(widget); -} - -ret_t window_manager_post_init(widget_t* widget, wh_t w, wh_t h) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->post_init != NULL, RET_BAD_PARAMS); - - return wm->vt->post_init(widget, w, h); -} - -ret_t window_manager_open_window(widget_t* widget, widget_t* window) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(window != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->open_window != NULL, RET_BAD_PARAMS); - - return wm->vt->open_window(widget, window); -} - -ret_t window_manager_close_window(widget_t* widget, widget_t* window) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(window != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->close_window != NULL, RET_BAD_PARAMS); - - return wm->vt->close_window(widget, window); -} - -ret_t window_manager_close_window_force(widget_t* widget, widget_t* window) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(window != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->close_window_force != NULL, RET_BAD_PARAMS); - - return wm->vt->close_window_force(widget, window); -} - -ret_t window_manager_check_and_layout(widget_t* widget) { - WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) - if (WINDOW_BASE(iter)->need_relayout) { - widget_layout(iter); - window_base_set_need_relayout(iter, FALSE); - } - WIDGET_FOR_EACH_CHILD_END(); - - return RET_OK; -} - -ret_t window_manager_paint(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->paint != NULL, RET_BAD_PARAMS); - - return wm->vt->paint(widget); -} - -ret_t window_manager_dispatch_input_event(widget_t* widget, event_t* e) { - void* target = NULL; - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(e != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->dispatch_input_event != NULL, RET_BAD_PARAMS); - - if (wm->ignore_input_events) { - return RET_STOP; - } - - target = e->target; - if (emitter_dispatch(wm->global_emitter, e) == RET_STOP) { - return RET_STOP; - } - - e->target = target; - return wm->vt->dispatch_input_event(widget, e); -} - -ret_t window_manager_set_show_fps(widget_t* widget, bool_t show_fps) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - wm->show_fps = show_fps; - if (wm->vt->set_show_fps != NULL) { - return wm->vt->set_show_fps(widget, show_fps); - } else { - return RET_OK; - } -} - -ret_t window_manager_set_max_fps(widget_t* widget, uint32_t max_fps) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - wm->max_fps = max_fps; - if (wm->vt->set_max_fps != NULL) { - return wm->vt->set_max_fps(widget, max_fps); - } else { - return RET_OK; - } -} - -ret_t window_manager_set_screen_saver_time(widget_t* widget, uint32_t time) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->set_screen_saver_time != NULL, RET_BAD_PARAMS); - - return wm->vt->set_screen_saver_time(widget, time); -} - -ret_t window_manager_set_cursor(widget_t* widget, const char* cursor) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(wm->vt->set_cursor != NULL, RET_BAD_PARAMS); - - if (wm->show_waiting_pointer_cursor) { - return RET_FAIL; - } - - return wm->vt->set_cursor(widget, cursor); -} - -ret_t window_manager_back(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - window_manager_close_keyboard(widget); - if (wm->vt->back != NULL) { - return wm->vt->back(widget); - } else { - return window_manager_default_impl_back(widget); - } -} - -ret_t window_manager_back_to(widget_t* widget, const char* target) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - window_manager_close_keyboard(widget); - - if (wm->vt->back_to != NULL) { - return wm->vt->back_to(widget, target); - } else { - widget_t* target_widget = NULL; - if (target != NULL) { - target_widget = widget_child(widget, target); - return_value_if_fail(target_widget != NULL, RET_BAD_PARAMS); - } - - return window_manager_default_impl_back_to(widget, target_widget); - } -} - -ret_t window_manager_switch_to(widget_t* widget, widget_t* curr_win, widget_t* target_win, - bool_t close) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - window_manager_close_keyboard(widget); - - if (target_win == curr_win || target_win == NULL) { - return RET_OK; - } - - if (wm->vt->switch_to != NULL) { - return wm->vt->switch_to(widget, curr_win, target_win, close); - } else { - widget_restack(target_win, 0xffffff); - if (close) { - window_manager_close_window_force(widget, curr_win); - } else { - window_manager_dispatch_window_event(curr_win, EVT_WINDOW_TO_BACKGROUND); - } - window_manager_dispatch_window_event(target_win, EVT_WINDOW_TO_FOREGROUND); - return RET_OK; - } -} - -ret_t window_manager_back_to_home(widget_t* widget) { - return window_manager_back_to(widget, NULL); -} - -xy_t window_manager_get_pointer_x(widget_t* widget) { - xy_t x = 0; - xy_t y = 0; - bool_t pressed = TRUE; - - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, 0); - return_value_if_fail(wm->vt->get_pointer != NULL, 0); - - wm->vt->get_pointer(widget, &x, &y, &pressed); - - return x; -} - -xy_t window_manager_get_pointer_y(widget_t* widget) { - xy_t x = 0; - xy_t y = 0; - bool_t pressed = TRUE; - - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, 0); - return_value_if_fail(wm->vt->get_pointer != NULL, 0); - - wm->vt->get_pointer(widget, &x, &y, &pressed); - - return y; -} - -bool_t window_manager_get_pointer_pressed(widget_t* widget) { - xy_t x = 0; - xy_t y = 0; - bool_t pressed = TRUE; - - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, 0); - return_value_if_fail(wm->vt->get_pointer != NULL, 0); - - wm->vt->get_pointer(widget, &x, &y, &pressed); - - return pressed; -} - -bool_t window_manager_is_animating(widget_t* widget) { - ret_t ret = RET_OK; - bool_t playing = TRUE; - - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, FALSE); - return_value_if_fail(wm->vt->is_animating != NULL, FALSE); - - ret = wm->vt->is_animating(widget, &playing); - - if (ret == RET_OK) { - return playing; - } - return FALSE; -} - -static ret_t wm_on_locale_changed(void* ctx, event_t* e) { - widget_t* widget = WIDGET(ctx); - font_manager_t* fm = widget_get_font_manager(widget); - image_manager_t* imm = widget_get_image_manager(widget); - - return_value_if_fail(widget != NULL, RET_BAD_PARAMS); - return_value_if_fail(fm != NULL && imm != NULL, RET_BAD_PARAMS); - - font_manager_unload_all(fm); - image_manager_unload_all(imm); - - if (widget_count_children(widget) > 0) { - widget_reset_canvas(widget_get_child(widget, 0)); - } - - WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) - widget_re_translate_text(iter); - widget_dispatch(iter, e); - WIDGET_FOR_EACH_CHILD_END(); - widget_layout_children(widget); - widget_invalidate(widget, NULL); - - return RET_OK; -} - -static ret_t on_theme_changed(void* ctx, const void* data) { - widget_t* widget = WIDGET(data); - widget_set_need_update_style(widget); - widget_update_style(widget); - - return RET_OK; -} - -ret_t window_manager_on_theme_changed(widget_t* widget) { - return_value_if_fail(widget != NULL, RET_BAD_PARAMS); - - WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) - event_t e = event_init(EVT_THEME_CHANGED, iter); - widget_dispatch(iter, &e); - widget_foreach(iter, on_theme_changed, NULL); - WIDGET_FOR_EACH_CHILD_END(); - - return RET_OK; -} - -static ret_t window_manager_on_destroy(void* ctx, event_t* e) { - window_manager_t* wm = WINDOW_MANAGER(ctx); - emitter_destroy(wm->global_emitter); - wm->global_emitter = NULL; - - return RET_OK; -} - -widget_t* window_manager_init(window_manager_t* wm, const widget_vtable_t* wvt, - const window_manager_vtable_t* vt) { - widget_t* widget = WIDGET(wm); - return_value_if_fail(wm != NULL, NULL); - - widget_init(widget, NULL, wvt, 0, 0, 0, 0); - locale_info_on(locale_info(), EVT_LOCALE_CHANGED, wm_on_locale_changed, wm); - wm->vt = vt; - wm->global_emitter = emitter_create(); - wm->curr_expected_sleep_time = 0xFFFFFFFF; - widget_on(widget, EVT_DESTROY, window_manager_on_destroy, widget); - - return widget; -} - -ret_t window_manager_dispatch_native_window_event(widget_t* widget, event_t* e, void* handle) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(widget != NULL && e != NULL && handle != NULL, RET_BAD_PARAMS); - - if (wm->vt->dispatch_native_window_event != NULL) { - wm->vt->dispatch_native_window_event(widget, e, handle); - } - - return RET_OK; -} - -widget_t* window_manager_find_target_by_win(widget_t* widget, void* win) { - native_window_t* nw = NULL; - return_value_if_fail(widget != NULL, NULL); - - WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) - nw = (native_window_t*)widget_get_prop_pointer(iter, WIDGET_PROP_NATIVE_WINDOW); - if (nw != NULL && nw->handle == win) { - return iter; - } - WIDGET_FOR_EACH_CHILD_END() - - return NULL; -} - -static bool_t window_manager_is_win_valid_target(widget_t* iter, void* win) { - if (win != NULL) { - native_window_t* nw = - (native_window_t*)widget_get_prop_pointer(iter, WIDGET_PROP_NATIVE_WINDOW); - if (nw == NULL || nw->handle != win) { - return FALSE; - } - } - - if (!iter->visible || !iter->sensitive || !iter->enable) { - return FALSE; - } - - return TRUE; -} - -widget_t* window_manager_find_target(widget_t* widget, void* win, xy_t x, xy_t y) { - point_t p = {x, y}; - return_value_if_fail(widget != NULL, NULL); - - if (widget->grab_widget != NULL) { - return widget->grab_widget; - } - - widget_to_local(widget, &p); - WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) - if (!window_manager_is_win_valid_target(iter, win)) { - continue; - } - if (widget_get_prop_bool(iter, WIDGET_PROP_ALWAYS_ON_TOP, FALSE) && - widget_is_point_in(iter, x, y, FALSE)) { - return iter; - } - WIDGET_FOR_EACH_CHILD_END() - - WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) - if (!window_manager_is_win_valid_target(iter, win)) { - continue; - } - - if (widget_is_point_in(iter, x, y, FALSE)) { - return iter; - } - - if ((widget_is_dialog(iter) && widget_is_opened_dialog(iter)) || - (widget_is_popup(iter) && widget_is_opened_popup(iter))) { - return iter; - } - WIDGET_FOR_EACH_CHILD_END() - - return NULL; -} - -ret_t window_manager_snap_curr_window(widget_t* widget, widget_t* curr_win, bitmap_t* img) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(curr_win != NULL && img != NULL, RET_BAD_PARAMS); - - if (wm->vt->snap_curr_window != NULL) { - return wm->vt->snap_curr_window(widget, curr_win, img); - } - - return RET_NOT_IMPL; -} - -ret_t window_manager_snap_prev_window(widget_t* widget, widget_t* prev_win, bitmap_t* img) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - return_value_if_fail(prev_win != NULL && img != NULL, RET_BAD_PARAMS); - - if (wm->vt->snap_prev_window != NULL) { - return wm->vt->snap_prev_window(widget, prev_win, img); - } - - return RET_NOT_IMPL; -} - -dialog_highlighter_t* window_manager_get_dialog_highlighter(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); - - if (wm->vt->get_dialog_highlighter != NULL) { - return wm->vt->get_dialog_highlighter(widget); - } - - return NULL; -} - -ret_t window_manager_resize(widget_t* widget, wh_t w, wh_t h) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - if (wm->vt->resize != NULL) { - return wm->vt->resize(widget, w, h); - } - - return RET_NOT_IMPL; -} - -ret_t window_manager_dispatch_top_window_changed(widget_t* widget) { - window_event_t e; - - e.e = event_init(EVT_TOP_WINDOW_CHANGED, widget); - e.window = window_manager_get_top_main_window(widget); - - widget_dispatch(widget, (event_t*)(&e)); - - return RET_OK; -} - -ret_t window_manager_dispatch_window_event(widget_t* window, event_type_t type) { - window_event_t evt; - event_t e = event_init(type, window); - widget_dispatch_recursive(window, &e); - - evt.window = window; - evt.e = event_init(type, window->parent); - evt.e.size = sizeof(evt); - - if (type == EVT_WINDOW_OPEN) { - window_manager_dispatch_top_window_changed(window->parent); - } else if (type == EVT_WINDOW_TO_FOREGROUND) { - window->parent->target = window; - window->parent->key_target = window; - } - - return widget_dispatch(window->parent, (event_t*)&(evt)); -} - -ret_t window_manager_begin_wait_pointer_cursor(widget_t* widget, bool_t ignore_user_input) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - if (wm->vt->set_cursor != NULL) { - wm->ignore_input_events = TRUE; - wm->show_waiting_pointer_cursor = ignore_user_input; - return wm->vt->set_cursor(widget, WIDGET_CURSOR_WAIT); - } else { - return RET_NOT_IMPL; - } -} - -ret_t window_manager_end_wait_pointer_cursor(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - if (wm->vt->set_cursor != NULL) { - wm->ignore_input_events = FALSE; - wm->show_waiting_pointer_cursor = FALSE; - return wm->vt->set_cursor(widget, WIDGET_CURSOR_DEFAULT); - } else { - return RET_NOT_IMPL; - } -} - -ret_t window_manager_close_all(widget_t* widget) { - return_value_if_fail(widget != NULL, RET_BAD_PARAMS); - - do { - uint32_t nr = widget_count_children(widget); - if (nr > 0) { - widget_t* win = widget_get_child(widget, nr - 1); - window_manager_close_window_force(widget, win); - } else { - break; - } - } while (TRUE); - - return RET_OK; -} - -ret_t window_manager_set_ignore_input_events(widget_t* widget, bool_t ignore_input_events) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - wm->ignore_input_events = ignore_input_events; - - return RET_OK; -} - -uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, 0xFFFFFFFF); - return wm->curr_expected_sleep_time; -} - -ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, - uint32_t curr_expected_sleep_time) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - wm->curr_expected_sleep_time = curr_expected_sleep_time; - return RET_OK; -} - -ret_t window_manager_destroy(widget_t* widget) { - window_manager_t* wm = WINDOW_MANAGER(widget); - return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); - - if (widget->ref_count > 1) { - widget->ref_count = 1; - log_warn("window manager will be forcibly destroyed!!!\n"); - } - - return widget_destroy_sync(widget); -} +/** + * File: window_manager.c + * Author: AWTK Develop Team + * Brief: window manager + * + * Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * License file for more details. + * + */ + +/** + * History: + * ================================================================ + * 2018-01-13 Li XianJing created + * + */ + +#include "base/widget.h" +#include "base/canvas.h" +#include "base/dialog.h" +#include "base/window.h" +#include "base/layout.h" +#include "base/dialog_highlighter.h" +#include "base/input_device_status.h" +#include "base/window_manager.h" +#include "base/window_animator_factory.h" + +static widget_t* s_window_manager = NULL; + +widget_t* window_manager(void) { + return s_window_manager; +} + +ret_t window_manager_set(widget_t* widget) { + s_window_manager = widget; + + return RET_OK; +} + +static ret_t window_manager_close_keyboard(widget_t* widget) { + widget_t* top_window = window_manager_get_top_window(widget); + if (widget_is_keyboard(top_window)) { + window_manager_close_window_force(widget, top_window); + top_window = window_manager_get_top_window(widget); + } + + return RET_OK; +} + +static ret_t window_manager_default_impl_back(widget_t* widget) { + event_t e; + widget_t* top = window_manager_get_top_window(widget); + return_value_if_fail(top != NULL, RET_NOT_FOUND); + + if (widget_is_normal_window(top)) { + e = event_init(EVT_REQUEST_CLOSE_WINDOW, top); + return widget_dispatch(top, &e); + } else if (widget_is_dialog(top)) { + if (dialog_is_modal(top)) { + dialog_quit(top, DIALOG_QUIT_NONE); + } else { + window_close(top); + } + } else if (!widget_is_system_bar(top)) { + window_close(top); + } + + return RET_OK; +} + +static ret_t window_manager_back_to_win_sync(widget_t* widget, widget_t* target) { + uint32_t k = 0; + darray_t wins; + widget_t* top = NULL; + widget_t* prev = NULL; + int32_t children_nr = widget_count_children(widget); + return_value_if_fail(widget != NULL, RET_BAD_PARAMS); + + if (children_nr < 2) { + return RET_OK; + } + + darray_init(&wins, 10, NULL, NULL); + WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) + if (prev == NULL) { + if (widget_is_normal_window(iter)) { + if (target == NULL || target == iter) { + prev = iter; + } + } + } else { + if (!widget_is_system_bar(iter)) { + darray_push(&wins, iter); + } + } + WIDGET_FOR_EACH_CHILD_END() + + top = wins.size > 0 ? WIDGET(darray_pop(&wins)) : NULL; + for (k = 0; k < wins.size; k++) { + widget_t* iter = WIDGET(wins.elms[k]); + if (widget_is_dialog(iter) && dialog_is_modal(iter)) { + dialog_quit(iter, DIALOG_QUIT_NONE); + } else { + window_manager_close_window_force(widget, iter); + } + } + darray_deinit(&wins); + + if (top == NULL) { + return RET_OK; + } + + return window_manager_close_window(widget, top); +} + +typedef struct _back_to_win_info_t { + widget_t* widget; + widget_t* target; +} back_to_win_info_t; + +static ret_t window_manager_back_to_home_async(const idle_info_t* info) { + back_to_win_info_t* back_to_win_info = (back_to_win_info_t*)(info->ctx); + window_manager_back_to_win_sync(back_to_win_info->widget, back_to_win_info->target); + TKMEM_FREE(back_to_win_info); + + return RET_REMOVE; +} + +static ret_t window_manager_back_to_home_on_dialog_destroy(void* ctx, event_t* e) { + back_to_win_info_t* back_to_win_info = (back_to_win_info_t*)(ctx); + window_manager_back_to_win_sync(back_to_win_info->widget, back_to_win_info->target); + TKMEM_FREE(back_to_win_info); + + return RET_REMOVE; +} + +static ret_t window_manager_default_impl_back_to(widget_t* widget, widget_t* target) { + widget_t* top = NULL; + back_to_win_info_t* info = NULL; + return_value_if_fail(widget != NULL, RET_BAD_PARAMS); + + top = window_manager_get_top_window(widget); + return_value_if_fail(top != NULL, RET_BAD_PARAMS); + + info = TKMEM_ZALLOC(back_to_win_info_t); + return_value_if_fail(info != NULL, RET_OOM); + + info->widget = widget; + info->target = target; + + if (!widget_is_dialog(top) || !dialog_is_modal(top)) { + idle_add(window_manager_back_to_home_async, info); + } else { + assert(widget_is_dialog(top) && dialog_is_modal(top)); + dialog_quit(top, DIALOG_QUIT_NONE); + widget_on(top, EVT_DESTROY, window_manager_back_to_home_on_dialog_destroy, info); + } + + return RET_OK; +} + +static widget_t* window_manager_default_impl_get_top_main_window(widget_t* widget) { + return_value_if_fail(widget != NULL, NULL); + + WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) + if (iter != NULL && widget_is_normal_window(iter) && iter->visible) { + return iter; + } + WIDGET_FOR_EACH_CHILD_END(); + + return NULL; +} + +static widget_t* window_manager_default_impl_get_top_window(widget_t* widget) { + return_value_if_fail(widget != NULL, NULL); + + WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) + if (iter->visible) { + return iter; + } + WIDGET_FOR_EACH_CHILD_END(); + + return NULL; +} + +widget_t* window_manager_cast(widget_t* widget) { + return_value_if_fail(widget != NULL, NULL); + + return widget; +} + +widget_t* window_manager_get_top_main_window(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); + if (wm->vt->get_top_main_window != NULL) { + return wm->vt->get_top_main_window(widget); + } else { + return window_manager_default_impl_get_top_main_window(widget); + } +} + +widget_t* window_manager_get_top_window(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); + + if (wm->vt->get_top_window != NULL) { + return wm->vt->get_top_window(widget); + } else { + return window_manager_default_impl_get_top_window(widget); + } +} + +widget_t* window_manager_get_prev_window(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); + return_value_if_fail(wm->vt->get_prev_window != NULL, NULL); + + return wm->vt->get_prev_window(widget); +} + +ret_t window_manager_post_init(widget_t* widget, wh_t w, wh_t h) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->post_init != NULL, RET_BAD_PARAMS); + + return wm->vt->post_init(widget, w, h); +} + +ret_t window_manager_open_window(widget_t* widget, widget_t* window) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(window != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->open_window != NULL, RET_BAD_PARAMS); + + return wm->vt->open_window(widget, window); +} + +ret_t window_manager_close_window(widget_t* widget, widget_t* window) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(window != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->close_window != NULL, RET_BAD_PARAMS); + + return wm->vt->close_window(widget, window); +} + +ret_t window_manager_close_window_force(widget_t* widget, widget_t* window) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(window != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->close_window_force != NULL, RET_BAD_PARAMS); + + return wm->vt->close_window_force(widget, window); +} + +ret_t window_manager_check_and_layout(widget_t* widget) { + WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) + if (WINDOW_BASE(iter)->need_relayout) { + widget_layout(iter); + window_base_set_need_relayout(iter, FALSE); + } + WIDGET_FOR_EACH_CHILD_END(); + + return RET_OK; +} + +ret_t window_manager_paint(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->paint != NULL, RET_BAD_PARAMS); + + return wm->vt->paint(widget); +} + +ret_t window_manager_dispatch_input_event(widget_t* widget, event_t* e) { + void* target = NULL; + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(e != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->dispatch_input_event != NULL, RET_BAD_PARAMS); + + if (wm->ignore_input_events) { + return RET_STOP; + } + + target = e->target; + if (emitter_dispatch(wm->global_emitter, e) == RET_STOP) { + return RET_STOP; + } + + e->target = target; + return wm->vt->dispatch_input_event(widget, e); +} + +ret_t window_manager_set_show_fps(widget_t* widget, bool_t show_fps) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + wm->show_fps = show_fps; + if (wm->vt->set_show_fps != NULL) { + return wm->vt->set_show_fps(widget, show_fps); + } else { + return RET_OK; + } +} + +ret_t window_manager_set_max_fps(widget_t* widget, uint32_t max_fps) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + wm->max_fps = max_fps; + if (wm->vt->set_max_fps != NULL) { + return wm->vt->set_max_fps(widget, max_fps); + } else { + return RET_OK; + } +} + +ret_t window_manager_set_screen_saver_time(widget_t* widget, uint32_t time) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->set_screen_saver_time != NULL, RET_BAD_PARAMS); + + return wm->vt->set_screen_saver_time(widget, time); +} + +ret_t window_manager_set_cursor(widget_t* widget, const char* cursor) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(wm->vt->set_cursor != NULL, RET_BAD_PARAMS); + + if (wm->show_waiting_pointer_cursor) { + return RET_FAIL; + } + + return wm->vt->set_cursor(widget, cursor); +} + +ret_t window_manager_back(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + window_manager_close_keyboard(widget); + if (wm->vt->back != NULL) { + return wm->vt->back(widget); + } else { + return window_manager_default_impl_back(widget); + } +} + +ret_t window_manager_back_to(widget_t* widget, const char* target) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + window_manager_close_keyboard(widget); + + if (wm->vt->back_to != NULL) { + return wm->vt->back_to(widget, target); + } else { + widget_t* target_widget = NULL; + if (target != NULL) { + target_widget = widget_child(widget, target); + return_value_if_fail(target_widget != NULL, RET_BAD_PARAMS); + } + + return window_manager_default_impl_back_to(widget, target_widget); + } +} + +ret_t window_manager_switch_to(widget_t* widget, widget_t* curr_win, widget_t* target_win, + bool_t close) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + window_manager_close_keyboard(widget); + + if (target_win == curr_win || target_win == NULL) { + return RET_OK; + } + + if (wm->vt->switch_to != NULL) { + return wm->vt->switch_to(widget, curr_win, target_win, close); + } else { + widget_restack(target_win, 0xffffff); + if (close) { + window_manager_close_window_force(widget, curr_win); + } else { + window_manager_dispatch_window_event(curr_win, EVT_WINDOW_TO_BACKGROUND); + } + window_manager_dispatch_window_event(target_win, EVT_WINDOW_TO_FOREGROUND); + return RET_OK; + } +} + +ret_t window_manager_back_to_home(widget_t* widget) { + return window_manager_back_to(widget, NULL); +} + +xy_t window_manager_get_pointer_x(widget_t* widget) { + xy_t x = 0; + xy_t y = 0; + bool_t pressed = TRUE; + + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, 0); + return_value_if_fail(wm->vt->get_pointer != NULL, 0); + + wm->vt->get_pointer(widget, &x, &y, &pressed); + + return x; +} + +xy_t window_manager_get_pointer_y(widget_t* widget) { + xy_t x = 0; + xy_t y = 0; + bool_t pressed = TRUE; + + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, 0); + return_value_if_fail(wm->vt->get_pointer != NULL, 0); + + wm->vt->get_pointer(widget, &x, &y, &pressed); + + return y; +} + +bool_t window_manager_get_pointer_pressed(widget_t* widget) { + xy_t x = 0; + xy_t y = 0; + bool_t pressed = TRUE; + + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, 0); + return_value_if_fail(wm->vt->get_pointer != NULL, 0); + + wm->vt->get_pointer(widget, &x, &y, &pressed); + + return pressed; +} + +bool_t window_manager_is_animating(widget_t* widget) { + ret_t ret = RET_OK; + bool_t playing = TRUE; + + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, FALSE); + return_value_if_fail(wm->vt->is_animating != NULL, FALSE); + + ret = wm->vt->is_animating(widget, &playing); + + if (ret == RET_OK) { + return playing; + } + return FALSE; +} + +static ret_t wm_on_locale_changed(void* ctx, event_t* e) { + widget_t* widget = WIDGET(ctx); + font_manager_t* fm = widget_get_font_manager(widget); + image_manager_t* imm = widget_get_image_manager(widget); + + return_value_if_fail(widget != NULL, RET_BAD_PARAMS); + return_value_if_fail(fm != NULL && imm != NULL, RET_BAD_PARAMS); + + font_manager_unload_all(fm); + image_manager_unload_all(imm); + + if (widget_count_children(widget) > 0) { + widget_reset_canvas(widget_get_child(widget, 0)); + } + + WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) + widget_re_translate_text(iter); + widget_dispatch(iter, e); + WIDGET_FOR_EACH_CHILD_END(); + widget_layout_children(widget); + widget_invalidate(widget, NULL); + + return RET_OK; +} + +static ret_t on_theme_changed(void* ctx, const void* data) { + widget_t* widget = WIDGET(data); + widget_set_need_update_style(widget); + widget_update_style(widget); + + return RET_OK; +} + +ret_t window_manager_on_theme_changed(widget_t* widget) { + return_value_if_fail(widget != NULL, RET_BAD_PARAMS); + + WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i) + event_t e = event_init(EVT_THEME_CHANGED, iter); + widget_dispatch(iter, &e); + widget_foreach(iter, on_theme_changed, NULL); + WIDGET_FOR_EACH_CHILD_END(); + + return RET_OK; +} + +static ret_t window_manager_on_destroy(void* ctx, event_t* e) { + window_manager_t* wm = WINDOW_MANAGER(ctx); + emitter_destroy(wm->global_emitter); + wm->global_emitter = NULL; + + return RET_OK; +} + +widget_t* window_manager_init(window_manager_t* wm, const widget_vtable_t* wvt, + const window_manager_vtable_t* vt) { + widget_t* widget = WIDGET(wm); + return_value_if_fail(wm != NULL, NULL); + + widget_init(widget, NULL, wvt, 0, 0, 0, 0); + locale_info_on(locale_info(), EVT_LOCALE_CHANGED, wm_on_locale_changed, wm); + wm->vt = vt; + wm->global_emitter = emitter_create(); + wm->curr_expected_sleep_time = 0xFFFFFFFF; + widget_on(widget, EVT_DESTROY, window_manager_on_destroy, widget); + + return widget; +} + +ret_t window_manager_dispatch_native_window_event(widget_t* widget, event_t* e, void* handle) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(widget != NULL && e != NULL && handle != NULL, RET_BAD_PARAMS); + + if (wm->vt->dispatch_native_window_event != NULL) { + wm->vt->dispatch_native_window_event(widget, e, handle); + } + + return RET_OK; +} + +widget_t* window_manager_find_target_by_win(widget_t* widget, void* win) { + native_window_t* nw = NULL; + return_value_if_fail(widget != NULL, NULL); + + WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) + nw = (native_window_t*)widget_get_prop_pointer(iter, WIDGET_PROP_NATIVE_WINDOW); + if (nw != NULL && nw->handle == win) { + return iter; + } + WIDGET_FOR_EACH_CHILD_END() + + return NULL; +} + +static bool_t window_manager_is_win_valid_target(widget_t* iter, void* win) { + if (win != NULL) { + native_window_t* nw = + (native_window_t*)widget_get_prop_pointer(iter, WIDGET_PROP_NATIVE_WINDOW); + if (nw == NULL || nw->handle != win) { + return FALSE; + } + } + + if (!iter->visible || !iter->sensitive || !iter->enable) { + return FALSE; + } + + return TRUE; +} + +widget_t* window_manager_find_target(widget_t* widget, void* win, xy_t x, xy_t y) { + point_t p = {x, y}; + return_value_if_fail(widget != NULL, NULL); + + if (widget->grab_widget != NULL) { + return widget->grab_widget; + } + + widget_to_local(widget, &p); + WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) + if (!window_manager_is_win_valid_target(iter, win)) { + continue; + } + if (widget_get_prop_bool(iter, WIDGET_PROP_ALWAYS_ON_TOP, FALSE) && + widget_is_point_in(iter, x, y, FALSE)) { + return iter; + } + WIDGET_FOR_EACH_CHILD_END() + + WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i) + if (!window_manager_is_win_valid_target(iter, win)) { + continue; + } + + if (widget_is_point_in(iter, x, y, FALSE)) { + return iter; + } + + if ((widget_is_dialog(iter) && widget_is_opened_dialog(iter)) || + (widget_is_popup(iter) && widget_is_opened_popup(iter))) { + return iter; + } + WIDGET_FOR_EACH_CHILD_END() + + return NULL; +} + +ret_t window_manager_snap_curr_window(widget_t* widget, widget_t* curr_win, bitmap_t* img) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(curr_win != NULL && img != NULL, RET_BAD_PARAMS); + + if (wm->vt->snap_curr_window != NULL) { + return wm->vt->snap_curr_window(widget, curr_win, img); + } + + return RET_NOT_IMPL; +} + +ret_t window_manager_snap_prev_window(widget_t* widget, widget_t* prev_win, bitmap_t* img) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + return_value_if_fail(prev_win != NULL && img != NULL, RET_BAD_PARAMS); + + if (wm->vt->snap_prev_window != NULL) { + return wm->vt->snap_prev_window(widget, prev_win, img); + } + + return RET_NOT_IMPL; +} + +dialog_highlighter_t* window_manager_get_dialog_highlighter(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, NULL); + + if (wm->vt->get_dialog_highlighter != NULL) { + return wm->vt->get_dialog_highlighter(widget); + } + + return NULL; +} + +ret_t window_manager_resize(widget_t* widget, wh_t w, wh_t h) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + if (wm->vt->resize != NULL) { + return wm->vt->resize(widget, w, h); + } + + return RET_NOT_IMPL; +} + +ret_t window_manager_set_fullscreen(widget_t* widget, bool_t fullscreen) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + if (wm->vt->set_fullscreen != NULL) { + return wm->vt->set_fullscreen(widget, fullscreen); + } + + return RET_NOT_IMPL; +} + +ret_t window_manager_dispatch_top_window_changed(widget_t* widget) { + window_event_t e; + + e.e = event_init(EVT_TOP_WINDOW_CHANGED, widget); + e.window = window_manager_get_top_main_window(widget); + + widget_dispatch(widget, (event_t*)(&e)); + + return RET_OK; +} + +ret_t window_manager_dispatch_window_event(widget_t* window, event_type_t type) { + window_event_t evt; + event_t e = event_init(type, window); + widget_dispatch_recursive(window, &e); + + evt.window = window; + evt.e = event_init(type, window->parent); + evt.e.size = sizeof(evt); + + if (type == EVT_WINDOW_OPEN) { + window_manager_dispatch_top_window_changed(window->parent); + } else if (type == EVT_WINDOW_TO_FOREGROUND) { + window->parent->target = window; + window->parent->key_target = window; + } + + return widget_dispatch(window->parent, (event_t*)&(evt)); +} + +ret_t window_manager_begin_wait_pointer_cursor(widget_t* widget, bool_t ignore_user_input) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + if (wm->vt->set_cursor != NULL) { + wm->ignore_input_events = TRUE; + wm->show_waiting_pointer_cursor = ignore_user_input; + return wm->vt->set_cursor(widget, WIDGET_CURSOR_WAIT); + } else { + return RET_NOT_IMPL; + } +} + +ret_t window_manager_end_wait_pointer_cursor(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + if (wm->vt->set_cursor != NULL) { + wm->ignore_input_events = FALSE; + wm->show_waiting_pointer_cursor = FALSE; + return wm->vt->set_cursor(widget, WIDGET_CURSOR_DEFAULT); + } else { + return RET_NOT_IMPL; + } +} + +ret_t window_manager_close_all(widget_t* widget) { + return_value_if_fail(widget != NULL, RET_BAD_PARAMS); + + do { + uint32_t nr = widget_count_children(widget); + if (nr > 0) { + widget_t* win = widget_get_child(widget, nr - 1); + window_manager_close_window_force(widget, win); + } else { + break; + } + } while (TRUE); + + return RET_OK; +} + +ret_t window_manager_set_ignore_input_events(widget_t* widget, bool_t ignore_input_events) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + wm->ignore_input_events = ignore_input_events; + + return RET_OK; +} + +uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, 0xFFFFFFFF); + return wm->curr_expected_sleep_time; +} + +ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, + uint32_t curr_expected_sleep_time) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + wm->curr_expected_sleep_time = curr_expected_sleep_time; + return RET_OK; +} + +ret_t window_manager_destroy(widget_t* widget) { + window_manager_t* wm = WINDOW_MANAGER(widget); + return_value_if_fail(wm != NULL && wm->vt != NULL, RET_BAD_PARAMS); + + if (widget->ref_count > 1) { + widget->ref_count = 1; + log_warn("window manager will be forcibly destroyed!!!\n"); + } + + return widget_destroy_sync(widget); +} diff --git a/project/gui/awtk/src/base/window_manager.h b/project/gui/awtk/src/base/window_manager.h index 2d7b9d957..1c0e730f0 100644 --- a/project/gui/awtk/src/base/window_manager.h +++ b/project/gui/awtk/src/base/window_manager.h @@ -1,522 +1,545 @@ -/** - * File: window_manager.h - * Author: AWTK Develop Team - * Brief: window manager - * - * Copyright (c) 2018 - 2022 Guangzhou ZHIYUAN Electronics Co.,Ltd. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * License file for more details. - * - */ - -/** - * History: - * ================================================================ - * 2018-01-13 Li XianJing created - * - */ - -#ifndef TK_WINDOW_MANAGER_H -#define TK_WINDOW_MANAGER_H - -#include "base/widget.h" -#include "base/canvas.h" -#include "base/dialog_highlighter.h" -#include "base/input_device_status.h" -#include "base/window_animator_factory.h" - -BEGIN_C_DECLS - -typedef widget_t* (*window_manager_get_top_window_t)(widget_t* widget); -typedef widget_t* (*window_manager_get_prev_window_t)(widget_t* widget); -typedef widget_t* (*window_manager_get_top_main_window_t)(widget_t* widget); -typedef ret_t (*window_manager_open_window_t)(widget_t* widget, widget_t* window); -typedef ret_t (*window_manager_close_window_t)(widget_t* widget, widget_t* window); -typedef ret_t (*window_manager_close_window_force_t)(widget_t* widget, widget_t* window); -typedef ret_t (*window_manager_paint_t)(widget_t* widget); -typedef ret_t (*window_manager_dispatch_input_event_t)(widget_t* widget, event_t* e); -typedef ret_t (*window_manager_set_show_fps_t)(widget_t* widget, bool_t show_fps); -typedef ret_t (*window_manager_set_max_fps_t)(widget_t* widget, uint32_t max_fps); -typedef ret_t (*window_manager_set_screen_saver_time_t)(widget_t* widget, uint32_t time); -typedef ret_t (*window_manager_set_cursor_t)(widget_t* widget, const char* cursor); -typedef ret_t (*window_manager_post_init_t)(widget_t* widget, wh_t w, wh_t h); -typedef ret_t (*window_manager_back_t)(widget_t* widget); -typedef ret_t (*window_manager_back_to_t)(widget_t* widget, const char* name); -typedef ret_t (*window_manager_switch_to_t)(widget_t* widget, widget_t* curr_win, - widget_t* target_win, bool_t close); -typedef ret_t (*window_manager_get_pointer_t)(widget_t* widget, xy_t* x, xy_t* y, bool_t* pressed); -typedef ret_t (*window_manager_is_animating_t)(widget_t* widget, bool_t* playing); - -typedef ret_t (*window_manager_dispatch_native_window_event_t)(widget_t* widget, event_t* e, - void* handle); - -typedef ret_t (*window_manager_snap_curr_window_t)(widget_t* widget, widget_t* curr_win, - bitmap_t* img); -typedef ret_t (*window_manager_snap_prev_window_t)(widget_t* widget, widget_t* prev_win, - bitmap_t* img); -typedef dialog_highlighter_t* (*window_manager_get_dialog_highlighter_t)(widget_t* widget); -typedef ret_t (*window_manager_resize_t)(widget_t* widget, wh_t w, wh_t h); - -typedef struct _window_manager_vtable_t { - window_manager_back_t back; - window_manager_back_to_t back_to; - window_manager_switch_to_t switch_to; - window_manager_paint_t paint; - window_manager_post_init_t post_init; - window_manager_set_cursor_t set_cursor; - window_manager_open_window_t open_window; - window_manager_close_window_t close_window; - window_manager_set_show_fps_t set_show_fps; - window_manager_set_max_fps_t set_max_fps; - window_manager_get_top_window_t get_top_window; - window_manager_get_prev_window_t get_prev_window; - window_manager_close_window_force_t close_window_force; - window_manager_get_top_main_window_t get_top_main_window; - window_manager_dispatch_input_event_t dispatch_input_event; - window_manager_dispatch_native_window_event_t dispatch_native_window_event; - window_manager_set_screen_saver_time_t set_screen_saver_time; - window_manager_get_pointer_t get_pointer; - window_manager_is_animating_t is_animating; - window_manager_snap_curr_window_t snap_curr_window; - window_manager_snap_prev_window_t snap_prev_window; - window_manager_get_dialog_highlighter_t get_dialog_highlighter; - window_manager_resize_t resize; -} window_manager_vtable_t; - -/** - * @class window_manager_t - * @parent widget_t - * @annotation ["scriptable","widget"] - * 窗口管理器。 - */ -typedef struct _window_manager_t { - widget_t widget; - - /** - * @property {emitter_t*} global_emitter - * @annotation ["readable"] - * 全局事情分发器。 - */ - emitter_t* global_emitter; - - /*private*/ - bool_t show_fps; - widget_t* widget_grab_key; - bool_t ignore_input_events; - bool_t show_waiting_pointer_cursor; - const window_manager_vtable_t* vt; - uint32_t max_fps; - uint32_t curr_expected_sleep_time; -} window_manager_t; - -/** - * @event {window_event_t} EVT_TOP_WINDOW_CHANGED - * 顶层窗口改变的事件。 - */ - -/** - * @event {window_event_t} EVT_SCREEN_SAVER - * 在指定的时间内,没有用户输入事件,由窗口管理器触发。 - */ - -/** - * @event {event_t} EVT_ORIENTATION_CHANGED - * 屏幕旋转事件。 - */ - -/** - * @event {system_event_t} EVT_SYSTEM - * SDL系统事件。 - */ - -/** - * @method window_manager - * 获取全局window_manager对象 - * @alias window_manager_instance - * @annotation ["constructor", "scriptable", "cast"] - * - * @return {widget_t*} 对象。 - */ -widget_t* window_manager(void); - -/** - * @method window_manager_cast - * 转换为window_manager对象(供脚本语言使用)。 - * @annotation ["cast", "scriptable"] - * @param {widget_t*} widget window_manager对象。 - * - * @return {widget_t*} window_manager对象。 - */ -widget_t* window_manager_cast(widget_t* widget); - -/** - * @method window_manager_set - * 设置缺省的窗口管理器。 - * @param {window_manager_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_set(widget_t* widget); - -/** - * @method window_manager_get_top_main_window - * 获取最上面的主窗口。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {widget_t*} 返回窗口对象。 - */ -widget_t* window_manager_get_top_main_window(widget_t* widget); - -/** - * @method window_manager_get_top_window - * 获取最上面的窗口。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {widget_t*} 返回窗口对象。 - */ -widget_t* window_manager_get_top_window(widget_t* widget); - -/** - * @method window_manager_get_prev_window - * 获取前一个的窗口。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {widget_t*} 返回窗口对象。 - */ -widget_t* window_manager_get_prev_window(widget_t* widget); - -/** - * @method window_manager_get_pointer_x - * 获取指针当前的X坐标。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {xy_t} 返回指针当前的X坐标。 - */ -xy_t window_manager_get_pointer_x(widget_t* widget); - -/** - * @method window_manager_get_pointer_y - * 获取指针当前的Y坐标。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {xy_t} 返回指针当前的X坐标。 - */ -xy_t window_manager_get_pointer_y(widget_t* widget); - -/** - * @method window_manager_get_pointer_pressed - * 获取指针当前是否按下。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {bool_t} 返回指针当前是否按下。 - */ -bool_t window_manager_get_pointer_pressed(widget_t* widget); - -/** - * @method window_manager_is_animating - * 获取当前窗口动画是否正在播放。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {bool_t} 返回TRUE表示正在播放,FALSE表示没有播放。 - */ -bool_t window_manager_is_animating(widget_t* widget); - -/** - * @method window_manager_post_init - * post init。 - * @annotation ["private"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {wh_t} w 宽度 - * @param {wh_t} h 高度 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_post_init(widget_t* widget, wh_t w, wh_t h); - -/** - * @method window_manager_open_window - * 打开窗口。 - * @param {widget_t*} widget 窗口管理器对象。 - * @param {widget_t*} window 窗口对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_open_window(widget_t* widget, widget_t* window); - -/** - * @method window_manager_close_window - * 关闭窗口。 - * @annotation ["private"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {widget_t*} window 窗口对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_close_window(widget_t* widget, widget_t* window); - -/** - * @method window_manager_close_window_force - * 强制立即关闭窗口(内部使用函数,关闭窗口请使用 window_manager_close_window)。 - * - *> 本函数不会执行窗口动画。 - * @param {widget_t*} widget 窗口管理器对象。 - * @param {widget_t*} window 窗口对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_close_window_force(widget_t* widget, widget_t* window); - -/** - * @method window_manager_paint - * 绘制。 - * - *> 仅由主循环调用。 - * - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_paint(widget_t* widget); - -/** - * @method window_manager_check_and_layout - * 检查各个窗口的layout并且把有需要的执行对应的layout。 - * - *> 仅由主循环调用。 - * - * @annotation ["private"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_check_and_layout(widget_t* widget); - -/** - * @method window_manager_dispatch_input_event - * 分发输入事件。 - * - *> 一般仅由主循环调用,特殊情况也可以用来注入事件。 - * - * @param {widget_t*} widget 窗口管理器对象。 - * @param {event_t*} e 事件对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_dispatch_input_event(widget_t* widget, event_t* e); - -/** - * @method window_manager_set_show_fps - * 设置是否显示FPS。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {bool_t} show_fps 是否显示FPS。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_set_show_fps(widget_t* widget, bool_t show_fps); - -/** - * @method window_manager_set_max_fps - * 限制最大帧率。 - * - *> TK\_MAX\_LOOP\_FPS/max\_fps最好是整数,比如TK\_MAX\_LOOP\_FPS为120,max\_fps可取60/30/20/10等。 - * - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {uint32_t} max_fps 最大帧率。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_set_max_fps(widget_t* widget, uint32_t max_fps); - -/** - * @method window_manager_set_ignore_input_events - * 设置是否忽略用户输入事件。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {bool_t} ignore_input_events 是否忽略用户输入事件。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_set_ignore_input_events(widget_t* widget, bool_t ignore_input_events); - -/** - * @method window_manager_set_screen_saver_time - * 设置屏保时间。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {uint32_t} screen_saver_time 屏保时间(单位毫秒), 为0关闭屏保。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_set_screen_saver_time(widget_t* widget, uint32_t screen_saver_time); - -/** - * @method window_manager_set_cursor - * 设置鼠标指针。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {const char*} cursor 图片名称(从图片管理器中加载)。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_set_cursor(widget_t* widget, const char* cursor); - -/** - * @method window_manager_back - * 请求关闭顶层窗口。 - * - * > 如果顶层窗口时模态对话框,用DIALOG\_QUIT\_NONE调用dialog\_quit。 - * - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_back(widget_t* widget); - -/** - * @method window_manager_back_to_home - * 回到主窗口,关闭之上的全部窗口。 - * - * > 如果顶层窗口时模态对话框,用DIALOG\_QUIT\_NONE调用dialog\_quit。 - * - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_back_to_home(widget_t* widget); - -/** - * @method window_manager_back_to - * 回到指定的窗口,关闭之上的全部窗口。 - * - * > 如果顶层窗口时模态对话框,用DIALOG\_QUIT\_NONE调用dialog\_quit。 - * - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {const char*} target 目标窗口的名称。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_back_to(widget_t* widget, const char* target); - -/** - * @method window_manager_switch_to - * 切换到指定窗口。 - * - * ```c - * window_manager_switch_to(wm, win, widget_child(wm, "home"), FALSE); - * ``` - * @param {widget_t*} widget 窗口管理器对象。 - * @param {widget_t*} curr_win 当前窗口。 - * @param {widget_t*} target_win 目标窗口(必须存在,可以用widget_child函数到窗口管理器中查找)。 - * @param {bool_t} close 是否关闭当前窗口。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_switch_to(widget_t* widget, widget_t* curr_win, widget_t* target_win, - bool_t close); - -/** - * @method window_manager_dispatch_native_window_event - * 处理native window事件。 - * - * @param {widget_t*} widget 窗口管理器对象。 - * @param {event_t*} e 事件。 - * @param {void*} handle native window句柄。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_dispatch_native_window_event(widget_t* widget, event_t* e, void* handle); - -/** - * @method window_manager_begin_wait_pointer_cursor - * 开始等待鼠标指针。 - * @param {widget_t*} widget 窗口管理器对象。 - * @param {bool_t} ignore_user_input 是否忽略用户输入。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。。 - */ -ret_t window_manager_begin_wait_pointer_cursor(widget_t* widget, bool_t ignore_user_input); - -/** - * @method window_manager_end_wait_pointer_cursor - * 结束等待鼠标指针。 - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。。 - */ -ret_t window_manager_end_wait_pointer_cursor(widget_t* widget); - -/** - * @method window_manager_resize - * 调整原生窗口的大小。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * @param {wh_t} w 宽度 - * @param {wh_t} h 高度 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_resize(widget_t* widget, wh_t w, wh_t h); - -/** - * @method window_manager_close_all - * 关闭全部窗口。 - * @annotation ["scriptable"] - * @param {widget_t*} widget 窗口管理器对象。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t window_manager_close_all(widget_t* widget); - -/*public for animators*/ -ret_t window_manager_snap_curr_window(widget_t* widget, widget_t* curr_win, bitmap_t* img); - -ret_t window_manager_snap_prev_window(widget_t* widget, widget_t* prev_win, bitmap_t* img); - -dialog_highlighter_t* window_manager_get_dialog_highlighter(widget_t* widget); - -widget_t* window_manager_create(void); - -/** - * @method window_manager_destroy - */ -ret_t window_manager_destroy(widget_t* widget); - -/*helper for sub class*/ -/** - * @method window_manager_init - */ -widget_t* window_manager_init(window_manager_t* wm, const widget_vtable_t* wvt, - const window_manager_vtable_t* vt); - -widget_t* window_manager_find_target_by_win(widget_t* widget, void* native_win); -widget_t* window_manager_find_target(widget_t* widget, void* native_win, xy_t x, xy_t y); -ret_t window_manager_on_theme_changed(widget_t* widget); -ret_t window_manager_dispatch_top_window_changed(widget_t* widget); -ret_t window_manager_dispatch_window_event(widget_t* window, event_type_t type); -uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget); -ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, - uint32_t curr_expected_sleep_time); - -/* public for dialog highlighter */ -#define WIDGET_PROP_CURR_WIN "curr_win" - -#define WINDOW_MANAGER(widget) ((window_manager_t*)(widget)) - -END_C_DECLS - -#endif /*TK_WINDOW_MANAGER_H*/ +/** + * File: window_manager.h + * Author: AWTK Develop Team + * Brief: window manager + * + * Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * License file for more details. + * + */ + +/** + * History: + * ================================================================ + * 2018-01-13 Li XianJing created + * + */ + +#ifndef TK_WINDOW_MANAGER_H +#define TK_WINDOW_MANAGER_H + +#include "base/widget.h" +#include "base/canvas.h" +#include "base/dialog_highlighter.h" +#include "base/input_device_status.h" +#include "base/window_animator_factory.h" + +BEGIN_C_DECLS + +typedef widget_t* (*window_manager_get_top_window_t)(widget_t* widget); +typedef widget_t* (*window_manager_get_prev_window_t)(widget_t* widget); +typedef widget_t* (*window_manager_get_top_main_window_t)(widget_t* widget); +typedef ret_t (*window_manager_open_window_t)(widget_t* widget, widget_t* window); +typedef ret_t (*window_manager_close_window_t)(widget_t* widget, widget_t* window); +typedef ret_t (*window_manager_close_window_force_t)(widget_t* widget, widget_t* window); +typedef ret_t (*window_manager_paint_t)(widget_t* widget); +typedef ret_t (*window_manager_dispatch_input_event_t)(widget_t* widget, event_t* e); +typedef ret_t (*window_manager_set_show_fps_t)(widget_t* widget, bool_t show_fps); +typedef ret_t (*window_manager_set_max_fps_t)(widget_t* widget, uint32_t max_fps); +typedef ret_t (*window_manager_set_screen_saver_time_t)(widget_t* widget, uint32_t time); +typedef ret_t (*window_manager_set_cursor_t)(widget_t* widget, const char* cursor); +typedef ret_t (*window_manager_post_init_t)(widget_t* widget, wh_t w, wh_t h); +typedef ret_t (*window_manager_back_t)(widget_t* widget); +typedef ret_t (*window_manager_back_to_t)(widget_t* widget, const char* name); +typedef ret_t (*window_manager_switch_to_t)(widget_t* widget, widget_t* curr_win, + widget_t* target_win, bool_t close); +typedef ret_t (*window_manager_get_pointer_t)(widget_t* widget, xy_t* x, xy_t* y, bool_t* pressed); +typedef ret_t (*window_manager_is_animating_t)(widget_t* widget, bool_t* playing); + +typedef ret_t (*window_manager_dispatch_native_window_event_t)(widget_t* widget, event_t* e, + void* handle); + +typedef ret_t (*window_manager_snap_curr_window_t)(widget_t* widget, widget_t* curr_win, + bitmap_t* img); +typedef ret_t (*window_manager_snap_prev_window_t)(widget_t* widget, widget_t* prev_win, + bitmap_t* img); +typedef dialog_highlighter_t* (*window_manager_get_dialog_highlighter_t)(widget_t* widget); +typedef ret_t (*window_manager_resize_t)(widget_t* widget, wh_t w, wh_t h); +typedef ret_t (*window_manager_set_fullscreen_t)(widget_t* widget, bool_t fullscreen); + +typedef struct _window_manager_vtable_t { + window_manager_back_t back; + window_manager_back_to_t back_to; + window_manager_switch_to_t switch_to; + window_manager_paint_t paint; + window_manager_post_init_t post_init; + window_manager_set_cursor_t set_cursor; + window_manager_open_window_t open_window; + window_manager_close_window_t close_window; + window_manager_set_show_fps_t set_show_fps; + window_manager_set_max_fps_t set_max_fps; + window_manager_get_top_window_t get_top_window; + window_manager_get_prev_window_t get_prev_window; + window_manager_close_window_force_t close_window_force; + window_manager_get_top_main_window_t get_top_main_window; + window_manager_dispatch_input_event_t dispatch_input_event; + window_manager_dispatch_native_window_event_t dispatch_native_window_event; + window_manager_set_screen_saver_time_t set_screen_saver_time; + window_manager_get_pointer_t get_pointer; + window_manager_is_animating_t is_animating; + window_manager_snap_curr_window_t snap_curr_window; + window_manager_snap_prev_window_t snap_prev_window; + window_manager_get_dialog_highlighter_t get_dialog_highlighter; + window_manager_resize_t resize; + window_manager_set_fullscreen_t set_fullscreen; +} window_manager_vtable_t; + +/** + * @class window_manager_t + * @parent widget_t + * @annotation ["scriptable","widget"] + * 窗口管理器。 + */ +typedef struct _window_manager_t { + widget_t widget; + + /** + * @property {emitter_t*} global_emitter + * @annotation ["readable"] + * 全局事情分发器。 + */ + emitter_t* global_emitter; + + /*private*/ + bool_t show_fps; + widget_t* widget_grab_key; + bool_t ignore_input_events; + bool_t show_waiting_pointer_cursor; + const window_manager_vtable_t* vt; + uint32_t max_fps; + uint32_t curr_expected_sleep_time; +} window_manager_t; + +/** + * @event {window_event_t} EVT_TOP_WINDOW_CHANGED + * 顶层窗口改变的事件。 + */ + +/** + * @event {window_event_t} EVT_SCREEN_SAVER + * 在指定的时间内,没有用户输入事件,由窗口管理器触发。 + */ + +/** + * @event {event_t} EVT_ORIENTATION_CHANGED + * 屏幕旋转事件。 + */ + +/** + * @event {system_event_t} EVT_SYSTEM + * SDL系统事件。 + */ + +/** + * @method window_manager + * 获取全局window_manager对象 + * @alias window_manager_instance + * @annotation ["constructor", "scriptable", "cast"] + * + * @return {widget_t*} 对象。 + */ +widget_t* window_manager(void); + +/** + * @method window_manager_cast + * 转换为window_manager对象(供脚本语言使用)。 + * @annotation ["cast", "scriptable"] + * @param {widget_t*} widget window_manager对象。 + * + * @return {widget_t*} window_manager对象。 + */ +widget_t* window_manager_cast(widget_t* widget); + +/** + * @method window_manager_set + * 设置缺省的窗口管理器。 + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set(widget_t* widget); + +/** + * @method window_manager_get_top_main_window + * 获取最上面的主窗口。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {widget_t*} 返回窗口对象。 + */ +widget_t* window_manager_get_top_main_window(widget_t* widget); + +/** + * @method window_manager_get_top_window + * 获取最上面的窗口。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {widget_t*} 返回窗口对象。 + */ +widget_t* window_manager_get_top_window(widget_t* widget); + +/** + * @method window_manager_get_prev_window + * 获取前一个的窗口。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {widget_t*} 返回窗口对象。 + */ +widget_t* window_manager_get_prev_window(widget_t* widget); + +/** + * @method window_manager_get_pointer_x + * 获取指针当前的X坐标。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {xy_t} 返回指针当前的X坐标。 + */ +xy_t window_manager_get_pointer_x(widget_t* widget); + +/** + * @method window_manager_get_pointer_y + * 获取指针当前的Y坐标。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {xy_t} 返回指针当前的X坐标。 + */ +xy_t window_manager_get_pointer_y(widget_t* widget); + +/** + * @method window_manager_get_pointer_pressed + * 获取指针当前是否按下。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {bool_t} 返回指针当前是否按下。 + */ +bool_t window_manager_get_pointer_pressed(widget_t* widget); + +/** + * @method window_manager_is_animating + * 获取当前窗口动画是否正在播放。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {bool_t} 返回TRUE表示正在播放,FALSE表示没有播放。 + */ +bool_t window_manager_is_animating(widget_t* widget); + +/** + * @method window_manager_post_init + * post init。 + * @annotation ["private"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {wh_t} w 宽度 + * @param {wh_t} h 高度 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_post_init(widget_t* widget, wh_t w, wh_t h); + +/** + * @method window_manager_open_window + * 打开窗口。 + * @param {widget_t*} widget 窗口管理器对象。 + * @param {widget_t*} window 窗口对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_open_window(widget_t* widget, widget_t* window); + +/** + * @method window_manager_close_window + * 关闭窗口。 + * @annotation ["private"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {widget_t*} window 窗口对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_close_window(widget_t* widget, widget_t* window); + +/** + * @method window_manager_close_window_force + * 强制立即关闭窗口(内部使用函数,关闭窗口请使用 window_manager_close_window)。 + * + *> 本函数不会执行窗口动画。 + * @param {widget_t*} widget 窗口管理器对象。 + * @param {widget_t*} window 窗口对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_close_window_force(widget_t* widget, widget_t* window); + +/** + * @method window_manager_paint + * 绘制。 + * + *> 仅由主循环调用。 + * + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_paint(widget_t* widget); + +/** + * @method window_manager_check_and_layout + * 检查各个窗口的layout并且把有需要的执行对应的layout。 + * + *> 仅由主循环调用。 + * + * @annotation ["private"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_check_and_layout(widget_t* widget); + +/** + * @method window_manager_dispatch_input_event + * 分发输入事件。 + * + *> 一般仅由主循环调用,特殊情况也可以用来注入事件。 + * + * @param {widget_t*} widget 窗口管理器对象。 + * @param {event_t*} e 事件对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_dispatch_input_event(widget_t* widget, event_t* e); + +/** + * @method window_manager_set_show_fps + * 设置是否显示FPS。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {bool_t} show_fps 是否显示FPS。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set_show_fps(widget_t* widget, bool_t show_fps); + +/** + * @method window_manager_set_max_fps + * 限制最大帧率。 + * + *> TK\_MAX\_LOOP\_FPS/max\_fps最好是整数,比如TK\_MAX\_LOOP\_FPS为120,max\_fps可取60/30/20/10等。 + * + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {uint32_t} max_fps 最大帧率。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set_max_fps(widget_t* widget, uint32_t max_fps); + +/** + * @method window_manager_set_ignore_input_events + * 设置是否忽略用户输入事件。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {bool_t} ignore_input_events 是否忽略用户输入事件。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set_ignore_input_events(widget_t* widget, bool_t ignore_input_events); + +/** + * @method window_manager_set_screen_saver_time + * 设置屏保时间。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {uint32_t} screen_saver_time 屏保时间(单位毫秒), 为0关闭屏保。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set_screen_saver_time(widget_t* widget, uint32_t screen_saver_time); + +/** + * @method window_manager_set_cursor + * 设置鼠标指针。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {const char*} cursor 图片名称(从图片管理器中加载)。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set_cursor(widget_t* widget, const char* cursor); + +/** + * @method window_manager_back + * 请求关闭顶层窗口。 + * + * > 如果顶层窗口时模态对话框,用DIALOG\_QUIT\_NONE调用dialog\_quit。 + * + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_back(widget_t* widget); + +/** + * @method window_manager_back_to_home + * 回到主窗口,关闭之上的全部窗口。 + * + * > 如果顶层窗口时模态对话框,用DIALOG\_QUIT\_NONE调用dialog\_quit。 + * + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_back_to_home(widget_t* widget); + +/** + * @method window_manager_back_to + * 回到指定的窗口,关闭之上的全部窗口。 + * + * > 如果顶层窗口时模态对话框,用DIALOG\_QUIT\_NONE调用dialog\_quit。 + * + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {const char*} target 目标窗口的名称。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_back_to(widget_t* widget, const char* target); + +/** + * @method window_manager_switch_to + * 切换到指定窗口。 + * + * ```c + * window_manager_switch_to(wm, win, widget_child(wm, "home"), FALSE); + * ``` + * @param {widget_t*} widget 窗口管理器对象。 + * @param {widget_t*} curr_win 当前窗口。 + * @param {widget_t*} target_win 目标窗口(必须存在,可以用widget_child函数到窗口管理器中查找)。 + * @param {bool_t} close 是否关闭当前窗口。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_switch_to(widget_t* widget, widget_t* curr_win, widget_t* target_win, + bool_t close); + +/** + * @method window_manager_dispatch_native_window_event + * 处理native window事件。 + * + * @param {widget_t*} widget 窗口管理器对象。 + * @param {event_t*} e 事件。 + * @param {void*} handle native window句柄。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_dispatch_native_window_event(widget_t* widget, event_t* e, void* handle); + +/** + * @method window_manager_begin_wait_pointer_cursor + * 开始等待鼠标指针。 + * @param {widget_t*} widget 窗口管理器对象。 + * @param {bool_t} ignore_user_input 是否忽略用户输入。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。。 + */ +ret_t window_manager_begin_wait_pointer_cursor(widget_t* widget, bool_t ignore_user_input); + +/** + * @method window_manager_end_wait_pointer_cursor + * 结束等待鼠标指针。 + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。。 + */ +ret_t window_manager_end_wait_pointer_cursor(widget_t* widget); + +/** + * @method window_manager_resize + * 调整原生窗口的大小。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {wh_t} w 宽度 + * @param {wh_t} h 高度 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_resize(widget_t* widget, wh_t w, wh_t h); + +/** + * @method window_manager_set_fullscreen + * 设置原生窗口是否全屏。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * @param {bool_t} fullscreen 是否全屏 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_set_fullscreen(widget_t* widget, bool_t fullscreen); + +/** + * @method window_manager_close_all + * 关闭全部窗口。 + * @annotation ["scriptable"] + * @param {widget_t*} widget 窗口管理器对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_close_all(widget_t* widget); + +/*public for animators*/ +ret_t window_manager_snap_curr_window(widget_t* widget, widget_t* curr_win, bitmap_t* img); + +ret_t window_manager_snap_prev_window(widget_t* widget, widget_t* prev_win, bitmap_t* img); + +dialog_highlighter_t* window_manager_get_dialog_highlighter(widget_t* widget); + +widget_t* window_manager_create(void); + +/** + * @method window_manager_destroy + * 销毁window_manager。 + * @param {widget_t*} widget window_manager对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t window_manager_destroy(widget_t* widget); + +/*helper for sub class*/ +/** + * @method window_manager_init + * 初始化window_manager。 + * @param {window_manager_t*} wm window_manager对象。 + * @param {const widget_vtable_t*} wvt 控件基类虚表。 + * @param {const window_manager_vtable_t*} vt window_manager虚表。 + * + * @return {widget_t*} 返回window_manager对象。 + */ +widget_t* window_manager_init(window_manager_t* wm, const widget_vtable_t* wvt, + const window_manager_vtable_t* vt); + +widget_t* window_manager_find_target_by_win(widget_t* widget, void* native_win); +widget_t* window_manager_find_target(widget_t* widget, void* native_win, xy_t x, xy_t y); +ret_t window_manager_on_theme_changed(widget_t* widget); +ret_t window_manager_dispatch_top_window_changed(widget_t* widget); +ret_t window_manager_dispatch_window_event(widget_t* window, event_type_t type); +uint32_t window_manager_get_curr_expected_sleep_time(widget_t* widget); +ret_t window_manager_set_curr_expected_sleep_time(widget_t* widget, + uint32_t curr_expected_sleep_time); + +/* public for dialog highlighter */ +#define WIDGET_PROP_CURR_WIN "curr_win" + +#define WINDOW_MANAGER(widget) ((window_manager_t*)(widget)) + +END_C_DECLS + +#endif /*TK_WINDOW_MANAGER_H*/ diff --git a/project/gui/awtk/src/conf_io/conf_node.c b/project/gui/awtk/src/conf_io/conf_node.c index 2643751c7..a96fd96e9 100644 --- a/project/gui/awtk/src/conf_io/conf_node.c +++ b/project/gui/awtk/src/conf_io/conf_node.c @@ -483,9 +483,27 @@ ret_t conf_node_set_value(conf_node_t* node, const value_t* v) { return_value_if_fail(node->value_type != CONF_NODE_VALUE_NODE, RET_BAD_PARAMS); if (node->value_type == CONF_NODE_VALUE_STRING) { + if (v->type == VALUE_TYPE_STRING) { + const char* p = value_str(v); + if (node->value.str == p && p != NULL) { + return RET_OK; + } + } TKMEM_FREE(node->value.str); - } - if (node->value_type == CONF_NODE_VALUE_WSTRING) { + } else if (node->value_type == CONF_NODE_VALUE_SMALL_STR) { + if (v->type == VALUE_TYPE_STRING) { + const char* p = value_str(v); + if (node->value.small_str == p && p != NULL) { + return RET_OK; + } + } + } else if (node->value_type == CONF_NODE_VALUE_WSTRING) { + if (v->type == VALUE_TYPE_WSTRING) { + const wchar_t* p = value_wstr(v); + if (node->value.wstr == p && p != NULL) { + return RET_OK; + } + } TKMEM_FREE(node->value.wstr); } @@ -567,7 +585,7 @@ ret_t conf_node_set_value(conf_node_t* node, const value_t* v) { const wchar_t* str = value_wstr(v); node->value_type = CONF_NODE_VALUE_WSTRING; if (str == NULL) { - node->value.str = NULL; + node->value.wstr = NULL; } else { node->value.wstr = wcsdup(str); return_value_if_fail(node->value.wstr != NULL, RET_OOM); @@ -1103,7 +1121,7 @@ int32_t conf_node_get_child_value_int32(conf_node_t* node, const char* name, int value_t v; return_value_if_fail(node != NULL && name != NULL, defval); - if(conf_node_get_child_value(node, name, &v) == RET_OK) { + if (conf_node_get_child_value(node, name, &v) == RET_OK) { return value_int32(&v); } else { return defval; @@ -1114,7 +1132,7 @@ bool_t conf_node_get_child_value_bool(conf_node_t* node, const char* name, bool_ value_t v; return_value_if_fail(node != NULL && name != NULL, defval); - if(conf_node_get_child_value(node, name, &v) == RET_OK) { + if (conf_node_get_child_value(node, name, &v) == RET_OK) { return value_bool(&v); } else { return defval; @@ -1125,7 +1143,7 @@ const char* conf_node_get_child_value_str(conf_node_t* node, const char* name, c value_t v; return_value_if_fail(node != NULL && name != NULL, defval); - if(conf_node_get_child_value(node, name, &v) == RET_OK) { + if (conf_node_get_child_value(node, name, &v) == RET_OK) { return value_str(&v); } else { return defval; diff --git a/project/gui/awtk/src/debugger/debugger_client.c b/project/gui/awtk/src/debugger/debugger_client.c index a38e31a57..f93c8eb6e 100644 --- a/project/gui/awtk/src/debugger/debugger_client.c +++ b/project/gui/awtk/src/debugger/debugger_client.c @@ -1,4 +1,4 @@ -/** +/** * File: debugger.c * Author: AWTK Develop Team * Brief: debugger @@ -65,12 +65,14 @@ static ret_t debugger_client_dispatch_message(debugger_t* debugger, debugger_res switch (resp->code) { case DEBUGGER_RESP_MSG_BREAKED: { uint32_t line = 0; + const char* file_path = NULL; debugger_breaked_event_t event; tk_object_t* obj = ubjson_to_object(client->buff, resp->size); return_value_if_fail(obj != NULL, RET_BAD_PARAMS); line = tk_object_get_prop_int(obj, STR_DEBUGGER_EVENT_PROP_LINE, 0); + file_path = tk_object_get_prop_str(obj, STR_DEBUGGER_EVENT_PROP_FILE_PATH); debugger_set_state(debugger, DEBUGGER_PROGRAM_STATE_PAUSED); - emitter_dispatch(EMITTER(debugger), debugger_breaked_event_init(&event, line)); + emitter_dispatch(EMITTER(debugger), debugger_breaked_event_init_ex(&event, line, file_path)); TK_OBJECT_UNREF(obj); break; } @@ -510,4 +512,4 @@ debugger_t* debugger_client_create(tk_iostream_t* io) { debugger->buff = TKMEM_ALLOC(debugger->capacity); return (debugger_t*)debugger; -} \ No newline at end of file +} diff --git a/project/gui/awtk/src/debugger/debugger_const.h b/project/gui/awtk/src/debugger/debugger_const.h index da30f95e0..59284ac60 100644 --- a/project/gui/awtk/src/debugger/debugger_const.h +++ b/project/gui/awtk/src/debugger/debugger_const.h @@ -1,4 +1,4 @@ -/** +/** * File: debugger_const.h * Author: AWTK Develop Team * Brief: debugger constant @@ -26,6 +26,7 @@ #define STR_DEBUGGER_EVENT_PROP_LINE "line" #define STR_DEBUGGER_EVENT_PROP_MESSAGE "message" +#define STR_DEBUGGER_EVENT_PROP_FILE_PATH "file_path" #define DEBUGGER_IO_READ_TIMEOUT 1000000 #define DEBUGGER_IO_WRITE_TIMEOUT 500000 diff --git a/project/gui/awtk/src/debugger/debugger_lldb.c b/project/gui/awtk/src/debugger/debugger_lldb.c index 7607f4494..95cf2873a 100644 --- a/project/gui/awtk/src/debugger/debugger_lldb.c +++ b/project/gui/awtk/src/debugger/debugger_lldb.c @@ -169,16 +169,18 @@ static ret_t debugger_lldb_emit(debugger_t* debugger, tk_object_t* resp) { if (tk_str_eq(event, EVENT_STOPPED)) { int32_t line = 0; + const char* file_path = NULL; debugger_breaked_event_t event; TK_OBJECT_UNREF(lldb->callstack); - + lldb->stop_thread_id = tk_object_get_prop_int64(resp, "body.threadId", 0); lldb->callstack = debugger_lldb_get_callstack_impl(debugger, 0, 100); + file_path = debugger_lldb_get_source_path(debugger, debugger->current_frame_index); debugger_set_state(debugger, DEBUGGER_PROGRAM_STATE_PAUSED); debugger_set_current_frame(debugger, 0); /*LLDB 行号从1开始*/ line = lldb->current_frame_line - 1; - emitter_dispatch(EMITTER(debugger), debugger_breaked_event_init(&event, line)); + emitter_dispatch(EMITTER(debugger), debugger_breaked_event_init_ex(&event, line, file_path)); log_debug("threadId = %d stopped\n", (int)lldb->stop_thread_id); } else if (tk_str_eq(event, EVENT_OUTPUT)) { @@ -982,11 +984,12 @@ static ret_t debugger_lldb_set_current_frame(debugger_t* debugger, uint32_t fram lldb->current_frame_id = debugger_lldb_get_frame_id(debugger, frame_index); lldb->current_frame_name = debugger_lldb_get_frame_name(debugger, frame_index); lldb->current_frame_line = debugger_lldb_get_source_line(debugger, frame_index); + lldb->current_frame_file_path = debugger_lldb_get_source_path(debugger, frame_index); debugger_lldb_scopes_command(debugger, lldb->current_frame_id); /*LLDB 行号从1开始*/ - debugger_frame_changed_event_init(&event, lldb->current_frame_name, lldb->current_frame_line - 1); + debugger_frame_changed_event_init_ex(&event, lldb->current_frame_name, lldb->current_frame_line - 1, lldb->current_frame_file_path); emitter_dispatch(EMITTER(debugger), (event_t*)&(event)); return RET_OK; diff --git a/project/gui/awtk/src/debugger/debugger_lldb.h b/project/gui/awtk/src/debugger/debugger_lldb.h index ac2403cd9..617d8d61c 100644 --- a/project/gui/awtk/src/debugger/debugger_lldb.h +++ b/project/gui/awtk/src/debugger/debugger_lldb.h @@ -1,4 +1,4 @@ -/** +/** * File: debugger_lldb.h * Author: AWTK Develop Team * Brief: debugger lldb @@ -56,6 +56,7 @@ typedef struct _debugger_lldb_t { int64_t current_frame_line; const char* current_frame_name; const char* current_frame_source; + const char* current_frame_file_path; tk_object_t* resps; /*代码文件缓存*/ @@ -83,4 +84,4 @@ debugger_t* debugger_lldb_create(const char* host, uint32_t port); END_C_DECLS -#endif /*TK_DEBUGGER_LLDB_H*/ \ No newline at end of file +#endif /*TK_DEBUGGER_LLDB_H*/ diff --git a/project/gui/awtk/src/debugger/debugger_message.c b/project/gui/awtk/src/debugger/debugger_message.c index d777a593a..c891be7c3 100644 --- a/project/gui/awtk/src/debugger/debugger_message.c +++ b/project/gui/awtk/src/debugger/debugger_message.c @@ -1,4 +1,4 @@ -/** +/** * File: debugger_message.c * Author: AWTK Develop Team * Brief: debugger message @@ -71,6 +71,18 @@ event_t* debugger_breaked_event_init(debugger_breaked_event_t* event, uint32_t l return (event_t*)event; } +event_t* debugger_breaked_event_init_ex(debugger_breaked_event_t* event, uint32_t line, const char* file_path) { + return_value_if_fail(event != NULL, NULL); + + memset(event, 0x00, sizeof(*event)); + event->e = event_init(DEBUGGER_RESP_MSG_BREAKED, NULL); + event->e.size = sizeof(*event); + event->line = line; + event->file_path = file_path; + + return (event_t*)event; +} + debugger_breaked_event_t* debugger_breaked_event_cast(event_t* event) { return_value_if_fail(event != NULL && event->type == DEBUGGER_RESP_MSG_BREAKED, NULL); return_value_if_fail(event->size == sizeof(debugger_breaked_event_t), NULL); @@ -90,9 +102,22 @@ event_t* debugger_frame_changed_event_init(debugger_frame_changed_event_t* event return (event_t*)event; } +event_t* debugger_frame_changed_event_init_ex(debugger_frame_changed_event_t* event, const char* func, uint32_t line, const char* file_path) { + return_value_if_fail(event != NULL, NULL); + + memset(event, 0x00, sizeof(*event)); + event->e = event_init(DEBUGGER_RESP_MSG_FRAME_CHANGED, NULL); + event->e.size = sizeof(*event); + event->func = func; + event->line = line; + event->file_path = file_path; + + return (event_t*)event; +} + debugger_frame_changed_event_t* debugger_frame_changed_event_cast(event_t* event) { return_value_if_fail(event != NULL && event->type == DEBUGGER_RESP_MSG_FRAME_CHANGED, NULL); return_value_if_fail(event->size == sizeof(debugger_frame_changed_event_t), NULL); return (debugger_frame_changed_event_t*)event; -} \ No newline at end of file +} diff --git a/project/gui/awtk/src/debugger/debugger_message.h b/project/gui/awtk/src/debugger/debugger_message.h index a77e80bd3..5db3a86ce 100644 --- a/project/gui/awtk/src/debugger/debugger_message.h +++ b/project/gui/awtk/src/debugger/debugger_message.h @@ -1,4 +1,4 @@ -/** +/** * File: debugger_message.h * Author: AWTK Develop Team * Brief: debugger message @@ -458,6 +458,13 @@ typedef struct _debugger_breaked_event_t { * 中断运行的行号。 */ uint32_t line; + + /** + * @property {const char*} file_path + * @annotation ["readable"] + * 中断运行的文件路径。(备注:可能文件路径为空) + */ + const char* file_path; } debugger_breaked_event_t; /** @@ -471,6 +478,18 @@ typedef struct _debugger_breaked_event_t { */ event_t* debugger_breaked_event_init(debugger_breaked_event_t* event, uint32_t line); +/** + * @method debugger_breaked_event_init_ex + * 初始调试器中断运行的事件。 + * + * @param {debugger_breaked_event_t*} event event对象。 + * @param {uint32_t} line 中断运行的行号。 + * @param {const char*} file_path 中断运行的行号。 + * + * @return {event_t*} 返回event对象。 + */ +event_t* debugger_breaked_event_init_ex(debugger_breaked_event_t* event, uint32_t line, const char* file_path); + /** * @method debugger_breaked_event_cast * @annotation ["cast"] @@ -503,6 +522,12 @@ typedef struct _debugger_frame_changed_event_t { */ const char* func; + /** + * @property {const char*} file_path + * @annotation ["readable"] + * 文件路径。(备注:可能文件路径为空) + */ + const char* file_path; } debugger_frame_changed_event_t; /** @@ -517,6 +542,19 @@ typedef struct _debugger_frame_changed_event_t { */ event_t* debugger_frame_changed_event_init(debugger_frame_changed_event_t* event, const char* func, uint32_t line); +/** + * @method debugger_frame_changed_event_init + * 初始化 + * + * @param {debugger_frame_changed_event_t*} event event对象。 + * @param {const char*} func 函数名。 + * @param {uint32_t} line 行号。 + * @param {const char*} file_path 文件路径。 + * + * @return {event_t*} 返回event对象。 + */ +event_t* debugger_frame_changed_event_init_ex(debugger_frame_changed_event_t* event, const char* func, uint32_t line, const char* file_path); + /** * @method debugger_frame_changed_event_cast * @annotation ["cast"] @@ -530,4 +568,4 @@ debugger_frame_changed_event_t* debugger_frame_changed_event_cast(event_t* event END_C_DECLS -#endif /*TK_DEBUGGER_MESSAGE_H*/ \ No newline at end of file +#endif /*TK_DEBUGGER_MESSAGE_H*/ diff --git a/project/gui/awtk/src/debugger/debugger_server.c b/project/gui/awtk/src/debugger/debugger_server.c index cb6ccf8c0..7588d7299 100644 --- a/project/gui/awtk/src/debugger/debugger_server.c +++ b/project/gui/awtk/src/debugger/debugger_server.c @@ -1,4 +1,4 @@ -/** +/** * File: debugger_server.h * Author: AWTK Develop Team * Brief: debugger server @@ -296,6 +296,7 @@ static ret_t debugger_server_on_events(void* ctx, event_t* e) { case DEBUGGER_RESP_MSG_BREAKED: { debugger_breaked_event_t* event = debugger_breaked_event_cast(e); tk_object_set_prop_int(obj, STR_DEBUGGER_EVENT_PROP_LINE, event->line); + tk_object_set_prop_str(obj, STR_DEBUGGER_EVENT_PROP_FILE_PATH, event->file_path); ret = debugger_server_send_object(server, &msg, obj); break; } @@ -682,4 +683,4 @@ ret_t debugger_server_set_single_mode_ex(bool_t single_mode, const char* lang, ret_t debugger_server_set_single_mode(bool_t single_mode) { return debugger_server_set_single_mode_ex(single_mode, NULL, NULL); -} \ No newline at end of file +} diff --git a/project/gui/awtk/src/streams/mem/istream_mem.c b/project/gui/awtk/src/streams/mem/istream_mem.c index c93322f98..bf7c25cd5 100644 --- a/project/gui/awtk/src/streams/mem/istream_mem.c +++ b/project/gui/awtk/src/streams/mem/istream_mem.c @@ -35,7 +35,7 @@ static int32_t tk_istream_mem_read(tk_istream_t* stream, uint8_t* buff, uint32_t } if (size > 0) { - memcpy(buff, istream_mem->buff + istream_mem->cursor, size); + memcpy(buff, ((uint8_t*)istream_mem->buff) + istream_mem->cursor, size); istream_mem->cursor += size; } else { errno = EIO; @@ -106,7 +106,7 @@ static const object_vtable_t s_tk_istream_mem_vtable = {.type = "tk_istream_mem" .get_prop = tk_istream_mem_get_prop, .set_prop = tk_istream_mem_set_prop}; -tk_istream_t* tk_istream_mem_create(uint8_t* buff, uint32_t size, uint32_t packet_size, +tk_istream_t* tk_istream_mem_create(void* buff, uint32_t size, uint32_t packet_size, bool_t own_the_buff) { tk_object_t* obj = NULL; tk_istream_mem_t* istream_mem = NULL; @@ -129,3 +129,7 @@ tk_istream_t* tk_istream_mem_create(uint8_t* buff, uint32_t size, uint32_t packe return TK_ISTREAM(obj); } + +tk_istream_t* tk_istream_mem_create_simple(void* buff, uint32_t size) { + return tk_istream_mem_create(buff, size, 0, FALSE); +} diff --git a/project/gui/awtk/src/streams/mem/istream_mem.h b/project/gui/awtk/src/streams/mem/istream_mem.h index af2764569..0fbfcc66f 100644 --- a/project/gui/awtk/src/streams/mem/istream_mem.h +++ b/project/gui/awtk/src/streams/mem/istream_mem.h @@ -41,7 +41,7 @@ struct _tk_istream_mem_t { /*private*/ bool_t own_the_buff; - uint8_t* buff; + void* buff; uint32_t size; uint32_t cursor; uint32_t packet_size; @@ -52,7 +52,7 @@ struct _tk_istream_mem_t { * * 创建istream对象。 * - * @param {uint8_t*} buff 返回数据的缓冲区。 + * @param {void*} buff 返回数据的缓冲区。 * @param {uint32_t} size 缓冲区的大小。 * @param {uint32_t} packet_size 缺省一次读取的数据的长度。 * @param {bool_t} own_the_buff 是否让istream对象拥有buff。 @@ -60,9 +60,22 @@ struct _tk_istream_mem_t { * @return {tk_istream_t*} 返回istream对象。 * */ -tk_istream_t* tk_istream_mem_create(uint8_t* buff, uint32_t size, uint32_t packet_size, +tk_istream_t* tk_istream_mem_create(void* buff, uint32_t size, uint32_t packet_size, bool_t own_the_buff); +/** + * @method tk_istream_mem_create_simple + * + * 创建istream对象。 + * + * @param {void*} buff 返回数据的缓冲区。 + * @param {uint32_t} size 缓冲区的大小。 + * + * @return {tk_istream_t*} 返回istream对象。 + * + */ +tk_istream_t* tk_istream_mem_create_simple(void* buff, uint32_t size); + #define TK_ISTREAM_MEM(obj) ((tk_istream_mem_t*)(obj)) END_C_DECLS diff --git a/project/gui/awtk/src/streams/mem/ostream_mem.c b/project/gui/awtk/src/streams/mem/ostream_mem.c index 1f8a40253..d3925efd1 100644 --- a/project/gui/awtk/src/streams/mem/ostream_mem.c +++ b/project/gui/awtk/src/streams/mem/ostream_mem.c @@ -35,7 +35,7 @@ static int32_t tk_ostream_mem_write(tk_ostream_t* stream, const uint8_t* buff, u } if (size > 0) { - memcpy(ostream_mem->buff + ostream_mem->cursor, buff, size); + memcpy(((uint8_t*)ostream_mem->buff) + ostream_mem->cursor, buff, size); ostream_mem->cursor += size; } @@ -82,7 +82,7 @@ static const object_vtable_t s_tk_ostream_mem_vtable = {.type = "tk_ostream_mem" .get_prop = tk_ostream_mem_get_prop, .set_prop = tk_ostream_mem_set_prop}; -tk_ostream_t* tk_ostream_mem_create(uint8_t* buff, uint32_t size, uint32_t packet_size, +tk_ostream_t* tk_ostream_mem_create(void* buff, uint32_t size, uint32_t packet_size, bool_t own_the_buff) { tk_object_t* obj = NULL; tk_ostream_mem_t* ostream_mem = NULL; @@ -103,3 +103,7 @@ tk_ostream_t* tk_ostream_mem_create(uint8_t* buff, uint32_t size, uint32_t packe return TK_OSTREAM(obj); } + +tk_ostream_t* tk_ostream_mem_create_simple(void* buff, uint32_t size) { + return tk_ostream_mem_create(buff, size, 0, FALSE); +} diff --git a/project/gui/awtk/src/streams/mem/ostream_mem.h b/project/gui/awtk/src/streams/mem/ostream_mem.h index 2e9d53733..123ba4d27 100644 --- a/project/gui/awtk/src/streams/mem/ostream_mem.h +++ b/project/gui/awtk/src/streams/mem/ostream_mem.h @@ -41,7 +41,7 @@ struct _tk_ostream_mem_t { /*private*/ bool_t own_the_buff; - uint8_t* buff; + void* buff; uint32_t size; uint32_t cursor; uint32_t packet_size; @@ -52,17 +52,30 @@ struct _tk_ostream_mem_t { * * 创建ostream对象。 * - * @param {uint8_t*} buff 返回数据的缓冲区。 + * @param {void*} buff 返回数据的缓冲区。 * @param {uint32_t} size 缓冲区的大小。 - * @param {uint32_t} packet_size 缺省一次读取的数据的长度。 + * @param {uint32_t} packet_size 缺省一次写入的数据的长度(一般无0)。 * @param {bool_t} own_the_buff 是否让ostream对象拥有buff。 * * @return {tk_ostream_t*} 返回ostream对象。 * */ -tk_ostream_t* tk_ostream_mem_create(uint8_t* buff, uint32_t size, uint32_t packet_size, +tk_ostream_t* tk_ostream_mem_create(void* buff, uint32_t size, uint32_t packet_size, bool_t own_the_buff); +/** + * @method tk_ostream_mem_create_simple + * + * 创建ostream对象。 + * + * @param {void*} buff 返回数据的缓冲区。 + * @param {uint32_t} size 缓冲区的大小。 + * + * @return {tk_ostream_t*} 返回ostream对象。 + * + */ +tk_ostream_t* tk_ostream_mem_create_simple(void* buff, uint32_t size); + #define TK_OSTREAM_MEM(obj) ((tk_ostream_mem_t*)(obj)) END_C_DECLS diff --git a/project/gui/awtk/src/streams/serial/iostream_serial.c b/project/gui/awtk/src/streams/serial/iostream_serial.c index b59ed7461..602fe868b 100644 --- a/project/gui/awtk/src/streams/serial/iostream_serial.c +++ b/project/gui/awtk/src/streams/serial/iostream_serial.c @@ -19,6 +19,8 @@ * */ +#include "tkc/url.h" +#include "tkc/path.h" #include "tkc/mem.h" #include "streams/serial/istream_serial.h" #include "streams/serial/ostream_serial.h" @@ -190,3 +192,10 @@ ret_t tk_iostream_serial_wait_for_data(tk_iostream_t* iostream, uint32_t timeout return serial_wait_for_data(iostream_serial->fd, timeout); } + +#include "streams/stream_factory.h" + +tk_iostream_t* tk_iostream_serial_create_ex(const char* url) { + return tk_stream_factory_create_iostream(url); +} + diff --git a/project/gui/awtk/src/streams/serial/iostream_serial.h b/project/gui/awtk/src/streams/serial/iostream_serial.h index f8a8f6afa..b6db69de0 100644 --- a/project/gui/awtk/src/streams/serial/iostream_serial.h +++ b/project/gui/awtk/src/streams/serial/iostream_serial.h @@ -57,7 +57,7 @@ struct _tk_iostream_serial_t { /** * @method tk_iostream_serial_create * - * 创建iostream对象。 + * 创建串口iostream对象。 * > 缺省配置: baudrate=115200 bytesize=8 stopbits=1 flowcontrol=0 parity=0 * @param {const char*} port port name。 * @@ -66,6 +66,27 @@ struct _tk_iostream_serial_t { */ tk_iostream_t* tk_iostream_serial_create(const char* port); +/** + * @method tk_iostream_serial_create_ex + * + * 创建串口iostream对象。 + * * serial : serial://device?baudrate=115200&stopbits=1 + * * serial : serial://device?baudrate=115200&stopbits=1&parity=odd&flowcontrol=soft&bytesize=8 + * + * 串口URL参数说明: + * * baudrate {int} 波特率。常用值: 9600, 38400, 57600, 115200。(默认值:115200) + * * stopbits {string} 停止位。可选值:1, 1.5, 2。(默认值:1) + * * parity {string} 校验位。可选值:none, odd, even, mark, space。(默认值:none) + * * flowcontrol {string} 流控。可选值:none, hardware, software。(默认值:none) + * * bytesize {string} 数据位。可选值:5, 6, 7, 8 。(默认值:8) + * + * @param {const char*} url 串口设备文件及参数。 + * + * @return {tk_iostream_t*} 返回iostream对象。 + * + */ +tk_iostream_t* tk_iostream_serial_create_ex(const char* url); + /** * @method tk_iostream_serial_config * diff --git a/project/gui/awtk/src/tkc/buffer.c b/project/gui/awtk/src/tkc/buffer.c index 6f73c4353..5fb4b7b7c 100644 --- a/project/gui/awtk/src/tkc/buffer.c +++ b/project/gui/awtk/src/tkc/buffer.c @@ -1,9 +1,9 @@ -/** +/** * File: buffer.c * Author: AWTK Develop Team * Brief: buffer * - * Copyright (c) 2018 - 2022 Guangzhou ZHIYUAN Electronics Co.,Ltd. + * Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,10 +23,52 @@ #include "tkc/utils.h" #include "tkc/buffer.h" -wbuffer_t* wbuffer_init(wbuffer_t* wbuffer, uint8_t* data, uint32_t capacity) { +wbuffer_t* wbuffer_create(void* data, uint32_t capacity) { + wbuffer_t* buffer = NULL; + return_value_if_fail(data != NULL && capacity > 0, NULL); + buffer = TKMEM_ZALLOC(wbuffer_t); + + return wbuffer_init(buffer, data, capacity); +} + +wbuffer_t* wbuffer_create_extendable(void) { + wbuffer_t* buffer = TKMEM_ZALLOC(wbuffer_t); + + return wbuffer_init_extendable(buffer); +} + +ret_t wbuffer_destroy(wbuffer_t* wbuffer) { + return_value_if_fail(wbuffer != NULL, RET_BAD_PARAMS); + wbuffer_deinit(wbuffer); + TKMEM_FREE(wbuffer); + + return RET_OK; +} + +rbuffer_t* rbuffer_create(const void* data, uint32_t capacity) { + rbuffer_t* buffer = NULL; + return_value_if_fail(data != NULL && capacity > 0, NULL); + buffer = TKMEM_ZALLOC(rbuffer_t); + + return rbuffer_init(buffer, data, capacity); +} + +ret_t rbuffer_deinit(rbuffer_t* rbuffer) { + return RET_OK; +} + +ret_t rbuffer_destroy(rbuffer_t* rbuffer) { + return_value_if_fail(rbuffer != NULL, RET_BAD_PARAMS); + + TKMEM_FREE(rbuffer); + + return RET_OK; +} + +wbuffer_t* wbuffer_init(wbuffer_t* wbuffer, void* data, uint32_t capacity) { return_value_if_fail(wbuffer != NULL && data != NULL, NULL); - wbuffer->data = data; + wbuffer->data = (uint8_t*)data; wbuffer->cursor = 0; wbuffer->extendable = FALSE; wbuffer->capacity = capacity; @@ -135,6 +177,32 @@ ret_t wbuffer_write_uint32(wbuffer_t* wbuffer, uint32_t value) { return RET_OK; } +ret_t wbuffer_write_uint64(wbuffer_t* wbuffer, uint64_t value) { + return_value_if_fail(wbuffer_extend_delta(wbuffer, sizeof(value)) == RET_OK, RET_BAD_PARAMS); + + memcpy(wbuffer->data + wbuffer->cursor, &value, sizeof(value)); + wbuffer->cursor += sizeof(value); + + return RET_OK; +} + +ret_t wbuffer_write_int8(wbuffer_t* wbuffer, int8_t value) { + return_value_if_fail(wbuffer_extend_delta(wbuffer, sizeof(value)) == RET_OK, RET_BAD_PARAMS); + + wbuffer->data[wbuffer->cursor++] = value; + + return RET_OK; +} + +ret_t wbuffer_write_int16(wbuffer_t* wbuffer, int16_t value) { + return_value_if_fail(wbuffer_extend_delta(wbuffer, sizeof(value)) == RET_OK, RET_BAD_PARAMS); + + memcpy(wbuffer->data + wbuffer->cursor, &value, sizeof(value)); + wbuffer->cursor += sizeof(value); + + return RET_OK; +} + ret_t wbuffer_write_int32(wbuffer_t* wbuffer, int32_t value) { return_value_if_fail(wbuffer_extend_delta(wbuffer, sizeof(value)) == RET_OK, RET_BAD_PARAMS); @@ -144,7 +212,7 @@ ret_t wbuffer_write_int32(wbuffer_t* wbuffer, int32_t value) { return RET_OK; } -ret_t wbuffer_write_uint64(wbuffer_t* wbuffer, uint64_t value) { +ret_t wbuffer_write_int64(wbuffer_t* wbuffer, int64_t value) { return_value_if_fail(wbuffer_extend_delta(wbuffer, sizeof(value)) == RET_OK, RET_BAD_PARAMS); memcpy(wbuffer->data + wbuffer->cursor, &value, sizeof(value)); @@ -192,10 +260,10 @@ ret_t wbuffer_write_string(wbuffer_t* wbuffer, const char* data) { return wbuffer_write_binary(wbuffer, data, strlen(data) + 1); } -rbuffer_t* rbuffer_init(rbuffer_t* rbuffer, const uint8_t* data, uint32_t capacity) { +rbuffer_t* rbuffer_init(rbuffer_t* rbuffer, const void* data, uint32_t capacity) { return_value_if_fail(rbuffer != NULL && data != NULL, NULL); - rbuffer->data = data; + rbuffer->data = (const uint8_t*)data; rbuffer->cursor = 0; rbuffer->capacity = capacity; @@ -254,6 +322,35 @@ ret_t rbuffer_read_uint32(rbuffer_t* rbuffer, uint32_t* value) { return RET_OK; } +ret_t rbuffer_read_uint64(rbuffer_t* rbuffer, uint64_t* value) { + return_value_if_fail(rbuffer != NULL && rbuffer->data != NULL && value != NULL, RET_BAD_PARAMS); + return_value_if_fail((rbuffer->cursor + sizeof(*value)) <= rbuffer->capacity, RET_BAD_PARAMS); + + memcpy(value, rbuffer->data + rbuffer->cursor, sizeof(*value)); + rbuffer->cursor += sizeof(*value); + + return RET_OK; +} + +ret_t rbuffer_read_int8(rbuffer_t* rbuffer, int8_t* value) { + return_value_if_fail(rbuffer != NULL && rbuffer->data != NULL && value != NULL, RET_BAD_PARAMS); + return_value_if_fail((rbuffer->cursor + sizeof(*value)) <= rbuffer->capacity, RET_BAD_PARAMS); + + *value = rbuffer->data[rbuffer->cursor++]; + + return RET_OK; +} + +ret_t rbuffer_read_int16(rbuffer_t* rbuffer, int16_t* value) { + return_value_if_fail(rbuffer != NULL && rbuffer->data != NULL && value != NULL, RET_BAD_PARAMS); + return_value_if_fail((rbuffer->cursor + sizeof(*value)) <= rbuffer->capacity, RET_BAD_PARAMS); + + memcpy(value, rbuffer->data + rbuffer->cursor, sizeof(*value)); + rbuffer->cursor += sizeof(*value); + + return RET_OK; +} + ret_t rbuffer_read_int32(rbuffer_t* rbuffer, int32_t* value) { return_value_if_fail(rbuffer != NULL && rbuffer->data != NULL && value != NULL, RET_BAD_PARAMS); return_value_if_fail((rbuffer->cursor + sizeof(*value)) <= rbuffer->capacity, RET_BAD_PARAMS); @@ -264,7 +361,7 @@ ret_t rbuffer_read_int32(rbuffer_t* rbuffer, int32_t* value) { return RET_OK; } -ret_t rbuffer_read_uint64(rbuffer_t* rbuffer, uint64_t* value) { +ret_t rbuffer_read_int64(rbuffer_t* rbuffer, int64_t* value) { return_value_if_fail(rbuffer != NULL && rbuffer->data != NULL && value != NULL, RET_BAD_PARAMS); return_value_if_fail((rbuffer->cursor + sizeof(*value)) <= rbuffer->capacity, RET_BAD_PARAMS); diff --git a/project/gui/awtk/src/tkc/buffer.h b/project/gui/awtk/src/tkc/buffer.h index 480b3418b..eac8c7fcc 100644 --- a/project/gui/awtk/src/tkc/buffer.h +++ b/project/gui/awtk/src/tkc/buffer.h @@ -1,9 +1,9 @@ -/** +/** * File: buffer.h * Author: AWTK Develop Team * Brief: buffer * - * Copyright (c) 2018 - 2022 Guangzhou ZHIYUAN Electronics Co.,Ltd. + * Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -89,32 +89,55 @@ typedef struct _wbuffer_t { * 初始wbuffer对象。 * @annotation ["constructor"] * @param {wbuffer_t*} wbuffer wbuffer对象。 - * @param {uint8_t*} data 缓冲区。 - * @param {uint16_t} capacity 缓冲区的容量。 + * @param {void*} data 缓冲区。 + * @param {uint32_t} capacity 缓冲区的容量。 * * @return {wbuffer_t*} wbuffer对象本身。 */ -wbuffer_t* wbuffer_init(wbuffer_t* wbuffer, uint8_t* data, uint32_t capacity); +wbuffer_t* wbuffer_init(wbuffer_t* wbuffer, void* data, uint32_t capacity); /** - * @method wbuffer_rewind - * 重置当前写入位置。 + * @method wbuffer_init_extendable + * 初始化可自动扩展的wbuffer对象。使用完成后需要调用wbuffer\_deinit释放资源。 + * * @annotation ["constructor"] - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * + * @return {wbuffer_t*} wbuffer对象本身。 */ -ret_t wbuffer_rewind(wbuffer_t* wbuffer); +wbuffer_t* wbuffer_init_extendable(wbuffer_t* wbuffer); /** - * @method wbuffer_init_extendable - * 初始wbuffer对象,容量不够时是否支持自动扩展,使用完成后需要调用wbuffer\_deinit释放资源。 + * @method wbuffer_create + * 创建wbuffer对象。 + * @annotation ["constructor"] + * @param {void*} data 缓冲区。 + * @param {uint32_t} capacity 缓冲区的容量。 + * + * @return {wbuffer_t*} wbuffer对象本身。 + */ +wbuffer_t* wbuffer_create(void* data, uint32_t capacity); + +/** + * @method wbuffer_create_extendable + * 创建可自动扩展的wbuffer对象。 * * @annotation ["constructor"] - * @param {wbuffer_t*} wbuffer wbuffer对象。 * * @return {wbuffer_t*} wbuffer对象本身。 */ -wbuffer_t* wbuffer_init_extendable(wbuffer_t* wbuffer); +wbuffer_t* wbuffer_create_extendable(void); + +/** + * @method wbuffer_rewind + * 重置当前写入位置。 + * @annotation ["constructor"] + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t wbuffer_rewind(wbuffer_t* wbuffer); + /** * @method wbuffer_extend_capacity @@ -135,6 +158,15 @@ ret_t wbuffer_extend_capacity(wbuffer_t* wbuffer, uint32_t capacity); */ ret_t wbuffer_deinit(wbuffer_t* wbuffer); +/** + * @method wbuffer_destroy + * 销毁wbuffer对象。 + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t wbuffer_destroy(wbuffer_t* wbuffer); + /** * @method wbuffer_skip * 跳过指定的长度。 @@ -145,6 +177,46 @@ ret_t wbuffer_deinit(wbuffer_t* wbuffer); */ ret_t wbuffer_skip(wbuffer_t* wbuffer, int32_t delta); +/** + * @method wbuffer_write_int8 + * 写入int8数据。 + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * @param {int8_t} value 要写入的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t wbuffer_write_int8(wbuffer_t* wbuffer, int8_t value); + +/** + * @method wbuffer_write_int16 + * 写入int16数据。 + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * @param {int16_t} value 要写入的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t wbuffer_write_int16(wbuffer_t* wbuffer, int16_t value); + +/** + * @method wbuffer_write_int32 + * 写入int32数据。 + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * @param {int32_t} value 要写入的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t wbuffer_write_int32(wbuffer_t* wbuffer, int32_t value); + +/** + * @method wbuffer_write_int64 + * 写入int64数据。 + * @param {wbuffer_t*} wbuffer wbuffer对象。 + * @param {int64_t} value 要写入的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t wbuffer_write_int64(wbuffer_t* wbuffer, int64_t value); + /** * @method wbuffer_write_uint8 * 写入uint8数据。 @@ -175,16 +247,6 @@ ret_t wbuffer_write_uint16(wbuffer_t* wbuffer, uint16_t value); */ ret_t wbuffer_write_uint32(wbuffer_t* wbuffer, uint32_t value); -/** - * @method wbuffer_write_int32 - * 写入int32数据。 - * @param {wbuffer_t*} wbuffer wbuffer对象。 - * @param {int32_t} value 要写入的数据。 - * - * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 - */ -ret_t wbuffer_write_int32(wbuffer_t* wbuffer, int32_t value); - /** * @method wbuffer_write_uint64 * 写入uint64数据。 @@ -219,7 +281,7 @@ ret_t wbuffer_write_double(wbuffer_t* wbuffer, double value); * @method wbuffer_write_binary * 写入指定长度的二进制数据。 * @param {wbuffer_t*} wbuffer wbuffer对象。 - * @param {void*} data 要写入的数据。 + * @param {const void*} data 要写入的数据。 * @param {uint32_t} size 要写入的数据长度。 * * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 @@ -230,7 +292,7 @@ ret_t wbuffer_write_binary(wbuffer_t* wbuffer, const void* data, uint32_t size); * @method wbuffer_write_string * 写入字符串。 * @param {wbuffer_t*} wbuffer wbuffer对象。 - * @param {char*} data 要写入的字符串。 + * @param {const char*} data 要写入的字符串。 * * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 */ @@ -267,7 +329,7 @@ bool_t wbuffer_has_room(wbuffer_t* wbuffer, uint32_t size); */ typedef struct _rbuffer_t { /** - * @property {uint8_t*} data + * @property {const uint8_t*} data * @annotation ["readable"] * 数据缓冲区。 */ @@ -291,12 +353,23 @@ typedef struct _rbuffer_t { * 初始rbuffer对象。 * @annotation ["constructor"] * @param {rbuffer_t*} rbuffer rbuffer对象。 - * @param {uint8_t*} data 缓冲区。 - * @param {uint16_t} capacity 缓冲区的容量。 + * @param {const void*} data 缓冲区。 + * @param {uint32_t} capacity 缓冲区的容量。 + * + * @return {rbuffer_t*} rbuffer对象本身。 + */ +rbuffer_t* rbuffer_init(rbuffer_t* rbuffer, const void* data, uint32_t capacity); + +/** + * @method rbuffer_create + * 创建rbuffer对象。 + * @annotation ["constructor"] + * @param {const void*} data 缓冲区。 + * @param {uint32_t} capacity 缓冲区的容量。 * * @return {rbuffer_t*} rbuffer对象本身。 */ -rbuffer_t* rbuffer_init(rbuffer_t* rbuffer, const uint8_t* data, uint32_t capacity); +rbuffer_t* rbuffer_create(const void* data, uint32_t capacity); /** * @method rbuffer_has_more @@ -311,6 +384,7 @@ bool_t rbuffer_has_more(rbuffer_t* rbuffer); * @method rbuffer_rewind * 重置当前读取位置。 * @annotation ["constructor"] + * @param {rbuffer_t*} rbuffer rbuffer对象。 * * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 */ @@ -356,6 +430,36 @@ ret_t rbuffer_read_uint16(rbuffer_t* rbuffer, uint16_t* value); */ ret_t rbuffer_read_uint32(rbuffer_t* rbuffer, uint32_t* value); +/** + * @method rbuffer_read_uint64 + * 读取uint64数据。 + * @param {rbuffer_t*} rbuffer rbuffer对象。 + * @param {uint64_t*} value 返回读取的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t rbuffer_read_uint64(rbuffer_t* rbuffer, uint64_t* value); + +/** + * @method rbuffer_read_int8 + * 读取int8数据。 + * @param {rbuffer_t*} rbuffer rbuffer对象。 + * @param {int8_t*} value 返回读取的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t rbuffer_read_int8(rbuffer_t* rbuffer, int8_t* value); + +/** + * @method rbuffer_read_int16 + * 读取int16数据。 + * @param {rbuffer_t*} rbuffer rbuffer对象。 + * @param {int16_t*} value 读取的数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t rbuffer_read_int16(rbuffer_t* rbuffer, int16_t* value); + /** * @method rbuffer_read_int32 * 读取int32数据。 @@ -367,14 +471,14 @@ ret_t rbuffer_read_uint32(rbuffer_t* rbuffer, uint32_t* value); ret_t rbuffer_read_int32(rbuffer_t* rbuffer, int32_t* value); /** - * @method rbuffer_read_uint64 - * 读取uint64数据。 + * @method rbuffer_read_int64 + * 读取int64数据。 * @param {rbuffer_t*} rbuffer rbuffer对象。 - * @param {uint64_t*} value 返回读取的数据。 + * @param {int64_t*} value 返回读取的数据。 * * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 */ -ret_t rbuffer_read_uint64(rbuffer_t* rbuffer, uint64_t* value); +ret_t rbuffer_read_int64(rbuffer_t* rbuffer, int64_t* value); /** * @method rbuffer_read_float @@ -411,7 +515,7 @@ ret_t rbuffer_read_binary(rbuffer_t* rbuffer, void* data, uint32_t size); * @method rbuffer_read_string * 读取字符串。 * @param {rbuffer_t*} rbuffer rbuffer对象。 - * @param {char**} str 返回字符串。 + * @param {const char**} str 返回字符串。 * * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 */ @@ -447,6 +551,24 @@ ret_t rbuffer_peek_uint16(rbuffer_t* rbuffer, uint16_t* value); */ ret_t rbuffer_peek_uint32(rbuffer_t* rbuffer, uint32_t* value); +/** + * @method rbuffer_deinit + * 释放rbuffer资源。 + * @param {rbuffer_t*} rbuffer rbuffer对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t rbuffer_deinit(rbuffer_t* rbuffer); + +/** + * @method rbuffer_destroy + * 销毁rbuffer对象。 + * @param {rbuffer_t*} rbuffer rbuffer对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t rbuffer_destroy(rbuffer_t* rbuffer); + #define load_uint32(p, v) \ (v) = (p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24)); \ p += 4; diff --git a/project/gui/awtk/src/tkc/crc.c b/project/gui/awtk/src/tkc/crc.c index 0f36b9426..9293fc486 100644 --- a/project/gui/awtk/src/tkc/crc.c +++ b/project/gui/awtk/src/tkc/crc.c @@ -1,14 +1,18 @@ -/* +/* Copyright 2016 (C) Alexey Dynda + This file is part of Tiny Protocol Library. + Protocol Library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + Protocol Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + You should have received a copy of the GNU Lesser General Public License along with Protocol Library. If not, see . */ @@ -53,10 +57,12 @@ uint16_t tk_crc16_byte(uint16_t crc, uint8_t data) { return (crc >> 8) ^ fcstab_16[(crc ^ (data)) & 0xff]; } -uint16_t tk_crc16(uint16_t crc, const uint8_t* data, int data_length) { +uint16_t tk_crc16(uint16_t crc, const void* data, int data_length) { + const uint8_t* pdata = (const uint8_t*)data; + while (data_length) { - crc = (crc >> 8) ^ fcstab_16[(crc ^ (*data)) & 0xff]; - data++; + crc = (crc >> 8) ^ fcstab_16[(crc ^ (*pdata)) & 0xff]; + pdata++; data_length--; } @@ -105,13 +111,14 @@ static const uint8_t table_crc_lo[] = { 0x88, 0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C, 0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80, 0x40}; -uint16_t tk_crc16_modbus(const uint8_t* data, uint32_t len) { +uint16_t tk_crc16_modbus(const void* data, uint32_t len) { unsigned int i = 0; uint8_t crc_hi = 0xFF; uint8_t crc_lo = 0xFF; + const uint8_t* pdata = (const uint8_t*)data; while (len--) { - i = crc_lo ^ *data++; + i = crc_lo ^ *pdata++; crc_lo = crc_hi ^ table_crc_hi[i]; crc_hi = table_crc_lo[i]; } @@ -119,6 +126,7 @@ uint16_t tk_crc16_modbus(const uint8_t* data, uint32_t len) { return (crc_hi << 8 | crc_lo); } + #endif #ifdef CONFIG_ENABLE_CHECKSUM @@ -127,10 +135,12 @@ uint16_t tk_chksum_byte(uint16_t sum, uint8_t data) { return sum + data; } -uint16_t tk_chksum(uint16_t sum, const uint8_t* data, int data_length) { +uint16_t tk_chksum(uint16_t sum, const void* data, int data_length) { + const uint8_t* pdata = (const uint8_t*)data; + while (data_length) { - sum = sum + *data; - data++; + sum = sum + *pdata; + pdata++; data_length--; } @@ -218,10 +228,10 @@ static const uint32_t crc_tab32[] = { 0x54DE5729ul, 0x23D967BFul, 0xB3667A2Eul, 0xC4614AB8ul, 0x5D681B02ul, 0x2A6F2B94ul, 0xB40BBE37ul, 0xC30C8EA1ul, 0x5A05DF1Bul, 0x2D02EF8Dul}; -uint32_t tk_crc32(uint32_t init, const uint8_t* data, int size) { +uint32_t tk_crc32(uint32_t init, const void* data, int size) { size_t a = 0; uint32_t crc = init; - const unsigned char* ptr = data; + const uint8_t* ptr = (const uint8_t*)data; if (ptr != NULL) for (a = 0; a < size; a++) { @@ -243,7 +253,7 @@ uint32_t tk_crc32_byte(uint32_t crc, uint8_t data) { uint32_t tk_crc32_file(const char* filename, uint32_t block_size) { int32_t size = 0; fs_file_t* fp = NULL; - uint8_t* buff = NULL; + void* buff = NULL; uint32_t crc32 = PPPINITFCS32; return_value_if_fail(filename != NULL, crc32); @@ -270,4 +280,4 @@ uint32_t tk_crc32_file(const char* filename, uint32_t block_size) { return crc32; } -#endif \ No newline at end of file +#endif diff --git a/project/gui/awtk/src/tkc/crc.h b/project/gui/awtk/src/tkc/crc.h index 487f80531..de6b1c692 100644 --- a/project/gui/awtk/src/tkc/crc.h +++ b/project/gui/awtk/src/tkc/crc.h @@ -1,4 +1,4 @@ -/* +/* Copyright 2016-2019 (C) Alexey Dynda This file is part of Tiny Protocol Library. @@ -26,6 +26,7 @@ BEGIN_C_DECLS /** * @class crc_t + * @annotation ["fake"] * crc相关函数。 */ #define CONFIG_ENABLE_FCS16 @@ -41,12 +42,12 @@ BEGIN_C_DECLS * 计算检验和。 * @annotation ["static"] * @param {uint16_t} sum 初始值(一般用INITCHECKSUM) - * @param {const uint8_t*} data 数据。 + * @param {const void*} data 数据。 * @param {int} size 数据长度。 * * @return {uint16_t} 返回计算结果。 */ -uint16_t tk_chksum(uint16_t sum, const uint8_t* data, int size); +uint16_t tk_chksum(uint16_t sum, const void* data, int size); /** * @method tk_chksum_byte @@ -69,12 +70,12 @@ uint16_t tk_chksum_byte(uint16_t sum, uint8_t data); * 计算crc16。 * @annotation ["static"] * @param {uint16_t} crc 初始值(一般用PPPINITFCS16) - * @param {const uint8_t*} data 数据。 + * @param {const void*} data 数据。 * @param {int} size 数据长度。 * * @return {uint16_t} 返回计算结果。 */ -uint16_t tk_crc16(uint16_t crc, const uint8_t* data, int size); +uint16_t tk_crc16(uint16_t crc, const void* data, int size); /** * @method tk_crc16_byte @@ -91,13 +92,12 @@ uint16_t tk_crc16_byte(uint16_t crc, uint8_t data); * @method tk_crc16_modbus * 计算crc16(MODBUS)。 * @annotation ["static"] - * @param {uint16_t} crc 初始值(一般用PPPINITFCS16) - * @param {const uint8_t*} data 数据。 + * @param {const void*} data 数据。 * @param {int} size 数据长度。 * * @return {uint16_t} 返回计算结果。 */ -uint16_t tk_crc16_modbus(const uint8_t* data, uint32_t len); +uint16_t tk_crc16_modbus(const void* data, uint32_t len); #endif @@ -109,12 +109,12 @@ uint16_t tk_crc16_modbus(const uint8_t* data, uint32_t len); * 计算crc32。 * @annotation ["static"] * @param {uint32_t} crc 初始值(一般用PPPINITFCS32) - * @param {const uint8_t*} data 数据。 + * @param {const void*} data 数据。 * @param {int} size 数据长度。 * * @return {uint32_t} 返回计算结果。 */ -uint32_t tk_crc32(uint32_t crc, const uint8_t* data, int size); +uint32_t tk_crc32(uint32_t crc, const void* data, int size); /** * @method tk_crc32_byte diff --git a/project/gui/awtk/src/tkc/iostream.c b/project/gui/awtk/src/tkc/iostream.c index d5b194241..3a120bcc0 100644 --- a/project/gui/awtk/src/tkc/iostream.c +++ b/project/gui/awtk/src/tkc/iostream.c @@ -1,4 +1,4 @@ -/** +/** * File: tk_iostream.h * Author: AWTK Develop Team * Brief: input/ouput stream interface @@ -58,3 +58,8 @@ int32_t tk_iostream_write_len(tk_iostream_t* stream, const void* buff, uint32_t return tk_ostream_write_len(os, buff, max_size, timeout_ms); } + +ret_t tk_iostream_unref(tk_iostream_t* stream) { + return tk_object_unref(TK_OBJECT(stream)); +} + diff --git a/project/gui/awtk/src/tkc/iostream.h b/project/gui/awtk/src/tkc/iostream.h index b01a0de3b..6161f0407 100644 --- a/project/gui/awtk/src/tkc/iostream.h +++ b/project/gui/awtk/src/tkc/iostream.h @@ -1,4 +1,4 @@ -/** +/** * File: tk_iostream.h * Author: AWTK Develop Team * Brief: input/ouput stream interface @@ -51,7 +51,7 @@ struct _tk_iostream_t { /** * @method tk_iostream_get_istream * - * 获取输入流对象。 + * 获取输入流对象(不再使用时,无需UNREF返回的对象)。 * * @param {tk_iostream_t*} stream iostream对象。 * @@ -63,7 +63,7 @@ tk_istream_t* tk_iostream_get_istream(tk_iostream_t* stream); /** * @method tk_iostream_get_ostream * - * 获取输出流对象。 + * 获取输出流对象(不再使用时,无需UNREF返回的对象)。 * * @param {tk_iostream_t*} stream iostream对象。 * @@ -132,6 +132,16 @@ int32_t tk_iostream_write(tk_iostream_t* stream, const void* buff, uint32_t max_ int32_t tk_iostream_write_len(tk_iostream_t* stream, const void* buff, uint32_t max_size, uint32_t timeout_ms); +/** + * @method tk_iostream_unref + * + * 引用计数减1。引用计数为0时,销毁对象。 + * @param {tk_iostream_t*} stream iostream对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t tk_iostream_unref(tk_iostream_t* stream); + #define TK_IOSTREAM(obj) ((tk_iostream_t*)(obj)) END_C_DECLS diff --git a/project/gui/awtk/src/tkc/istream.c b/project/gui/awtk/src/tkc/istream.c index abce83434..5183956f5 100644 --- a/project/gui/awtk/src/tkc/istream.c +++ b/project/gui/awtk/src/tkc/istream.c @@ -1,4 +1,4 @@ -/** +/** * File: tk_istream.h * Author: AWTK Develop Team * Brief: input stream interface @@ -248,3 +248,67 @@ ret_t tk_istream_read_line_str(tk_istream_t* stream, str_t* str) { return RET_OK; } + +ret_t tk_istream_read_uint8(tk_istream_t* stream, uint8_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_uint16(tk_istream_t* stream, uint16_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_uint32(tk_istream_t* stream, uint32_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_uint64(tk_istream_t* stream, uint64_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_int8(tk_istream_t* stream, int8_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_int16(tk_istream_t* stream, int16_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_int32(tk_istream_t* stream, int32_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_int64(tk_istream_t* stream, int64_t* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_float(tk_istream_t* stream, float* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_read_double(tk_istream_t* stream, double* value) { + int32_t ret = tk_istream_read_len(stream, value, sizeof(*value), TK_ISTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(*value) ? RET_OK : RET_FAIL; +} + +ret_t tk_istream_unref(tk_istream_t* stream) { + return tk_object_unref(TK_OBJECT(stream)); +} diff --git a/project/gui/awtk/src/tkc/istream.h b/project/gui/awtk/src/tkc/istream.h index f9fa1e1ea..51482f08a 100644 --- a/project/gui/awtk/src/tkc/istream.h +++ b/project/gui/awtk/src/tkc/istream.h @@ -1,4 +1,4 @@ -/** +/** * File: tk_istream.h * Author: AWTK Develop Team * Brief: input stream interface @@ -132,6 +132,137 @@ ret_t tk_istream_wait_for_data(tk_istream_t* stream, uint32_t timeout_ms); */ ret_t tk_istream_flush(tk_istream_t* stream); +/** + * @method tk_istream_read_uint8 + * + * 写入uint8数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {uint8_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_uint8(tk_istream_t* stream, uint8_t* value); + +/** + * @method tk_istream_read_uint16 + * + * 写入uint16数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {uint16_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_uint16(tk_istream_t* stream, uint16_t* value); + +/** + * @method tk_istream_read_uint32 + * + * 写入uint32数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {uint32_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_uint32(tk_istream_t* stream, uint32_t* value); + +/** + * @method tk_istream_read_uint64 + * + * 写入uint64数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {uint64_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_uint64(tk_istream_t* stream, uint64_t* value); + +/** + * @method tk_istream_read_int8 + * + * 写入int8数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {int8_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_int8(tk_istream_t* stream, int8_t* value); + +/** + * @method tk_istream_read_int16 + * + * 写入int16数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {int16_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_int16(tk_istream_t* stream, int16_t* value); + +/** + * @method tk_istream_read_int32 + * + * 写入int32数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {int32_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_int32(tk_istream_t* stream, int32_t* value); + +/** + * @method tk_istream_read_int64 + * + * 写入int64数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {int64_t*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_int64(tk_istream_t* stream, int64_t* value); + +/** + * @method tk_istream_read_float + * + * 写入float数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {float*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_float(tk_istream_t* stream, float* value); + +/** + * @method tk_istream_read_double + * + * 写入double数据。 + * + * @param {tk_istream_t*} stream istream对象。 + * @param {double*} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_istream_read_double(tk_istream_t* stream, double* value); + + /** * @method tk_istream_read_len * @@ -178,6 +309,16 @@ int32_t tk_istream_read_line(tk_istream_t* stream, void* buff, uint32_t max_size */ ret_t tk_istream_read_line_str(tk_istream_t* stream, str_t* str); +/** + * @method tk_istream_unref + * + * 引用计数减1。引用计数为0时,销毁对象。 + * @param {tk_istream_t*} stream istream对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t tk_istream_unref(tk_istream_t* stream); + #define TK_ISTREAM(obj) ((tk_istream_t*)(obj)) #define TK_ISTREAM_SEEKABLE(obj) (TK_ISTREAM(obj)->seek != NULL) #define TK_ISTREAM_TELLABLE(obj) (TK_ISTREAM(obj)->tell != NULL) diff --git a/project/gui/awtk/src/tkc/ostream.c b/project/gui/awtk/src/tkc/ostream.c index 134a042d8..a1827bb4f 100644 --- a/project/gui/awtk/src/tkc/ostream.c +++ b/project/gui/awtk/src/tkc/ostream.c @@ -94,8 +94,70 @@ ret_t tk_ostream_flush(tk_ostream_t* stream) { return RET_OK; } -ret_t tk_ostream_write_byte(tk_ostream_t* stream, uint8_t byte) { - return tk_ostream_write_len(stream, &byte, 1, 1000) == 1 ? RET_OK : RET_FAIL; +ret_t tk_ostream_write_byte(tk_ostream_t* stream, uint8_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_uint8(tk_ostream_t* stream, uint8_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_uint16(tk_ostream_t* stream, uint16_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_uint32(tk_ostream_t* stream, uint32_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_uint64(tk_ostream_t* stream, uint64_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_int8(tk_ostream_t* stream, int8_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_int16(tk_ostream_t* stream, int16_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_int32(tk_ostream_t* stream, int32_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_int64(tk_ostream_t* stream, int64_t value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_float(tk_ostream_t* stream, float value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; +} + +ret_t tk_ostream_write_double(tk_ostream_t* stream, double value) { + int32_t ret = tk_ostream_write_len(stream, &value, sizeof(value), TK_OSTREAM_DEFAULT_TIMEOUT); + + return ret == sizeof(value) ? RET_OK : RET_FAIL; } int32_t tk_ostream_tell(tk_ostream_t* stream) { @@ -121,3 +183,7 @@ ret_t tk_ostream_printf(tk_ostream_t* stream, const char* format, ...) { return tk_ostream_write_str(stream, buff); } +ret_t tk_ostream_unref(tk_ostream_t* stream) { + return tk_object_unref(TK_OBJECT(stream)); +} + diff --git a/project/gui/awtk/src/tkc/ostream.h b/project/gui/awtk/src/tkc/ostream.h index 90cc49f71..e880f0ec7 100644 --- a/project/gui/awtk/src/tkc/ostream.h +++ b/project/gui/awtk/src/tkc/ostream.h @@ -112,12 +112,142 @@ int32_t tk_ostream_write_len(tk_ostream_t* stream, const void* buff, uint32_t ma * 写入一个字节的数据。 * * @param {tk_ostream_t*} stream ostream对象。 - * @param {uint8_t} byte 数据。 + * @param {uint8_t} value 数据。 * * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 * */ -ret_t tk_ostream_write_byte(tk_ostream_t* stream, uint8_t byte); +ret_t tk_ostream_write_byte(tk_ostream_t* stream, uint8_t value); + +/** + * @method tk_ostream_write_uint8 + * + * 写入uint8数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {uint8_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_uint8(tk_ostream_t* stream, uint8_t value); + +/** + * @method tk_ostream_write_uint16 + * + * 写入uint16数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {uint16_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_uint16(tk_ostream_t* stream, uint16_t value); + +/** + * @method tk_ostream_write_uint32 + * + * 写入uint32数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {uint32_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_uint32(tk_ostream_t* stream, uint32_t value); + +/** + * @method tk_ostream_write_uint64 + * + * 写入uint64数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {uint64_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_uint64(tk_ostream_t* stream, uint64_t value); + +/** + * @method tk_ostream_write_int8 + * + * 写入int8数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {int8_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_int8(tk_ostream_t* stream, int8_t value); + +/** + * @method tk_ostream_write_int16 + * + * 写入int16数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {int16_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_int16(tk_ostream_t* stream, int16_t value); + +/** + * @method tk_ostream_write_int32 + * + * 写入int32数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {int32_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_int32(tk_ostream_t* stream, int32_t value); + +/** + * @method tk_ostream_write_int64 + * + * 写入int64数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {int64_t} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_int64(tk_ostream_t* stream, int64_t value); + +/** + * @method tk_ostream_write_float + * + * 写入float数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {float} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_float(tk_ostream_t* stream, float value); + +/** + * @method tk_ostream_write_double + * + * 写入double数据。 + * + * @param {tk_ostream_t*} stream ostream对象。 + * @param {double} value 数据。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + * + */ +ret_t tk_ostream_write_double(tk_ostream_t* stream, double value); /** * @method tk_ostream_flush @@ -159,6 +289,16 @@ ret_t tk_ostream_printf(tk_ostream_t* stream, const char* format, ...); #define TK_OSTREAM_SEEKABLE(obj) (TK_OSTREAM(obj)->seek != NULL) #define TK_OSTREAM_TELLABLE(obj) (TK_OSTREAM(obj)->tell != NULL) +/** + * @method tk_ostream_unref + * + * 引用计数减1。引用计数为0时,销毁对象。 + * @param {tk_ostream_t*} stream ostream对象。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t tk_ostream_unref(tk_ostream_t* stream); + END_C_DECLS #endif /*TK_OSTREAM_H*/ diff --git a/project/gui/awtk/src/tkc/socket_helper.c b/project/gui/awtk/src/tkc/socket_helper.c index 414a8bcba..8dc623d2e 100644 --- a/project/gui/awtk/src/tkc/socket_helper.c +++ b/project/gui/awtk/src/tkc/socket_helper.c @@ -251,7 +251,7 @@ ret_t tk_socket_wait_for_data(int sock, uint32_t timeout_ms) { FD_SET(sock, &fdsr); ret = select(sock + 1, &fdsr, NULL, NULL, &tv); - return ret > 0 ? RET_OK : RET_TIMEOUT; + return ret > 0 && FD_ISSET(sock, &fdsr) ? RET_OK : RET_TIMEOUT; } bool_t tk_socket_last_io_has_error(void) { diff --git a/project/gui/awtk/src/tkc/str.c b/project/gui/awtk/src/tkc/str.c index 6e1550f16..2851c2898 100644 --- a/project/gui/awtk/src/tkc/str.c +++ b/project/gui/awtk/src/tkc/str.c @@ -147,6 +147,34 @@ ret_t str_append(str_t* str, const char* text) { return str_append_with_len(str, text, strlen(text)); } +ret_t str_append_uppercase(str_t* str, const char* text) { + ret_t ret = RET_OK; + const char* p = text; + return_value_if_fail(str != NULL && text != NULL, RET_BAD_PARAMS); + + while (*p) { + ret = str_append_char(str, toupper(*p)); + break_if_fail(ret == RET_OK); + p++; + } + + return ret; +} + +ret_t str_append_lowercase(str_t* str, const char* text) { + ret_t ret = RET_OK; + const char* p = text; + return_value_if_fail(str != NULL && text != NULL, RET_BAD_PARAMS); + + while (*p) { + ret = str_append_char(str, tolower(*p)); + break_if_fail(ret == RET_OK); + p++; + } + + return ret; +} + ret_t str_append_more(str_t* str, const char* text, ...) { va_list va; const char* p = NULL; @@ -1007,7 +1035,7 @@ ret_t str_decode_hex(str_t* str, void* data, uint32_t size) { char* p = NULL; char v[3] = {0, 0, 0}; uint8_t* d = data; - uint8_t* dend = data + size; + uint8_t* dend = d + size; return_value_if_fail(str != NULL && data != NULL, RET_BAD_PARAMS); for (p = str->str; p < str->str + str->size && d < dend; p += 2) { diff --git a/project/gui/awtk/src/tkc/str.h b/project/gui/awtk/src/tkc/str.h index e283c1811..e2dedfb58 100644 --- a/project/gui/awtk/src/tkc/str.h +++ b/project/gui/awtk/src/tkc/str.h @@ -214,6 +214,26 @@ ret_t str_set_with_len(str_t* str, const char* text, uint32_t len); */ ret_t str_append(str_t* str, const char* text); +/** + * @method str_append_uppercase + * 将text转换为大写,并追加到str中。 + * @param {str_t*} str str对象。 + * @param {const char*} text 要追加的字符串。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t str_append_uppercase(str_t* str, const char* text); + +/** + * @method str_append_lowercase + * 将text转换为大写,并追加到str中。 + * @param {str_t*} str str对象。 + * @param {const char*} text 要追加的字符串。 + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t str_append_lowercase(str_t* str, const char* text); + /** * @method str_append_more * 追加多个字符串。以NULL结束。 @@ -786,7 +806,6 @@ ret_t str_append_format(str_t* str, uint32_t size, const char* format, ...); str = NULL; \ } - END_C_DECLS #endif /*TK_STR_H*/ diff --git a/project/gui/awtk/src/tkc/stream_const.h b/project/gui/awtk/src/tkc/stream_const.h index ad63761bf..8a6016f01 100644 --- a/project/gui/awtk/src/tkc/stream_const.h +++ b/project/gui/awtk/src/tkc/stream_const.h @@ -1,4 +1,4 @@ -/** +/** * File: tk_iostream.h * Author: AWTK Develop Team * Brief: input/ouput stream interface @@ -34,6 +34,8 @@ BEGIN_C_DECLS #define TK_STREAM_CMD_IFLUSH "iflush" #define TK_STREAM_CMD_OFLUSH "oflush" +#define TK_ISTREAM_DEFAULT_TIMEOUT 3000 +#define TK_OSTREAM_DEFAULT_TIMEOUT 1000 END_C_DECLS diff --git a/project/gui/awtk/src/tkc/types_def.h b/project/gui/awtk/src/tkc/types_def.h index 499482fae..372af9816 100644 --- a/project/gui/awtk/src/tkc/types_def.h +++ b/project/gui/awtk/src/tkc/types_def.h @@ -34,6 +34,12 @@ #define WITH_SOCKET 1 #endif /*WIN32 || MACOS || LINUX || IOS || ANDROID*/ +#ifndef TK_IS_PC +#if defined(WITH_SDL) && !defined(ANDROID) && !defined(IOS) +#define TK_IS_PC 1 +#endif +#endif /*TK_IS_PC*/ + #include #include #include diff --git a/project/gui/awtk/src/tkc/utils.c b/project/gui/awtk/src/tkc/utils.c index 6038c362c..83bd11600 100644 --- a/project/gui/awtk/src/tkc/utils.c +++ b/project/gui/awtk/src/tkc/utils.c @@ -34,18 +34,6 @@ #include "tkc/data_reader_factory.h" #include "tkc/data_writer_factory.h" -#ifndef HAS_STDIO -#define HAS_STDIO 1 -#endif - -#ifndef LINUX -#define LINUX 1 -#endif - -#ifndef HAS_FAST_MEMCPY -#define HAS_FAST_MEMCPY 1 -#endif - #ifndef WITH_DATA_READER_WRITER #define WITH_DATA_READER_WRITER 1 #endif @@ -1997,6 +1985,20 @@ int tk_sscanf_simple(const char* str, const char* format, ...) { } #ifdef HAS_NO_VSSCANF +int sscanf(const char* str, const char* format, ...) { + int ret = 0; + va_list va; + va_start(va, format); + ret = tk_vsscanf_simple(str, format, va); + va_end(va); + + return ret; +} + +int vsscanf(const char* str, const char* format, va_list args) { + return tk_vsscanf_simple(str, format, args); +} + int tk_sscanf(const char* str, const char* format, ...) { int ret = 0; va_list va; diff --git a/project/gui/awtk/src/widgets/image.c b/project/gui/awtk/src/widgets/image.c index 42cc407fe..34e7fb999 100644 --- a/project/gui/awtk/src/widgets/image.c +++ b/project/gui/awtk/src/widgets/image.c @@ -1,9 +1,9 @@ -/** +/** * File: image.h * Author: AWTK Develop Team * Brief: image * - * Copyright (c) 2018 - 2022 Guangzhou ZHIYUAN Electronics Co.,Ltd. + * Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,8 +39,10 @@ static ret_t image_on_paint_self(widget_t* widget, canvas_t* c) { } do { - if (image_base->image != NULL && - widget_load_image(widget, image_base->image, &bitmap) == RET_OK) { + break_if_fail(image_base->image != NULL); + if (widget_load_image(widget, image_base->image, &bitmap) == RET_OK) { + const char* region = strrchr(image_base->image, '#'); + if (vg != NULL) { if (image_need_transform(widget)) { if (image->draw_type == IMAGE_DRAW_ICON || image->draw_type == IMAGE_DRAW_CENTER) { @@ -62,7 +64,11 @@ static ret_t image_on_paint_self(widget_t* widget, canvas_t* c) { } dst = rect_init(0, 0, widget->w, widget->h); - canvas_draw_image_ex(c, &bitmap, image->draw_type, &dst); + if (region == NULL) { + canvas_draw_image_ex(c, &bitmap, image->draw_type, &dst); + } else { + widget_draw_image_with_region(widget, c, &bitmap, region, &dst, image->draw_type); + } } } while (FALSE); diff --git a/project/gui/awtk/src/widgets/label.c b/project/gui/awtk/src/widgets/label.c index 71b925527..55d137541 100644 --- a/project/gui/awtk/src/widgets/label.c +++ b/project/gui/awtk/src/widgets/label.c @@ -1,4 +1,4 @@ -/** +/** * File: label.h * Author: AWTK Develop Team * Brief: label @@ -32,10 +32,11 @@ static ret_t label_paint_text_mlines(widget_t* widget, canvas_t* c, line_parser_ int32_t bottom = y + h; style_t* style = widget->astyle; int32_t font_size = c->font_size; - int32_t line_height = font_size + style_get_int(style, STYLE_ID_SPACER, 2); + int32_t spacer = style_get_int(style, STYLE_ID_SPACER, 2); align_v_t align_v = (align_v_t)style_get_int(style, STYLE_ID_TEXT_ALIGN_V, ALIGN_V_MIDDLE); align_h_t align_h = (align_h_t)style_get_int(style, STYLE_ID_TEXT_ALIGN_H, ALIGN_H_CENTER); - int32_t h_text = p->total_lines * line_height; + int32_t line_height = font_size + spacer; + int32_t h_text = p->total_lines * line_height - spacer; switch (align_v) { case ALIGN_V_MIDDLE: { @@ -374,4 +375,4 @@ widget_t* label_cast(widget_t* widget) { return_value_if_fail(WIDGET_IS_INSTANCE_OF(widget, label), NULL); return widget; -} \ No newline at end of file +} diff --git a/project/gui/awtk/src/window_manager/window_manager_default.c b/project/gui/awtk/src/window_manager/window_manager_default.c index 915c819d5..b560ab207 100644 --- a/project/gui/awtk/src/window_manager/window_manager_default.c +++ b/project/gui/awtk/src/window_manager/window_manager_default.c @@ -3,7 +3,7 @@ * Author: AWTK Develop Team * Brief: default window manager * - * Copyright (c) 2018 - 2022 Guangzhou ZHIYUAN Electronics Co.,Ltd. + * Copyright (c) 2018 - 2023 Guangzhou ZHIYUAN Electronics Co.,Ltd. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,14 +36,6 @@ #include "base/dialog_highlighter_factory.h" #include "window_manager/window_manager_default.h" -#ifndef WITH_FAST_LCD_PORTRAIT -#define WITH_FAST_LCD_PORTRAIT -#endif - -#ifndef ENABLE_CURSOR -#define ENABLE_CURSOR 1 -#endif - static ret_t window_manager_animate_done(widget_t* widget); static ret_t window_manager_default_update_fps(widget_t* widget); static ret_t window_manager_invalidate_system_bar(widget_t* widget); @@ -381,7 +373,7 @@ ret_t window_manager_default_snap_prev_window(widget_t* widget, widget_t* prev_w slist_foreach(&system_bar_top_rect_list, window_manager_default_snap_prev_window_system_bar_top_push_clip_rect, dialog_highlighter); slist_foreach(&system_bar_bottom_rect_list, window_manager_default_snap_prev_window_system_bar_bottom_push_clip_rect, dialog_highlighter); } - if (curr_highlight != NULL && *curr_highlight != '\0') { + if (curr_highlight != NULL) { dialog_highlighter_set_system_bar_alpha(dialog_highlighter, 0xFF - alpha); dialog_highlighter_set_win(dialog_highlighter, prev_win); /* 把没有遮罩的 system_bar 绘制到离线画布上 */ @@ -442,7 +434,7 @@ static ret_t window_manager_default_create_dialog_highlighter(widget_t* widget, } if (dialog_highlighter == NULL && widget_is_support_highlighter(curr_win) && - curr_highlight != NULL) { + curr_highlight != NULL && *curr_highlight != '\0') { dialog_highlighter_factory_t* f = dialog_highlighter_factory(); dialog_highlighter = dialog_highlighter_factory_create_highlighter(f, curr_highlight, curr_win); @@ -1521,6 +1513,13 @@ static ret_t window_manager_default_layout_child(widget_t* widget, widget_t* win } } +static ret_t window_manager_default_set_fullscreen(widget_t* widget, bool_t fullscreen) { + window_manager_default_t* wm = WINDOW_MANAGER_DEFAULT(widget); + return_value_if_fail(wm != NULL, RET_BAD_PARAMS); + + return native_window_set_fullscreen(wm->native_window, fullscreen); +} + static ret_t window_manager_default_resize(widget_t* widget, wh_t w, wh_t h) { ret_t ret = RET_OK; rect_t r = rect_init(0, 0, w, h); @@ -1776,7 +1775,8 @@ static window_manager_vtable_t s_window_manager_self_vtable = { .snap_curr_window = window_manager_default_snap_curr_window, .snap_prev_window = window_manager_default_snap_prev_window, .get_dialog_highlighter = window_manager_default_get_dialog_highlighter, - .resize = window_manager_default_resize}; + .resize = window_manager_default_resize, + .set_fullscreen = window_manager_default_set_fullscreen}; static const widget_vtable_t s_window_manager_vtable = { .size = sizeof(window_manager_t), @@ -1802,4 +1802,4 @@ widget_t* window_manager_create(void) { locale_info_on(locale_info(), EVT_LOCALE_CHANGED, window_manager_default_on_locale_changed, wm); return window_manager_init(WINDOW_MANAGER(wm), &s_window_manager_vtable, &s_window_manager_self_vtable); -} \ No newline at end of file +} diff --git a/project/gui/azure/guix/accordion/gx_accordion_menu_event_process.c b/project/gui/azure/guix/accordion/gx_accordion_menu_event_process.c index 5a1a60607..8545ecd1d 100644 --- a/project/gui/azure/guix/accordion/gx_accordion_menu_event_process.c +++ b/project/gui/azure/guix/accordion/gx_accordion_menu_event_process.c @@ -238,7 +238,7 @@ GX_WIDGET *child; /* FUNCTION RELEASE */ /* */ /* _gx_accordion_menu_close_animation_update PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -276,6 +276,9 @@ GX_WIDGET *child; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added NULL pointer check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_accordion_menu_close_animation_update(GX_ACCORDION_MENU *accordion) @@ -287,6 +290,11 @@ GX_VALUE shift; GX_RECTANGLE size; GX_WIDGET *child; + if (!deselected) + { + return GX_SUCCESS; + } + child = deselected -> gx_menu_list.gx_widget_first_child; /* Calcualte total height of list children. */ @@ -334,7 +342,7 @@ GX_WIDGET *child; /* FUNCTION RELEASE */ /* */ /* _gx_accordion_menu_open_animation_update PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -370,6 +378,9 @@ GX_WIDGET *child; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added NULL pointer check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_accordion_menu_open_animation_update(GX_ACCORDION_MENU *accordion) @@ -381,6 +392,11 @@ GX_VALUE list_children_height = 0; GX_VALUE height = 0; GX_WIDGET *child; + if (!selected) + { + return GX_SUCCESS; + } + child = selected -> gx_menu_list.gx_widget_first_child; /* Calcualte total height of list children. */ diff --git a/project/gui/azure/guix/animation/gxe_animation_start.c b/project/gui/azure/guix/animation/gxe_animation_start.c index ef517ccd1..aeffe6358 100644 --- a/project/gui/azure/guix/animation/gxe_animation_start.c +++ b/project/gui/azure/guix/animation/gxe_animation_start.c @@ -30,13 +30,15 @@ #include "gx_canvas.h" #include "gx_animation.h" +/* Bring in externs for caller checking code. */ +GX_CALLER_CHECKING_EXTERNS /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gxe_animation_start PORTABLE C */ -/* 6.1.7 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -74,10 +76,15 @@ /* 06-02-2021 Ting Zhu Modified comment(s), */ /* removed unnecessary check, */ /* resulting in version 6.1.7 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added caller check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gxe_animation_start(GX_ANIMATION *animation, GX_ANIMATION_INFO *info) { + /* Check for appropriate caller. */ + GX_INIT_AND_THREADS_CALLER_CHECKING if (animation == GX_NULL || info == GX_NULL) diff --git a/project/gui/azure/guix/binres/Makefile b/project/gui/azure/guix/binres/Makefile index 85f66f8cb..14ebf5b10 100644 --- a/project/gui/azure/guix/binres/Makefile +++ b/project/gui/azure/guix/binres/Makefile @@ -2,7 +2,11 @@ obj-y += gx_binres_language_count_get.o obj-y += gx_binres_language_info_load.o obj-y += gx_binres_language_table_load.o obj-y += gx_binres_theme_load.o +obj-y += gx_binres_font_load.o +obj-y += gx_binres_pixelmap_load.o obj-y += gxe_binres_language_count_get.o obj-y += gxe_binres_language_info_load.o obj-y += gxe_binres_language_table_load.o obj-y += gxe_binres_theme_load.o +obj-y += gxe_binres_font_load.o +obj-y += gxe_binres_pixelmap_load.o diff --git a/project/gui/azure/guix/binres/gx_binres_font_load.c b/project/gui/azure/guix/binres/gx_binres_font_load.c new file mode 100644 index 000000000..01ad72c41 --- /dev/null +++ b/project/gui/azure/guix/binres/gx_binres_font_load.c @@ -0,0 +1,140 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) Microsoft Corporation. All rights reserved. */ +/* */ +/* This software is licensed under the Microsoft Software License */ +/* Terms for Microsoft Azure RTOS. Full text of the license can be */ +/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ +/* and in the root directory of this software. */ +/* */ +/**************************************************************************/ + + +/**************************************************************************/ +/**************************************************************************/ +/** */ +/** GUIX Component */ +/** */ +/** Binres Loader Management (Binres Loader) */ +/** */ +/**************************************************************************/ + +#define GX_SOURCE_CODE + + +/* Include necessary system files. */ + +#include "gx_api.h" +#include "gx_binres_loader.h" +#include "gx_utility.h" + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_binres_font_load PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This service loads a font from a resource data memory. */ +/* */ +/* INPUT */ +/* */ +/* root_address Pointer to the binary data */ +/* memory */ +/* font_index Resource index of the font */ +/* to be loaded */ +/* buffer Pointer to the buffer to */ +/* store the loaded font */ +/* buffer_size Size of the buffer. It will */ +/* be overwritten with the */ +/* required buffer size if the */ +/* input buffer size is */ +/* insufficient */ +/* */ +/* OUTPUT */ +/* */ +/* Status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _gx_binres_standalone_resource_seek Locate the resource data */ +/* _gx_binres_font_buffer_size_get Get the required font buffer */ +/* size */ +/* _gx_binres_one_font_load Load one font */ +/* */ +/* CALLED BY */ +/* */ +/* Application Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size) +{ +UINT status = GX_SUCCESS; +GX_BINRES_DATA_INFO info; +UINT required_size; + + /* file format + +--------+ + | | <-- represents one bytes + +--------+ + + |+========+ + | | <-- represents a variable number of bytes + |+========+ + + |+--------+--------+--------+--------+ + | magic number | resource count | + |+--------+--------+--------+--------+ + |+--------+--------+--------+--------+ + | resource offset | + |+--------+--------+--------+--------+ + |+--------+--------+--------+--------+ + | ... | + |+--------+--------+--------+--------+ + |+===================================+ + | resource data | + |+===================================+ + */ + + memset(&info, 0, sizeof(GX_BINRES_DATA_INFO)); + + info.gx_binres_root_address = (GX_UBYTE *)root_address; + info.gx_binres_buffer = (GX_UBYTE *)buffer; + info.gx_binres_buffer_size = *buffer_size; + + status = _gx_binres_standalone_resource_seek(&info, font_index); + + if (status != GX_SUCCESS) + { + return status; + } + + status = _gx_binres_font_buffer_size_get(&info, &required_size, GX_TRUE); + + if (status != GX_SUCCESS) + { + return status; + } + + if (required_size > *buffer_size) + { + *buffer_size = required_size; + return GX_INVALID_MEMORY_SIZE; + } + + status = _gx_binres_one_font_load(&info, GX_NULL); + + return status; +} + diff --git a/project/gui/azure/guix/binres/gx_binres_pixelmap_load.c b/project/gui/azure/guix/binres/gx_binres_pixelmap_load.c new file mode 100644 index 000000000..fab2e968e --- /dev/null +++ b/project/gui/azure/guix/binres/gx_binres_pixelmap_load.c @@ -0,0 +1,188 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) Microsoft Corporation. All rights reserved. */ +/* */ +/* This software is licensed under the Microsoft Software License */ +/* Terms for Microsoft Azure RTOS. Full text of the license can be */ +/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ +/* and in the root directory of this software. */ +/* */ +/**************************************************************************/ + + +/**************************************************************************/ +/**************************************************************************/ +/** */ +/** GUIX Component */ +/** */ +/** Binres Loader Management (Binres Loader) */ +/** */ +/**************************************************************************/ + +#define GX_SOURCE_CODE + + +/* Include necessary system files. */ + +#include "gx_api.h" +#include "gx_binres_loader.h" +#include "gx_utility.h" + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_binres_standalone_resource_seek PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function locates the resource data in the binary data memory. */ +/* */ +/* INPUT */ +/* */ +/* info Binary resource control block */ +/* res_index The index of the resource to */ +/* be located */ +/* */ +/* OUTPUT */ +/* */ +/* Status Completion status */ +/* */ +/* CALLS */ +/* */ +/* None */ +/* */ +/* CALLED BY */ +/* */ +/* GUIX Internal Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +UINT _gx_binres_standalone_resource_seek(GX_BINRES_DATA_INFO *info, UINT res_index) +{ +USHORT type; +ULONG count; + + GX_BINRES_READ_USHORT(type, info -> gx_binres_root_address + info -> gx_binres_read_offset); + info -> gx_binres_read_offset += sizeof(USHORT); + + if (type != GX_RESOURCE_TYPE_BINRES_STANDALONE) + { + return GX_INVALID_FORMAT; + } + + /* Skip 2 bytes version. */ + info -> gx_binres_read_offset += sizeof(USHORT); + + GX_BINRES_READ_ULONG(count, info -> gx_binres_root_address + info -> gx_binres_read_offset); + info -> gx_binres_read_offset += sizeof(ULONG); + + if ((USHORT)res_index >= count) + { + return GX_NOT_FOUND; + } + + if (count > 1) + { + GX_BINRES_READ_ULONG(info -> gx_binres_read_offset, info -> gx_binres_root_address + info -> gx_binres_read_offset + sizeof(ULONG) * res_index); + } + + return GX_SUCCESS; +} + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_binres_pixelmap_load PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This service loads a pixelmap from a resource data memory. */ +/* */ +/* INPUT */ +/* */ +/* root_address Pointer to the binary data */ +/* memory */ +/* map_index Resource index of the pixelmap*/ +/* to be loaded */ +/* pixelmap Pointer to the returned */ +/* pixelmap */ +/* */ +/* OUTPUT */ +/* */ +/* Status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _gx_binres_standalone_resource_seek Locate the resource data */ +/* _gx_binres_one_pixelmap_load Load one pixelmap */ +/* */ +/* CALLED BY */ +/* */ +/* Application Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap) +{ +UINT status = GX_SUCCESS; +GX_BINRES_DATA_INFO info; + + /* file format + +--------+ + | | <-- represents one bytes + +--------+ + + |+========+ + | | <-- represents a variable number of bytes + |+========+ + + |+--------+--------+--------+--------+ + | magic number | resource count | + |+--------+--------+--------+--------+ + |+--------+--------+--------+--------+ + | resource offset | + |+--------+--------+--------+--------+ + |+--------+--------+--------+--------+ + | ... | + |+--------+--------+--------+--------+ + |+===================================+ + | resource data | + |+===================================+ + */ + + memset(&info, 0, sizeof(GX_BINRES_DATA_INFO)); + + info.gx_binres_root_address = (GX_UBYTE *)root_address; + info.gx_binres_buffer = (GX_UBYTE *)pixelmap; + info.gx_binres_buffer_size = sizeof(GX_PIXELMAP); + + status = _gx_binres_standalone_resource_seek(&info, map_index); + + if (status == GX_SUCCESS) + { + status = _gx_binres_one_pixelmap_load(&info, GX_NULL, GX_NULL); + } + + return status; +} + diff --git a/project/gui/azure/guix/binres/gx_binres_theme_load.c b/project/gui/azure/guix/binres/gx_binres_theme_load.c index 7ff377253..6e5bbe207 100644 --- a/project/gui/azure/guix/binres/gx_binres_theme_load.c +++ b/project/gui/azure/guix/binres/gx_binres_theme_load.c @@ -29,9 +29,9 @@ #include "gx_system.h" #include "gx_utility.h" -// extern GX_CONST GX_FONT _gx_system_font_mono; -// extern GX_CONST GX_FONT _gx_system_font_4bpp; -// extern GX_CONST GX_FONT _gx_system_font_8bpp; +extern GX_CONST GX_FONT _gx_system_font_mono; +extern GX_CONST GX_FONT _gx_system_font_4bpp; +extern GX_CONST GX_FONT _gx_system_font_8bpp; /**************************************************************************/ /* */ @@ -312,7 +312,7 @@ static UINT _gx_binres_palette_header_load(GX_BINRES_DATA_INFO *info, GX_PALETTE /* FUNCTION RELEASE */ /* */ /* _gx_binres_font_header_load PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -346,14 +346,22 @@ static UINT _gx_binres_palette_header_load(GX_BINRES_DATA_INFO *info, GX_PALETTE /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* removed use of memcpy, */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* made the function public, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #ifdef GX_BINARY_RESOURCE_SUPPORT -static UINT _gx_binres_font_header_load(GX_BINRES_DATA_INFO *info, GX_FONT_HEADER *header) +UINT _gx_binres_font_header_load(GX_BINRES_DATA_INFO *info, GX_FONT_HEADER *header) { GX_BINRES_READ_USHORT(header -> gx_font_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); + if(header -> gx_font_header_magic_number != GX_MAGIC_NUMBER) + { + return GX_INVALID_FORMAT; + } + GX_BINRES_READ_USHORT(header -> gx_font_header_index, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); @@ -425,6 +433,11 @@ ULONG read_data = 0; GX_BINRES_READ_USHORT(header -> gx_page_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); + if(header -> gx_page_header_magic_number != GX_MAGIC_NUMBER) + { + return GX_INVALID_FORMAT; + } + GX_BINRES_READ_USHORT(header -> gx_page_header_index, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); @@ -515,7 +528,7 @@ static UINT _gx_binres_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_GLYPH_HEA GX_BINRES_READ_ULONG(header -> gx_glyph_header_map_offset, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(ULONG); - GX_BINRES_READ_USHORT(header -> gx_glyph_header_index, info -> gx_binres_root_address + info -> gx_binres_read_offset); + GX_BINRES_READ_USHORT(header -> gx_glyph_header_index, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); GX_BINRES_READ_SHORT(header -> gx_glyph_header_ascent, info -> gx_binres_root_address + info -> gx_binres_read_offset); @@ -604,7 +617,7 @@ static UINT _gx_binres_kerning_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_K /* FUNCTION RELEASE */ /* */ /* _gx_binres_pixelmap_header_load PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -638,6 +651,9 @@ static UINT _gx_binres_kerning_glyph_header_load(GX_BINRES_DATA_INFO *info, GX_K /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* removed use of memcpy, */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added magic number check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #ifdef GX_BINARY_RESOURCE_SUPPORT @@ -646,6 +662,11 @@ static UINT _gx_binres_pixelmap_header_load(GX_BINRES_DATA_INFO *info, GX_PIXELM GX_BINRES_READ_USHORT(header -> gx_pixelmap_header_magic_number, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); + if (header -> gx_pixelmap_header_magic_number != GX_MAGIC_NUMBER) + { + return GX_INVALID_FORMAT; + } + GX_BINRES_READ_USHORT(header -> gx_pixelmap_header_index, info -> gx_binres_root_address + info -> gx_binres_read_offset); info -> gx_binres_read_offset += sizeof(USHORT); @@ -686,12 +707,156 @@ static UINT _gx_binres_pixelmap_header_load(GX_BINRES_DATA_INFO *info, GX_PIXELM } #endif +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_binres_font_buffer_size_get PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function calculates the required buffer size needed for */ +/* loading the font from the current position. */ +/* */ +/* INPUT */ +/* */ +/* info Binary resource control block */ +/* buffer_size The required buffer size */ +/* */ +/* OUTPUT */ +/* */ +/* Status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _gx_binres_font_header_load Read font header */ +/* _gx_binres_page_header_load Read font page header */ +/* */ +/* CALLED BY */ +/* */ +/* GUIX Internal Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +#ifdef GX_BINARY_RESOURCE_SUPPORT +UINT _gx_binres_font_buffer_size_get(GX_BINRES_DATA_INFO *info, UINT *buffer_size, GX_BOOL reset_read_offset) +{ +UINT status; +GX_FONT_HEADER font_header; +GX_PAGE_HEADER page_header; +USHORT page_index; +UINT glyph_count; +UINT read_offset = 0; +UINT temp; +UINT size = 0; +UINT old_offset; + + if(reset_read_offset) + { + old_offset = info -> gx_binres_read_offset; + } + + status = _gx_binres_font_header_load(info, &font_header); + + if (status != GX_SUCCESS) + { + return status; + } + + if (font_header.gx_font_header_data_offset) + { + /* The font data is not follow the header directly, + the data offset gives the position where the font + data located. */ + + /* Record current data offset. */ + read_offset = info -> gx_binres_read_offset; + + /* Temporarily reset data offset of access font data. */ + info -> gx_binres_read_offset = font_header.gx_font_header_data_offset; + + /* Load font header. */ + _gx_binres_font_header_load(info, &font_header); + } + + for (page_index = 0; page_index < font_header.gx_font_header_page_count; page_index++) + { + /* Load page header. */ + status = _gx_binres_page_header_load(info, &page_header); + + if(status != GX_SUCCESS) + { + return status; + } + + info -> gx_binres_read_offset += page_header.gx_page_header_data_size; + +#if defined(GX_EXTENDED_UNICODE_SUPPORT) + if (page_header.gx_page_header_last_glyph > GX_MAX_GLYPH_CODE) + { + return GX_INVALID_FONT; + } +#endif + + /* Max glyph code is 0x10f000, overflow cannot occur. */ + glyph_count = (UINT)(page_header.gx_page_header_last_glyph - page_header.gx_page_header_first_glyph + 1); + + /* Calculate size for loading font page. */ + temp = sizeof(GX_FONT); + + /* Calculate size for loading glyphs. */ + if (page_header.gx_page_header_format & GX_FONT_FORMAT_COMPRESSED) + { + temp += sizeof(GX_COMPRESSED_GLYPH) * glyph_count; + } +#if defined(GX_FONT_KERNING_SUPPORT) + else if (page_header.gx_page_header_format & GX_FONT_FORMAT_KERNING) + { + temp += sizeof(GX_KERNING_GLYPH) * glyph_count; + } +#endif + else + { + temp += sizeof(GX_GLYPH) * glyph_count; + } + + GX_UTILITY_MATH_UINT_ADD(size, temp, size); + } + + if (read_offset) + { + /* Restore data offset. */ + info -> gx_binres_read_offset = read_offset; + read_offset = 0; + } + + *buffer_size = size; + + if (reset_read_offset) + { + /* Reset offset. */ + info -> gx_binres_read_offset = old_offset; + } + + return GX_SUCCESS; +} +#endif + /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_binres_theme_table_buffer_allocate PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -715,8 +880,7 @@ static UINT _gx_binres_pixelmap_header_load(GX_BINRES_DATA_INFO *info, GX_PIXELM /* allocation function */ /* _gx_binres_resource_header_load Read resource header */ /* _gx_binres_theme_header_load Read theme header */ -/* _gx_binres_font_header_load Read font header */ -/* _gx_binres_page_header_load Read font page header */ +/* _gx_binres_font_buffer_size_get Get required font buffer size */ /* */ /* CALLED BY */ /* */ @@ -729,20 +893,19 @@ static UINT _gx_binres_pixelmap_header_load(GX_BINRES_DATA_INFO *info, GX_PIXELM /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* improved logic, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #ifdef GX_BINARY_RESOURCE_SUPPORT static UINT _gx_binres_theme_buffer_allocate(GX_BINRES_DATA_INFO *info, INT theme_id) { +UINT status = GX_SUCCESS; GX_RESOURCE_HEADER res_header; GX_THEME_HEADER theme_header; -GX_FONT_HEADER font_header; -GX_PAGE_HEADER page_header; USHORT theme_index; USHORT font_index; -USHORT page_index; -UINT glyph_count; -UINT read_offset = 0; UINT temp; /* Read resource header. */ @@ -790,77 +953,14 @@ UINT temp; for (font_index = 0; font_index < theme_header.gx_theme_header_font_count; font_index++) { - _gx_binres_font_header_load(info, &font_header); - - if (font_header.gx_font_header_magic_number != GX_MAGIC_NUMBER) - { - return GX_INVALID_FORMAT; - } - - if (font_header.gx_font_header_data_offset) - { - /* The font data is not follow the header directly, - the data offset gives the position where the font - data located. */ - - /* Record current data offset. */ - read_offset = info -> gx_binres_read_offset; + status = _gx_binres_font_buffer_size_get(info, &temp, GX_FALSE); - /* Temporarily reset data offset of access font data. */ - info -> gx_binres_read_offset = font_header.gx_font_header_data_offset; - - /* Load font header. */ - _gx_binres_font_header_load(info, &font_header); - } - - for (page_index = 0; page_index < font_header.gx_font_header_page_count; page_index++) + if (status != GX_SUCCESS) { - /* Load page header. */ - _gx_binres_page_header_load(info, &page_header); - info -> gx_binres_read_offset += page_header.gx_page_header_data_size; - - if (page_header.gx_page_header_magic_number != GX_MAGIC_NUMBER) - { - return GX_INVALID_FORMAT; - } -#if defined(GX_EXTENDED_UNICODE_SUPPORT) - if (page_header.gx_page_header_last_glyph > GX_MAX_GLYPH_CODE) - { - return GX_INVALID_FONT; - } -#endif - - /* Max glyph code is 0x10f000, overflow cannot occur. */ - glyph_count = (UINT)(page_header.gx_page_header_last_glyph - page_header.gx_page_header_first_glyph + 1); - - /* Calculate size for loading font page. */ - temp = sizeof(GX_FONT); - - /* Calculate size for loading glyphs. */ - if (page_header.gx_page_header_format & GX_FONT_FORMAT_COMPRESSED) - { - temp += sizeof(GX_COMPRESSED_GLYPH) * glyph_count; - } -#if defined(GX_FONT_KERNING_SUPPORT) - else if (page_header.gx_page_header_format & GX_FONT_FORMAT_KERNING) - { - temp += sizeof(GX_KERNING_GLYPH) * glyph_count; - } -#endif - else - { - temp += sizeof(GX_GLYPH) * glyph_count; - } - - GX_UTILITY_MATH_UINT_ADD(info -> gx_binres_buffer_size, temp, info -> gx_binres_buffer_size); + return status; } - if (read_offset) - { - /* Restore data offset. */ - info -> gx_binres_read_offset = read_offset; - read_offset = 0; - } + GX_UTILITY_MATH_UINT_ADD(info -> gx_binres_buffer_size, temp, info -> gx_binres_buffer_size); } } @@ -894,7 +994,10 @@ UINT temp; memset(info -> gx_binres_buffer, 0, info -> gx_binres_buffer_size); info -> gx_binres_buffer_index = 0; - return GX_SUCCESS; + /* Reset read offset. */ + info -> gx_binres_read_offset = 0; + + return status; } #endif @@ -1182,21 +1285,19 @@ USHORT index = 0; /* */ /* FUNCTION RELEASE */ /* */ -/* _gx_binres_font_load PORTABLE C */ -/* 6.1 */ +/* _gx_binres_one_font_load PORTABLE C */ +/* 6.3.0 */ /* AUTHOR */ /* */ -/* Kenneth Maxwell, Microsoft Corporation */ +/* Ting Zhu, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ -/* This service loads a font table from a binary data buffer. */ +/* This service loads a font from a binary data buffer. */ /* */ /* INPUT */ /* */ /* info Binary resource control block */ -/* page_count The number of pages that a */ -/* font contains. */ /* return_font Returned font */ /* */ /* OUTPUT */ @@ -1205,6 +1306,7 @@ USHORT index = 0; /* */ /* CALLS */ /* */ +/* _gx_binres_font_header_load Read font header */ /* _gx_binres_page_header_load Read font page header */ /* _gx_binres_compressed_glyphs_read Read compressed glyph data */ /* _gx_binres_glyphs_read Read glyph data */ @@ -1217,77 +1319,136 @@ USHORT index = 0; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ -/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ -/* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ #ifdef GX_BINARY_RESOURCE_SUPPORT -static UINT _gx_binres_font_load(GX_BINRES_DATA_INFO *info, USHORT page_count, GX_FONT **return_font) +UINT _gx_binres_one_font_load(GX_BINRES_DATA_INFO *info, GX_FONT **return_font) { UINT status = GX_SUCCESS; +GX_FONT_HEADER font_header; GX_PAGE_HEADER header; GX_FONT *font; GX_FONT *head_page = GX_NULL; GX_FONT *pre_page = GX_NULL; USHORT index; USHORT glyph_count; +UINT read_offset = 0; - for (index = 0; index < page_count; index++) - { - /* Read page header. */ - _gx_binres_page_header_load(info, &header); + /* Read font header. */ + status = _gx_binres_font_header_load(info, &font_header); - font = (GX_FONT *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index); - info -> gx_binres_buffer_index += sizeof(GX_FONT); + if (status != GX_SUCCESS) + { + return status; + } - font -> gx_font_baseline = header.gx_page_header_baseline; - font -> gx_font_first_glyph = header.gx_page_header_first_glyph; - font -> gx_font_format = header.gx_page_header_format; - font -> gx_font_last_glyph = header.gx_page_header_last_glyph; - font -> gx_font_line_height = header.gx_page_header_line_height; - font -> gx_font_postspace = header.gx_page_header_postspace; - font -> gx_font_prespace = header.gx_page_header_prespace; + if (font_header.gx_font_header_deault) + { + switch (font_header.gx_font_header_bits) + { + case 1: + head_page = (GX_FONT *)&_gx_system_font_mono; + break; - /* Read glyphs data. */ - glyph_count = (USHORT)(font -> gx_font_last_glyph - font -> gx_font_first_glyph + 1); + case 4: + head_page = (GX_FONT *)&_gx_system_font_4bpp; + break; - if (font -> gx_font_format & GX_FONT_FORMAT_COMPRESSED) - { - status = _gx_binres_compressed_glyphs_address_get(info, glyph_count, &font -> gx_font_glyphs.gx_font_compressed_glyphs); - } -#if defined(GX_FONT_KERNING_SUPPORT) - else if (font -> gx_font_format & GX_FONT_FORMAT_KERNING) - { - status = _gx_binres_kerning_glyphs_address_get(info, glyph_count, &font -> gx_font_glyphs.gx_font_kerning_glyphs); + case 8: + head_page = (GX_FONT *)&_gx_system_font_8bpp; + break; } -#endif /* GX_FONT_KERNING_SUPPORT */ - else + } + else + { + if (font_header.gx_font_header_data_offset) { - status = _gx_binres_glyphs_address_get(info, glyph_count, &font -> gx_font_glyphs.gx_font_normal_glyphs); - } + /* The font data is not follow the header directly, + the data offset gives the position where the font + data located. */ - if (status != GX_SUCCESS) - { - break; - } + /* Record current data offset. */ + read_offset = info -> gx_binres_read_offset; - font -> gx_font_next_page = NULL; + /* Temporarily reset data offset to access font data. */ + info -> gx_binres_read_offset = font_header.gx_font_header_data_offset; - if (!head_page) - { - head_page = font; + /* Read font header. */ + _gx_binres_font_header_load(info, &font_header); } - if (pre_page) + for (index = 0; index < font_header.gx_font_header_page_count; index++) { - pre_page -> gx_font_next_page = font; + /* Read page header. */ + status = _gx_binres_page_header_load(info, &header); + + if (status != GX_SUCCESS) + { + return status; + } + + font = (GX_FONT *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index); + info -> gx_binres_buffer_index += sizeof(GX_FONT); + + font -> gx_font_baseline = header.gx_page_header_baseline; + font -> gx_font_first_glyph = header.gx_page_header_first_glyph; + font -> gx_font_format = header.gx_page_header_format; + font -> gx_font_last_glyph = header.gx_page_header_last_glyph; + font -> gx_font_line_height = header.gx_page_header_line_height; + font -> gx_font_postspace = header.gx_page_header_postspace; + font -> gx_font_prespace = header.gx_page_header_prespace; + + /* Read glyphs data. */ + glyph_count = (USHORT)(font -> gx_font_last_glyph - font -> gx_font_first_glyph + 1); + + if (font -> gx_font_format & GX_FONT_FORMAT_COMPRESSED) + { + status = _gx_binres_compressed_glyphs_address_get(info, glyph_count, &font -> gx_font_glyphs.gx_font_compressed_glyphs); + } +#if defined(GX_FONT_KERNING_SUPPORT) + else if (font -> gx_font_format & GX_FONT_FORMAT_KERNING) + { + status = _gx_binres_kerning_glyphs_address_get(info, glyph_count, &font -> gx_font_glyphs.gx_font_kerning_glyphs); + } +#endif /* GX_FONT_KERNING_SUPPORT */ + else + { + status = _gx_binres_glyphs_address_get(info, glyph_count, &font -> gx_font_glyphs.gx_font_normal_glyphs); + } + + if (status != GX_SUCCESS) + { + break; + } + + font -> gx_font_next_page = NULL; + + if (!head_page) + { + head_page = font; + } + + if (pre_page) + { + pre_page -> gx_font_next_page = font; + } + + pre_page = font; } + } - pre_page = font; + if (read_offset) + { + /* Restore data offset. */ + info -> gx_binres_read_offset = read_offset; + read_offset = 0; } - *return_font = head_page; + if (return_font) + { + *return_font = head_page; + } return status; } @@ -1435,7 +1596,7 @@ GX_COLOR *palette_table = GX_NULL; /* FUNCTION RELEASE */ /* */ /* _gx_binres_font_table_load PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -1456,8 +1617,7 @@ GX_COLOR *palette_table = GX_NULL; /* */ /* CALLS */ /* */ -/* _gx_binres_font_header_load Read font header */ -/* _gx_binres_font_read Read font data */ +/* _gx_binres_one_font_load Load one font */ /* */ /* CALLED BY */ /* */ @@ -1470,78 +1630,28 @@ GX_COLOR *palette_table = GX_NULL; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* improved logic, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #ifdef GX_BINARY_RESOURCE_SUPPORT static UINT _gx_binres_font_table_load(GX_BINRES_DATA_INFO *info, USHORT table_size, GX_FONT ***returned_font_table) { -UINT status = GX_SUCCESS; -GX_FONT_HEADER header; -GX_FONT **font_table = GX_NULL; -USHORT index; -UINT read_offset = 0; - - if (!table_size) - { - return status; - } +UINT status = GX_SUCCESS; +GX_FONT **font_table = GX_NULL; +USHORT index; font_table = (GX_FONT **)(info -> gx_binres_buffer + info -> gx_binres_buffer_index); info -> gx_binres_buffer_index += sizeof(GX_FONT *) * table_size; for (index = 0; index < table_size; index++) { - /* Read font header. */ - _gx_binres_font_header_load(info, &header); - - if (header.gx_font_header_deault) - { - switch (header.gx_font_header_bits) - { - case 1: - font_table[index] = (GX_FONT *)&_gx_system_font_mono; - break; + status = _gx_binres_one_font_load(info, &font_table[index]); - case 4: - font_table[index] = (GX_FONT *)&_gx_system_font_4bpp; - break; - - case 8: - font_table[index] = (GX_FONT *)&_gx_system_font_8bpp; - break; - } - } - else + if (status != GX_SUCCESS) { - if (header.gx_font_header_data_offset) - { - /* The font data is not follow the header directly, - the data offset gives the position where the font - data located. */ - - /* Record current data offset. */ - read_offset = info -> gx_binres_read_offset; - - /* Temporarily reset data offset to access font data. */ - info -> gx_binres_read_offset = header.gx_font_header_data_offset; - - /* Read font header. */ - _gx_binres_font_header_load(info, &header); - } - - status = _gx_binres_font_load(info, header.gx_font_header_page_count, &font_table[index]); - - if (status != GX_SUCCESS) - { - break; - } - - if (read_offset) - { - /* Restore data offset. */ - info -> gx_binres_read_offset = read_offset; - read_offset = 0; - } + return status; } } @@ -1555,21 +1665,21 @@ UINT read_offset = 0; /* */ /* FUNCTION RELEASE */ /* */ -/* _gx_binres_pixelmap_table_load PORTABLE C */ -/* 6.1 */ +/* _gx_binres_one_pixelmap_load PORTABLE C */ +/* 6.3.0 */ /* AUTHOR */ /* */ -/* Kenneth Maxwell, Microsoft Corporation */ +/* Ting Zhu, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ -/* This function loads a pixelmap table from resource data memory. */ +/* This function loads one pixelmap from resource data memory. */ /* */ /* INPUT */ /* */ /* info Binary resource control block */ -/* table_size Pixelmap table size */ -/* returned_pixelmp_table Returned pixelmap table */ +/* returned_pixelmap Returned pixelmap table */ +/* map_id Loaded pixelmap ID */ /* */ /* OUTPUT */ /* */ @@ -1587,119 +1697,165 @@ UINT read_offset = 0; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ -/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ -/* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ #ifdef GX_BINARY_RESOURCE_SUPPORT -static UINT _gx_binres_pixelmap_table_load(GX_BINRES_DATA_INFO *info, USHORT table_size, GX_PIXELMAP ***returned_pixelmap_table) +UINT _gx_binres_one_pixelmap_load(GX_BINRES_DATA_INFO *info, GX_PIXELMAP **returned_pixelmap, USHORT *map_id) { UINT status = GX_SUCCESS; GX_PIXELMAP_HEADER header; -GX_PIXELMAP **pixelmap_table = GX_NULL; -USHORT index; ULONG size; -GX_BOOL keep_looping; UINT read_offset = 0; - if (table_size <= 1) +GX_PIXELMAP *pixelmap; + + /* Read pixelmap header. */ + status = _gx_binres_pixelmap_header_load(info, &header); + + if (status) { - return GX_SUCCESS; + return status; } - pixelmap_table = (GX_PIXELMAP **)(info -> gx_binres_buffer + info -> gx_binres_buffer_index); - info -> gx_binres_buffer_index += sizeof(GX_PIXELMAP *) * table_size; - - for (index = 1; index < table_size; index++) + if (header.gx_pixelmap_header_data_offset) { - /* Read pixelmap header. */ + /* The pixelmap data is not follow the header directly, + the data offset gives the position where the pixelmap + data located. */ + + /* Record current data offset. */ + read_offset = info -> gx_binres_read_offset; + + /* Temporarily reset data offset to access pixelmap data. */ + info -> gx_binres_read_offset = header.gx_pixelmap_header_data_offset; + + /* Read pixelmap header. */ _gx_binres_pixelmap_header_load(info, &header); + } - if (header.gx_pixelmap_header_magic_number != GX_MAGIC_NUMBER) - { - return GX_INVALID_FORMAT; - } + /* Allocate memory for pixelmap. */ + pixelmap = (GX_PIXELMAP *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index); + info -> gx_binres_buffer_index += sizeof(GX_PIXELMAP); + + pixelmap -> gx_pixelmap_aux_data_size = header.gx_pixelmap_header_aux_data_size; + pixelmap -> gx_pixelmap_data_size = header.gx_pixelmap_header_map_size; + pixelmap -> gx_pixelmap_flags = header.gx_pixelmap_header_flags; + pixelmap -> gx_pixelmap_format = header.gx_pixelmap_header_format; + pixelmap -> gx_pixelmap_width = (GX_VALUE)header.gx_pixelmap_header_width; + pixelmap -> gx_pixelmap_height = (GX_VALUE)header.gx_pixelmap_header_height; + pixelmap -> gx_pixelmap_transparent_color = header.gx_pixelmap_header_transparent_color; + pixelmap -> gx_pixelmap_version_major = header.gx_pixelmap_header_version_major; + pixelmap -> gx_pixelmap_version_minor = header.gx_pixelmap_header_version_minor; + + /* Skip padding bytes. */ + info -> gx_binres_read_offset = (info -> gx_binres_read_offset + 3) & (~0x03UL); + + /* Read pixelmap data. */ + size = pixelmap -> gx_pixelmap_data_size; + if (size) + { + pixelmap -> gx_pixelmap_data = (GX_UBYTE *)(info -> gx_binres_root_address + info -> gx_binres_read_offset); + info -> gx_binres_read_offset += size; + } - if (header.gx_pixelmap_header_data_offset) - { - /* The pixelmap data is not follow the header directly, - the data offset gives the position where the pixelmap - data located. */ + /* Read pixelmap aux data. */ + size = pixelmap -> gx_pixelmap_aux_data_size; + if (size) + { + pixelmap -> gx_pixelmap_aux_data = (GX_UBYTE *)(info -> gx_binres_root_address + info -> gx_binres_read_offset); + info -> gx_binres_read_offset += size; + } - /* Record current data offset. */ - read_offset = info -> gx_binres_read_offset; + if (read_offset) + { + /* Restore data offset. */ + info -> gx_binres_read_offset = read_offset; + read_offset = 0; + } - /* Temporarily reset data offset to access pixelmap data. */ - info -> gx_binres_read_offset = header.gx_pixelmap_header_data_offset; + if (returned_pixelmap) + { + *returned_pixelmap = pixelmap; + } - /* Read pixelmap header. */ - _gx_binres_pixelmap_header_load(info, &header); - } + if (map_id) + { + *map_id = header.gx_pixelmap_header_index; + } - keep_looping = GX_TRUE; + return status; +} - while (keep_looping) - { - keep_looping = GX_FALSE; - /* Allocate memory for pixelmap. */ - pixelmap_table[index] = (GX_PIXELMAP *)(info -> gx_binres_buffer + info -> gx_binres_buffer_index); - info -> gx_binres_buffer_index += sizeof(GX_PIXELMAP); +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_binres_pixelmap_table_load PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Kenneth Maxwell, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function loads a pixelmap table from resource data memory. */ +/* */ +/* INPUT */ +/* */ +/* info Binary resource control block */ +/* table_size Pixelmap table size */ +/* returned_pixelmp_table Returned pixelmap table */ +/* */ +/* OUTPUT */ +/* */ +/* Status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _gx_binres_one_pixelmap_load Load one pixelmap */ +/* */ +/* CALLED BY */ +/* */ +/* GUIX Internal Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ +/* 09-30-2020 Kenneth Maxwell Modified comment(s), */ +/* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* improved logic, */ +/* resulting in version 6.3.0 */ +/* */ +/**************************************************************************/ +static UINT _gx_binres_pixelmap_table_load(GX_BINRES_DATA_INFO *info, USHORT table_size, GX_PIXELMAP **pixelmap_table) +{ +UINT status = GX_SUCCESS; +USHORT index; +USHORT map_id; +GX_PIXELMAP *pixelmap; - switch (index) - { - case GX_PIXELMAP_RADIO_ON_ID: - case GX_PIXELMAP_RADIO_OFF_ID: - case GX_PIXELMAP_CHECKBOX_ON_ID: - case GX_PIXELMAP_CHECKBOX_OFF_ID: - if (index != header.gx_pixelmap_header_index) - { - pixelmap_table[index++] = GX_NULL; - keep_looping = GX_TRUE; - } - } - } + for (index = 1; index < table_size; index++) + { + status = _gx_binres_one_pixelmap_load(info, &pixelmap, &map_id); - pixelmap_table[index] -> gx_pixelmap_aux_data_size = header.gx_pixelmap_header_aux_data_size; - pixelmap_table[index] -> gx_pixelmap_data_size = header.gx_pixelmap_header_map_size; - pixelmap_table[index] -> gx_pixelmap_flags = header.gx_pixelmap_header_flags; - pixelmap_table[index] -> gx_pixelmap_format = header.gx_pixelmap_header_format; - pixelmap_table[index] -> gx_pixelmap_width = (GX_VALUE)header.gx_pixelmap_header_width; - pixelmap_table[index] -> gx_pixelmap_height = (GX_VALUE)header.gx_pixelmap_header_height; - pixelmap_table[index] -> gx_pixelmap_transparent_color = header.gx_pixelmap_header_transparent_color; - pixelmap_table[index] -> gx_pixelmap_version_major = header.gx_pixelmap_header_version_major; - pixelmap_table[index] -> gx_pixelmap_version_minor = header.gx_pixelmap_header_version_minor; - - /* Skip padding bytes. */ - info -> gx_binres_read_offset = (info -> gx_binres_read_offset + 3) & (~0x03UL); - - /* Read pixelmap data. */ - size = pixelmap_table[index] -> gx_pixelmap_data_size; - if (size) + while (index < map_id) { - pixelmap_table[index] -> gx_pixelmap_data = (GX_UBYTE *)(info -> gx_binres_root_address + info -> gx_binres_read_offset); - info -> gx_binres_read_offset += size; + pixelmap_table[index++] = GX_NULL; } - /* Read pixelmap aux data. */ - size = pixelmap_table[index] -> gx_pixelmap_aux_data_size; - if (size) - { - pixelmap_table[index] -> gx_pixelmap_aux_data = (GX_UBYTE *)(info -> gx_binres_root_address + info -> gx_binres_read_offset); - info -> gx_binres_read_offset += size; - } + pixelmap_table[index] = pixelmap; - if (read_offset) + if (status) { - /* Restore data offset. */ - info -> gx_binres_read_offset = read_offset; - read_offset = 0; + return status; } } - *returned_pixelmap_table = pixelmap_table; - return status; } #endif @@ -1776,7 +1932,6 @@ INT index; if (status == GX_SUCCESS) { - info.gx_binres_read_offset = 0; status = _gx_binres_resource_header_load(&info, &header); } @@ -1817,7 +1972,7 @@ INT index; } /* Read font table. */ - if ((status == GX_SUCCESS) && theme_header.gx_theme_header_font_data_size) + if ((status == GX_SUCCESS) && theme_header.gx_theme_header_font_data_size && theme_header.gx_theme_header_font_count) { status = _gx_binres_font_table_load(&info, theme_header.gx_theme_header_font_count, @@ -1825,11 +1980,16 @@ INT index; } /* Read pixelmap table. */ - if ((status == GX_SUCCESS) && theme_header.gx_theme_header_pixelmap_data_size) + if ((status == GX_SUCCESS) && theme_header.gx_theme_header_pixelmap_data_size && theme_header.gx_theme_header_pixelmap_count) { + /* Allocate pixelmap table size. */ + theme -> theme_pixelmap_table = (GX_PIXELMAP **)(info.gx_binres_buffer + info.gx_binres_buffer_index); + info.gx_binres_buffer_index += sizeof(GX_PIXELMAP *) * (UINT)(theme_header.gx_theme_header_pixelmap_count + 1); + + /* Load pixelmap table. */ status = _gx_binres_pixelmap_table_load(&info, - (USHORT)(theme_header.gx_theme_header_pixelmap_count + 1), - &theme -> theme_pixelmap_table); + theme -> theme_pixelmap_table_size, + theme -> theme_pixelmap_table); } if (status == GX_SUCCESS) diff --git a/project/gui/azure/guix/binres/gxe_binres_font_load.c b/project/gui/azure/guix/binres/gxe_binres_font_load.c new file mode 100644 index 000000000..3dbbf6817 --- /dev/null +++ b/project/gui/azure/guix/binres/gxe_binres_font_load.c @@ -0,0 +1,89 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) Microsoft Corporation. All rights reserved. */ +/* */ +/* This software is licensed under the Microsoft Software License */ +/* Terms for Microsoft Azure RTOS. Full text of the license can be */ +/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ +/* and in the root directory of this software. */ +/* */ +/**************************************************************************/ + + +/**************************************************************************/ +/**************************************************************************/ +/** */ +/** GUIX Component */ +/** */ +/** Binres Loader Management (Binres Loader) */ +/** */ +/**************************************************************************/ + +#define GX_SOURCE_CODE + + +/* Include necessary system files. */ + +#include "gx_api.h" +#include "gx_binres_loader.h" +#include "gx_system.h" + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gxe_binres_font_load PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function checks for errors in binres font load function. */ +/* */ +/* INPUT */ +/* */ +/* root_address Pointer to the binary data */ +/* memory */ +/* font_index Resource index of the font */ +/* to be loaded */ +/* buffer Pointer to the buffer to */ +/* store the loaded font */ +/* buffer_size Size of the buffer. It will */ +/* be overwritten with the */ +/* required buffer size if the */ +/* input buffer size is */ +/* insufficient */ +/* */ +/* OUTPUT */ +/* */ +/* status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _gx_binres_font_load The actual binres font load */ +/* function */ +/* */ +/* CALLED BY */ +/* */ +/* Application Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size) +{ + if (root_address == GX_NULL || buffer == GX_NULL || buffer_size == GX_NULL) + { + return GX_PTR_ERROR; + } + + return _gx_binres_font_load(root_address, font_index, buffer, buffer_size); +} + diff --git a/project/gui/azure/guix/binres/gxe_binres_pixelmap_load.c b/project/gui/azure/guix/binres/gxe_binres_pixelmap_load.c new file mode 100644 index 000000000..b62a28f9b --- /dev/null +++ b/project/gui/azure/guix/binres/gxe_binres_pixelmap_load.c @@ -0,0 +1,84 @@ +/**************************************************************************/ +/* */ +/* Copyright (c) Microsoft Corporation. All rights reserved. */ +/* */ +/* This software is licensed under the Microsoft Software License */ +/* Terms for Microsoft Azure RTOS. Full text of the license can be */ +/* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ +/* and in the root directory of this software. */ +/* */ +/**************************************************************************/ + + +/**************************************************************************/ +/**************************************************************************/ +/** */ +/** GUIX Component */ +/** */ +/** Binres Loader Management (Binres Loader) */ +/** */ +/**************************************************************************/ + +#define GX_SOURCE_CODE + + +/* Include necessary system files. */ + +#include "gx_api.h" +#include "gx_binres_loader.h" +#include "gx_system.h" + + +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gxe_binres_pixelmap_load PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function checks for errors in binres pixelmap load function. */ +/* */ +/* INPUT */ +/* */ +/* root_address Pointer to the binary data */ +/* memory */ +/* map_index Resource index of the pixelmap*/ +/* to be loaded */ +/* pixelmap Pointer to the returned */ +/* pixelmap */ +/* */ +/* OUTPUT */ +/* */ +/* status Completion status */ +/* */ +/* CALLS */ +/* */ +/* _gx_binres_pixelmap_load The actual binres pixelmap */ +/* load function */ +/* */ +/* CALLED BY */ +/* */ +/* Application Code */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap) +{ + if (root_address == GX_NULL || pixelmap == GX_NULL) + { + return GX_PTR_ERROR; + } + + return _gx_binres_pixelmap_load(root_address, map_index, pixelmap); +} + diff --git a/project/gui/azure/guix/canvas/gx_canvas_block_move.c b/project/gui/azure/guix/canvas/gx_canvas_block_move.c index db4b95b85..18edcaf14 100644 --- a/project/gui/azure/guix/canvas/gx_canvas_block_move.c +++ b/project/gui/azure/guix/canvas/gx_canvas_block_move.c @@ -37,7 +37,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_canvas_block_move.c PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -78,6 +78,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added canvas status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_canvas_block_move(GX_RECTANGLE *block, GX_VALUE x_shift, GX_VALUE y_shift, GX_RECTANGLE *dirty) @@ -101,7 +104,7 @@ UINT status = GX_FAILURE; display = context -> gx_draw_context_display; /* check to see if this driver supports block move */ - if (!display -> gx_display_driver_block_move) + if (!display -> gx_display_driver_block_move || (context -> gx_draw_context_canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER)) { /* this driver doesn't support block move. If we are partial drawing just mark the caller as dirty so that diff --git a/project/gui/azure/guix/canvas/gx_canvas_create.c b/project/gui/azure/guix/canvas/gx_canvas_create.c index de49a9851..0070c63dc 100644 --- a/project/gui/azure/guix/canvas/gx_canvas_create.c +++ b/project/gui/azure/guix/canvas/gx_canvas_create.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_canvas_create PORTABLE C */ -/* 6.1.3 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -81,6 +81,10 @@ /* resulting in version 6.1 */ /* 12-31-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1.3 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added initilization to the */ +/* canvas members, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_canvas_create(GX_CANVAS *canvas, GX_CONST GX_CHAR *name, GX_DISPLAY *display, @@ -100,9 +104,13 @@ UINT _gx_canvas_create(GX_CANVAS *canvas, GX_CONST GX_CHAR *name, GX_DISPLAY *d canvas -> gx_canvas_draw_nesting = 0; canvas -> gx_canvas_dirty_count = 0; canvas -> gx_canvas_status = type; - canvas -> gx_canvas_x_resolution = (GX_VALUE) width; - canvas -> gx_canvas_y_resolution = (GX_VALUE) height; - canvas -> gx_canvas_hardware_layer = (GX_BYTE) -1; + canvas -> gx_canvas_x_resolution = (GX_VALUE)width; + canvas -> gx_canvas_y_resolution = (GX_VALUE)height; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + canvas -> gx_canvas_memory_width = (GX_VALUE)width; + canvas -> gx_canvas_memory_height = (GX_VALUE)height; +#endif + canvas -> gx_canvas_hardware_layer = (GX_BYTE)-1; /* Determine if there is a memory area. */ if (memory_area) diff --git a/project/gui/azure/guix/canvas/gx_canvas_drawing_initiate.c b/project/gui/azure/guix/canvas/gx_canvas_drawing_initiate.c index d711d3e36..1d435d545 100644 --- a/project/gui/azure/guix/canvas/gx_canvas_drawing_initiate.c +++ b/project/gui/azure/guix/canvas/gx_canvas_drawing_initiate.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_canvas_drawing_initiate PORTABLE C */ -/* 6.1.5 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -86,6 +86,10 @@ /* 03-02-2021 Kenneth Maxwell Modified comment(s), added */ /* flip rotation support, */ /* resulting in version 6.1.5 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_canvas_drawing_initiate(GX_CANVAS *canvas, GX_WIDGET *who, GX_RECTANGLE *dirty_area) @@ -122,6 +126,21 @@ GX_DISPLAY *display = canvas -> gx_canvas_display; { /* initialize the dirty rectangle */ canvas -> gx_canvas_dirty_area = *dirty_area; + +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + if (canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + canvas -> gx_canvas_memory_width = (GX_VALUE)(dirty_area -> gx_rectangle_right - dirty_area -> gx_rectangle_left + 1); + canvas -> gx_canvas_memory_width = (GX_VALUE)((canvas -> gx_canvas_memory_width + 3) & 0xFFFC); + canvas -> gx_canvas_memory_height = (GX_VALUE)(canvas -> gx_canvas_memory_size / display -> gx_display_driver_row_pitch_get((USHORT)canvas -> gx_canvas_memory_width)); + if (canvas -> gx_canvas_memory_height < (dirty_area -> gx_rectangle_bottom - dirty_area -> gx_rectangle_top + 1)) + { + return GX_INVALID_MEMORY_SIZE; + } + canvas -> gx_canvas_memory_offset_x = dirty_area -> gx_rectangle_left; + canvas -> gx_canvas_memory_offset_y = dirty_area -> gx_rectangle_top; + } +#endif } /* Are we nested? */ @@ -146,7 +165,23 @@ GX_DISPLAY *display = canvas -> gx_canvas_display; if (new_context -> gx_draw_context_display -> gx_display_rotation_angle == GX_SCREEN_ROTATION_NONE || new_context -> gx_draw_context_display -> gx_display_rotation_angle == GX_SCREEN_ROTATION_FLIP) { +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + if (canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + new_context -> gx_draw_context_pitch = canvas -> gx_canvas_memory_width; + new_context -> gx_draw_context_offset_x = canvas -> gx_canvas_memory_offset_x; + new_context -> gx_draw_context_offset_y = canvas -> gx_canvas_memory_offset_y; + } + else + { + new_context -> gx_draw_context_pitch = canvas -> gx_canvas_x_resolution; + new_context -> gx_draw_context_offset_x = 0; + new_context -> gx_draw_context_offset_y = 0; + } + +#else new_context -> gx_draw_context_pitch = canvas -> gx_canvas_x_resolution; +#endif } else { diff --git a/project/gui/azure/guix/canvas/gx_canvas_line_draw.c b/project/gui/azure/guix/canvas/gx_canvas_line_draw.c index 8f730ce09..095070e5c 100644 --- a/project/gui/azure/guix/canvas/gx_canvas_line_draw.c +++ b/project/gui/azure/guix/canvas/gx_canvas_line_draw.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_canvas_line_draw PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -87,6 +87,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), fixed a */ +/* pattern line draw issue, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_canvas_line_draw(GX_VALUE x_start, GX_VALUE y_start, GX_VALUE x_end, GX_VALUE y_end) @@ -254,11 +257,30 @@ GX_VALUE brush_width; { if (brush -> gx_brush_line_pattern) { + if (clip_rect.gx_rectangle_left > x_start) + { + width = (GX_VALUE)((clip_rect.gx_rectangle_left - x_start) & 0x1F); + context -> gx_draw_context_brush.gx_brush_pattern_mask >>= width; + } + /* Call display driver's simple horizontal pattern line drawing function. */ display -> gx_display_driver_horizontal_pattern_line_draw(context, clip_rect.gx_rectangle_left, clip_rect.gx_rectangle_right, y_start); + + if (clip_rect.gx_rectangle_right < x_end) + { + width = (GX_VALUE)((x_end - clip_rect.gx_rectangle_right) & 0x1F); + if ((context -> gx_draw_context_brush.gx_brush_pattern_mask >> width) == 0) + { + context -> gx_draw_context_brush.gx_brush_pattern_mask <<= (32 - width); + } + else + { + context -> gx_draw_context_brush.gx_brush_pattern_mask >>= width; + } + } } else { @@ -275,11 +297,30 @@ GX_VALUE brush_width; { if (brush -> gx_brush_line_pattern) { + if (clip_rect.gx_rectangle_top > y_start) + { + width = (GX_VALUE)((clip_rect.gx_rectangle_top - y_start) & 0x1F); + context -> gx_draw_context_brush.gx_brush_pattern_mask >>= width; + } + /* Call display driver's simple vertical line drawing function. */ display -> gx_display_driver_vertical_pattern_line_draw(context, clip_rect.gx_rectangle_top, clip_rect.gx_rectangle_bottom, x_start); + + if (clip_rect.gx_rectangle_bottom < y_end) + { + width = (GX_VALUE)((y_end - clip_rect.gx_rectangle_bottom) & 0x1F); + if ((context -> gx_draw_context_brush.gx_brush_pattern_mask >> width) == 0) + { + context -> gx_draw_context_brush.gx_brush_pattern_mask <<= (32 - width); + } + else + { + context -> gx_draw_context_brush.gx_brush_pattern_mask >>= width; + } + } } else { diff --git a/project/gui/azure/guix/canvas/gx_canvas_memory_define.c b/project/gui/azure/guix/canvas/gx_canvas_memory_define.c index 285e49ca4..c9cc3a1fd 100644 --- a/project/gui/azure/guix/canvas/gx_canvas_memory_define.c +++ b/project/gui/azure/guix/canvas/gx_canvas_memory_define.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_canvas_memory_define PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -67,15 +67,36 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_canvas_memory_define(GX_CANVAS *canvas, GX_COLOR *memory, ULONG memsize) { +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER +GX_DISPLAY *display = canvas -> gx_canvas_display; +ULONG canvas_size; + + if (!display) + { + return GX_INVALID_DISPLAY; + } + + canvas_size = (ULONG)(display -> gx_display_driver_row_pitch_get((USHORT)canvas -> gx_canvas_x_resolution) * canvas -> gx_canvas_y_resolution); + + if (memsize < canvas_size) + { + canvas -> gx_canvas_status |= GX_CANVAS_PARTIAL_FRAME_BUFFER; + } +#endif + /* change the memory pointer value */ canvas -> gx_canvas_memory = memory; /* change the memory size */ - canvas ->gx_canvas_memory_size = memsize; + canvas -> gx_canvas_memory_size = memsize; /* mark the canvas dirty so that it get refreshed */ _gx_canvas_dirty_mark(canvas, GX_NULL); diff --git a/project/gui/azure/guix/canvas/gx_canvas_mouse_show.c b/project/gui/azure/guix/canvas/gx_canvas_mouse_show.c index d255b29f3..6e7f2cd9c 100644 --- a/project/gui/azure/guix/canvas/gx_canvas_mouse_show.c +++ b/project/gui/azure/guix/canvas/gx_canvas_mouse_show.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_canvas_mouse_show PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -65,6 +65,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added canvas status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_MOUSE_SUPPORT) @@ -73,6 +76,14 @@ UINT _gx_canvas_mouse_show(GX_CANVAS *canvas) GX_DISPLAY *display; GX_MOUSE_CURSOR_INFO *mouse_info; +#if defined(GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER) + if (canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + /* Not supported. */ + return GX_FAILURE; + } +#endif + display = canvas -> gx_canvas_display; mouse_info = display -> gx_display_mouse.gx_mouse_cursor_info; diff --git a/project/gui/azure/guix/canvas/gxe_canvas_create.c b/project/gui/azure/guix/canvas/gxe_canvas_create.c index a949d743a..5010dfb41 100644 --- a/project/gui/azure/guix/canvas/gxe_canvas_create.c +++ b/project/gui/azure/guix/canvas/gxe_canvas_create.c @@ -38,7 +38,7 @@ GX_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _gxe_canvas_create PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -80,6 +80,10 @@ GX_CALLER_CHECKING_EXTERNS /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), verify */ +/* the memory size only when */ +/* memory_area is provided, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gxe_canvas_create(GX_CANVAS *canvas, GX_CONST GX_CHAR *name, GX_DISPLAY *display, UINT type, @@ -109,10 +113,13 @@ UINT pitch; return(GX_ALREADY_CREATED); } - pitch = (UINT)(display -> gx_display_driver_row_pitch_get((USHORT)width)); - if (memory_size < pitch * height) + if (memory_area) { - return GX_INVALID_SIZE; + pitch = (UINT)(display -> gx_display_driver_row_pitch_get((USHORT)width)); + if (memory_size < pitch * height) + { + return GX_INVALID_SIZE; + } } if (type & (~((UINT)(GX_CANVAS_SIMPLE | GX_CANVAS_MANAGED | GX_CANVAS_VISIBLE | diff --git a/project/gui/azure/guix/checkbox/gxe_checkbox_pixelmap_set.c b/project/gui/azure/guix/checkbox/gxe_checkbox_pixelmap_set.c index 6b9c2798c..77653cce3 100644 --- a/project/gui/azure/guix/checkbox/gxe_checkbox_pixelmap_set.c +++ b/project/gui/azure/guix/checkbox/gxe_checkbox_pixelmap_set.c @@ -36,7 +36,7 @@ /* FUNCTION RELEASE */ /* */ /* _gxe_checkbox_pixelmap_set PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -80,6 +80,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added invalid widget check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gxe_checkbox_pixelmap_set(GX_CHECKBOX *checkbox, @@ -96,6 +99,12 @@ UINT status; return(GX_PTR_ERROR); } + /* Check for the invalid widget. */ + if (checkbox -> gx_widget_type == 0) + { + return(GX_INVALID_WIDGET); + } + status = _gx_checkbox_pixelmap_set(checkbox, unchecked_id, checked_id, unchecked_disabled_id, checked_disabled_id); diff --git a/project/gui/azure/guix/display/gx_display_driver_1555xrgb_jpeg_draw.c b/project/gui/azure/guix/display/gx_display_driver_1555xrgb_jpeg_draw.c index 0aa633b33..c01bd155c 100644 --- a/project/gui/azure/guix/display/gx_display_driver_1555xrgb_jpeg_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_1555xrgb_jpeg_draw.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_dislay_driver_565rgb_jpeg_draw PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -70,10 +70,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* removed a parameter from */ /* jpeg mcu decode function, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) @@ -84,4 +84,5 @@ VOID _gx_display_driver_1555xrgb_jpeg_draw(GX_DRAW_CONTEXT *context, INT xpos, I pixelmap -> gx_pixelmap_data_size, context, xpos, ypos); } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_block_move.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_block_move.c index 280a54cb5..b9fd2f051 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_block_move.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_block_move.c @@ -34,7 +34,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_block_move PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -69,6 +69,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added canvas status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_block_move(GX_DRAW_CONTEXT *context, @@ -81,6 +84,14 @@ INT width_in_bytes; INT y; INT height; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + if (context -> gx_draw_context_canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + /* Not supported. */ + return; + } +#endif + if (xshift) { if (xshift > 0) diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_canvas_copy.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_canvas_copy.c index 2f706121c..07fc2fd52 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_canvas_copy.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_canvas_copy.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_canvas_copy PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -71,6 +71,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added canvas status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_canvas_copy(GX_CANVAS *canvas, GX_CANVAS *composite) @@ -82,6 +85,14 @@ USHORT *write; INT width; INT row; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + if (canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + /* Not supported. */ + return; + } +#endif + dirty.gx_rectangle_left = dirty.gx_rectangle_top = 0; dirty.gx_rectangle_right = (GX_VALUE)(canvas -> gx_canvas_x_resolution - (GX_VALUE)1); dirty.gx_rectangle_bottom = (GX_VALUE)(canvas -> gx_canvas_y_resolution - (GX_VALUE)1); diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_line_draw.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_line_draw.c index c0fb79f5b..20eb4287d 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_line_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_line_draw.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_horizontal_line_draw PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -73,6 +73,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_horizontal_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT xend, INT ypos, INT width, GX_COLOR color) @@ -103,11 +107,8 @@ GX_UBYTE alpha; /* pick up start address of canvas memory */ rowstart = (USHORT *)context -> gx_draw_context_memory; - /* calculate start of row address */ - rowstart += context -> gx_draw_context_pitch * ypos; + GX_CALCULATE_PUTROW(rowstart, xstart, ypos, context); - /* calculate pixel address */ - rowstart += xstart; /* draw 1-pixel hi lines to fill width */ for (row = 0; row < width; row++) { diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_pattern_line_draw.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_pattern_line_draw.c index 521ddc779..5a3b4e0f0 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_pattern_line_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_horizontal_pattern_line_draw.c @@ -34,7 +34,7 @@ /* */ /* _gx_display_driver_16bpp_horizontal_pattern_line_draw */ /* PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -69,6 +69,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_horizontal_pattern_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT xend, INT ypos) @@ -86,11 +90,8 @@ INT len = xend - xstart + 1; /* pick up start address of canvas memory */ rowstart = (USHORT *)context -> gx_draw_context_memory; - /* calculate start of row address */ - rowstart += context -> gx_draw_context_pitch * ypos; + GX_CALCULATE_PUTROW(rowstart, xstart, ypos, context); - /* calculate pixel address */ - rowstart += xstart; /* draw 1-pixel hi lines to fill width */ /* pick up the requested pattern and mask */ diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_pixel_write.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_pixel_write.c index bf5a8f466..4d6ef2513 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_pixel_write.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_pixel_write.c @@ -32,7 +32,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_pixel_write PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -67,17 +67,17 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_pixel_write(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR color) { USHORT *put = (USHORT *)context -> gx_draw_context_memory; - /* calculate address of scan line */ - put += context -> gx_draw_context_pitch * y; - - /* step in by x coordinate */ - put += x; + GX_CALCULATE_PUTROW(put, x, y, context); /* write the pixel value */ *put = (USHORT)color; diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_draw.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_draw.c index c8f05233f..304485cb0 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_draw.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_565rgb_pixelmap_raw_write PORTABLE C */ -/* 6.1 */ +/* 6.X */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -69,6 +69,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_pixelmap_raw_write(GX_DRAW_CONTEXT *context, @@ -85,8 +89,8 @@ GX_CONST USHORT *get; GX_RECTANGLE *clip = context -> gx_draw_context_clip; putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += clip -> gx_rectangle_top * context -> gx_draw_context_pitch; - putrow += clip -> gx_rectangle_left; + + GX_CALCULATE_PUTROW(putrow, clip->gx_rectangle_left, clip->gx_rectangle_top, context); getrow = (USHORT *)(pixelmap -> gx_pixelmap_data); getrow += pixelmap -> gx_pixelmap_width * (clip -> gx_rectangle_top - ypos); @@ -201,7 +205,7 @@ void (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* */ /* _gx_display_driver_565rgb_pixelmap_compressed_write */ /* PORTABLE C */ -/* 6.1 */ +/* 6.X */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -237,6 +241,10 @@ void (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_pixelmap_compressed_write(GX_DRAW_CONTEXT *context, @@ -281,8 +289,8 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; to the enf of the last visible row */ putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += yval * context -> gx_draw_context_pitch; - putrow += xpos; + + GX_CALCULATE_PUTROW(putrow, xpos, yval, context); while (yval <= clip -> gx_rectangle_bottom) { @@ -534,7 +542,7 @@ void (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_565rgb_palette_pixelmap_raw_write PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -570,6 +578,10 @@ void (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_palette_pixelmap_raw_write(GX_DRAW_CONTEXT *context, @@ -590,8 +602,8 @@ GX_UBYTE b; GX_RECTANGLE *clip = context -> gx_draw_context_clip; putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += clip -> gx_rectangle_top * context -> gx_draw_context_pitch; - putrow += clip -> gx_rectangle_left; + + GX_CALCULATE_PUTROW(putrow, clip->gx_rectangle_left, clip->gx_rectangle_top, context); getrow = (GX_UBYTE *)(pixelmap -> gx_pixelmap_data); getrow += pixelmap -> gx_pixelmap_width * (clip -> gx_rectangle_top - ypos); @@ -624,7 +636,7 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* */ /* _gx_display_driver_565rgb_palette_pixelmap_transparent_raw_write */ /* PORTABLE C */ -/* 6.1 */ +/* 6.X */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -660,6 +672,10 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_palette_pixelmap_transparent_raw_write(GX_DRAW_CONTEXT *context, @@ -679,9 +695,8 @@ GX_UBYTE b; GX_RECTANGLE *clip = context -> gx_draw_context_clip; - putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += clip -> gx_rectangle_top * context -> gx_draw_context_pitch; - putrow += clip -> gx_rectangle_left; + putrow = (USHORT *)context->gx_draw_context_memory; + GX_CALCULATE_PUTROW(putrow, clip->gx_rectangle_left, clip->gx_rectangle_top, context); getrow = (GX_UBYTE *)(pixelmap -> gx_pixelmap_data); getrow += pixelmap -> gx_pixelmap_width * (clip -> gx_rectangle_top - ypos); @@ -720,7 +735,7 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* _gx_display_driver_565rgb_palette_pixelmap_transparent_compressed */ /* _write */ /* PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -757,6 +772,10 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_palette_pixelmap_transparent_compressed_write(GX_DRAW_CONTEXT *context, @@ -805,8 +824,7 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* Now we are on the first visible row, copy pixels until we get to the end of the last visible row. */ putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += yval * context -> gx_draw_context_pitch; - putrow += xpos; + GX_CALCULATE_PUTROW(putrow, xpos, yval, context); palette = (GX_COLOR *)pixelmap -> gx_pixelmap_aux_data; @@ -923,7 +941,7 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* */ /* _gx_display_driver_565rgb_palette_pixelmap_compressed_write */ /* PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -959,6 +977,10 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_palette_pixelmap_compressed_write(GX_DRAW_CONTEXT *context, @@ -1006,8 +1028,7 @@ GX_RECTANGLE *clip = context -> gx_draw_context_clip; /* Now we are on the first visible row, copy pixels until we get to the end of the last visible row. */ putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += yval * context -> gx_draw_context_pitch; - putrow += xpos; + GX_CALCULATE_PUTROW(putrow, xpos, yval, context); palette = (GX_COLOR *)pixelmap -> gx_pixelmap_aux_data; diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_rotate.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_rotate.c index abdaf8a13..8f26aa754 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_rotate.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_pixelmap_rotate.c @@ -580,7 +580,7 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR col /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_pixelmap_simple_rotate PORTABLE C */ -/* 6.1.7 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -622,6 +622,10 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR col /* 06-02-2021 Kenneth Maxwell Modified comment(s), */ /* remove unused assignment, */ /* resulting in version 6.1.7 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_pixelmap_simple_rotate(GX_DRAW_CONTEXT *context, INT xpos, INT ypos, GX_PIXELMAP *pixelmap, @@ -640,6 +644,10 @@ INT newypos; clip = context -> gx_draw_context_clip; + putrow = (USHORT *)context -> gx_draw_context_memory; + + GX_CALCULATE_PUTROW(putrow, clip -> gx_rectangle_left, clip -> gx_rectangle_top, context); + if (angle == 90) { width = pixelmap -> gx_pixelmap_height; @@ -648,10 +656,6 @@ INT newypos; newxpos = xpos + cx - (width - 1 - cy); newypos = ypos + cy - cx; - putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += clip -> gx_rectangle_top * context -> gx_draw_context_pitch; - putrow += clip -> gx_rectangle_left; - for (y = clip -> gx_rectangle_top - newypos; y <= clip -> gx_rectangle_bottom - newypos; y++) { put = putrow; @@ -677,10 +681,6 @@ INT newypos; newxpos = xpos + cx - (width - 1 - cx); newypos = ypos + cy - (height - 1 - cy); - putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += clip -> gx_rectangle_top * context -> gx_draw_context_pitch; - putrow += clip -> gx_rectangle_left; - for (y = clip -> gx_rectangle_top - newypos; y <= clip -> gx_rectangle_bottom - newypos; y++) { put = putrow; @@ -703,10 +703,6 @@ INT newypos; newxpos = xpos + cx - cy; newypos = ypos + cx - (height - 1 - cy); - putrow = (USHORT *)context -> gx_draw_context_memory; - putrow += clip -> gx_rectangle_top * context -> gx_draw_context_pitch; - putrow += clip -> gx_rectangle_left; - for (y = clip -> gx_rectangle_top - newypos; y <= clip -> gx_rectangle_bottom - newypos; y++) { put = putrow; diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_simple_line_draw.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_simple_line_draw.c index cef9d1aae..6001e0dc7 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_simple_line_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_simple_line_draw.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_simple_line_draw PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -75,6 +75,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_simple_line_draw(GX_DRAW_CONTEXT *context, INT xstart, INT ystart, INT xend, INT yend) @@ -103,8 +107,9 @@ INT dy = GX_ABS(yend - ystart); GX_RECTANGLE *clip = context -> gx_draw_context_clip; GX_COLOR linecolor = context -> gx_draw_context_brush.gx_brush_line_color; -#if defined GX_BRUSH_ALPHA_SUPPORT -GX_UBYTE alpha; + +#if defined GX_BRUSH_ALPHA_SUPPORT +GX_UBYTE alpha; alpha = context -> gx_draw_context_brush.gx_brush_alpha; if (alpha == 0) @@ -136,8 +141,11 @@ GX_UBYTE alpha; y_increment = 0 - context -> gx_draw_context_pitch; } - put = (USHORT *)(context -> gx_draw_context_memory) + ystart * context -> gx_draw_context_pitch + xstart; - next_put = (USHORT *)(context -> gx_draw_context_memory) + yend * context -> gx_draw_context_pitch + xend; + put = (USHORT *)(context -> gx_draw_context_memory); + GX_CALCULATE_PUTROW(put, xstart, ystart, context); + + next_put = (USHORT *)(context -> gx_draw_context_memory); + GX_CALCULATE_PUTROW(next_put, xend, yend, context); end_point.gx_point_x = (GX_VALUE)xstart; @@ -296,7 +304,7 @@ GX_UBYTE alpha; PIXEL_WRITE(put, linecolor); put += context -> gx_draw_context_pitch; } - } + } } else { @@ -461,3 +469,4 @@ GX_UBYTE alpha; } } } + diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_line_draw.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_line_draw.c index 128a34ec4..48cc81f8f 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_line_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_line_draw.c @@ -31,7 +31,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_vertical_line_draw PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -70,6 +70,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_vertical_line_draw(GX_DRAW_CONTEXT *context, INT ystart, INT yend, INT xpos, INT width, GX_COLOR color) @@ -98,11 +102,7 @@ GX_UBYTE alpha; /* pick up starting address of canvas memory */ rowstart = (USHORT *)context -> gx_draw_context_memory; - /* calculate start of scanline */ - rowstart += context -> gx_draw_context_pitch * ystart; - - /* offset into starting pixel */ - rowstart += xpos; + GX_CALCULATE_PUTROW(rowstart, xpos, ystart, context); /* draw line from top to bottom */ for (row = 0; row < len; row++) diff --git a/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_pattern_line_draw.c b/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_pattern_line_draw.c index 164043366..c4f092ac1 100644 --- a/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_pattern_line_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_16bpp_vertical_pattern_line_draw.c @@ -32,7 +32,7 @@ /* */ /* _gx_display_driver_16bpp_vertical_pattern_line_draw */ /* PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -67,6 +67,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_vertical_pattern_line_draw(GX_DRAW_CONTEXT *context, INT ystart, INT yend, INT xpos) @@ -84,11 +88,7 @@ INT len = yend - ystart + 1; /* pick up starting address of canvas memory */ rowstart = (USHORT *)context -> gx_draw_context_memory; - /* calculate start of scanline */ - rowstart += context -> gx_draw_context_pitch * ystart; - - /* offset into starting pixel */ - rowstart += xpos; + GX_CALCULATE_PUTROW(rowstart, xpos, ystart, context); /* pick up the requested pattern and mask */ pattern = context -> gx_draw_context_brush.gx_brush_line_pattern; diff --git a/project/gui/azure/guix/display/gx_display_driver_24xrgb_jpeg_draw.c b/project/gui/azure/guix/display/gx_display_driver_24xrgb_jpeg_draw.c index 312cee44b..042a3a65a 100644 --- a/project/gui/azure/guix/display/gx_display_driver_24xrgb_jpeg_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_24xrgb_jpeg_draw.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_dislay_driver_24xrgb_jpeg_draw PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -70,10 +70,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* removed a parameter from */ /* jpeg mcu decode function, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) @@ -84,4 +84,5 @@ VOID _gx_display_driver_24xrgb_jpeg_draw(GX_DRAW_CONTEXT *context, INT xpos, INT pixelmap -> gx_pixelmap_data_size, context, xpos, ypos); } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/display/gx_display_driver_24xrgb_rotated_jpeg_draw.c b/project/gui/azure/guix/display/gx_display_driver_24xrgb_rotated_jpeg_draw.c index 162f9926b..d99e22a32 100644 --- a/project/gui/azure/guix/display/gx_display_driver_24xrgb_rotated_jpeg_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_24xrgb_rotated_jpeg_draw.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_dislay_driver_24xrgb_rotated_jpeg_draw PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -70,10 +70,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 02-02-2021 Kenneth Maxwell Initial Version 6.1.4 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* removed a parameter from */ /* jpeg mcu decode function, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) @@ -83,4 +83,5 @@ VOID _gx_display_driver_24xrgb_rotated_jpeg_draw(GX_DRAW_CONTEXT *context, INT x pixelmap -> gx_pixelmap_data_size, context, xpos, ypos); } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/display/gx_display_driver_565rgb_canvas_blend.c b/project/gui/azure/guix/display/gx_display_driver_565rgb_canvas_blend.c index 353b81006..dabdb6039 100644 --- a/project/gui/azure/guix/display/gx_display_driver_565rgb_canvas_blend.c +++ b/project/gui/azure/guix/display/gx_display_driver_565rgb_canvas_blend.c @@ -45,7 +45,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_565rgb_canvas_blend PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -83,7 +83,9 @@ /* */ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ -/* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added canvas status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_565rgb_canvas_blend(GX_CANVAS *canvas, GX_CANVAS *composite) @@ -103,6 +105,14 @@ USHORT bcolor; INT row; INT col; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + if (canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + /* Not supported. */ + return; + } +#endif + dirty.gx_rectangle_left = dirty.gx_rectangle_top = 0; dirty.gx_rectangle_right = (GX_VALUE)(canvas -> gx_canvas_x_resolution - 1); dirty.gx_rectangle_bottom = (GX_VALUE)(canvas -> gx_canvas_y_resolution - 1); diff --git a/project/gui/azure/guix/display/gx_display_driver_565rgb_glyph_1bit_draw.c b/project/gui/azure/guix/display/gx_display_driver_565rgb_glyph_1bit_draw.c index 2d3c81171..ec8d4294a 100644 --- a/project/gui/azure/guix/display/gx_display_driver_565rgb_glyph_1bit_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_565rgb_glyph_1bit_draw.c @@ -50,7 +50,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_16bpp_glyph_1bit_draw PORTABLE C */ -/* 6.1.11 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -92,6 +92,10 @@ /* 04-25-2022 Ting Zhu Modified comment(s), */ /* fixed access violation bug, */ /* resulting in version 6.1.11 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_16bpp_glyph_1bit_draw(GX_DRAW_CONTEXT *context, GX_RECTANGLE *draw_area, GX_POINT *map_offset, GX_CONST GX_GLYPH *glyph) @@ -188,10 +192,9 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *, INT, INT, GX_COLOR, GX_UBYTE); y_height = (UINT)(draw_area -> gx_rectangle_bottom - draw_area -> gx_rectangle_top + 1); line_start = (USHORT *)context -> gx_draw_context_memory; - line_start += context -> gx_draw_context_pitch * (draw_area -> gx_rectangle_top); - line_start += draw_area -> gx_rectangle_left; + GX_CALCULATE_PUTROW(line_start, draw_area -> gx_rectangle_left, draw_area -> gx_rectangle_top, context); -#if defined (GX_BRUSH_ALPHA_SUPPORT) +#if defined(GX_BRUSH_ALPHA_SUPPORT) if (brush_alpha != 0xff) { yval = draw_area -> gx_rectangle_top; diff --git a/project/gui/azure/guix/display/gx_display_driver_565rgb_horizontal_pixelmap_line_draw.c b/project/gui/azure/guix/display/gx_display_driver_565rgb_horizontal_pixelmap_line_draw.c index f2ab8b4d6..b12bb7c26 100644 --- a/project/gui/azure/guix/display/gx_display_driver_565rgb_horizontal_pixelmap_line_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_565rgb_horizontal_pixelmap_line_draw.c @@ -536,7 +536,7 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* */ /* _gx_display_driver_565rgb_horizontal_pixelmap_line_raw_write */ /* PORTABLE C */ -/* 6.1 */ +/* 6.X */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -573,6 +573,10 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_horizontal_pixelmap_line_raw_write(GX_DRAW_CONTEXT *context, @@ -596,8 +600,7 @@ GX_PIXELMAP *pixelmap; if ((info -> draw) && (xstart <= xend)) { put = (USHORT *)context -> gx_draw_context_memory; - put += y * context -> gx_draw_context_pitch; - put += xstart; + GX_CALCULATE_PUTROW(put, xstart, y, context); /*calculate the offset.*/ offset = (info -> x_offset % pic_width); @@ -723,7 +726,7 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* */ /* _gx_display_driver_565rgb_horizontal_pixelmap_line_compressed_write */ /* PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -760,6 +763,10 @@ VOID (*blend_func)(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLO /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_display_driver_565rgb_horizontal_pixelmap_line_compressed_write(GX_DRAW_CONTEXT *context, @@ -781,7 +788,7 @@ GX_PIXELMAP *pixelmap; start_pos = xstart - (info -> x_offset % pixelmap -> gx_pixelmap_width); put = (USHORT *)context -> gx_draw_context_memory; - put += y * context -> gx_draw_context_pitch + start_pos; + GX_CALCULATE_PUTROW(put, start_pos, y, context); /*Repeat the draw operation to fill the whole dirty area.*/ while (start_pos <= xend) diff --git a/project/gui/azure/guix/display/gx_display_driver_565rgb_jpeg_draw.c b/project/gui/azure/guix/display/gx_display_driver_565rgb_jpeg_draw.c index 20d734904..19c2b415c 100644 --- a/project/gui/azure/guix/display/gx_display_driver_565rgb_jpeg_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_565rgb_jpeg_draw.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_dislay_driver_565rgb_jpeg_draw PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -72,10 +72,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* removed a parameter from */ /* jpeg mcu decode function, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) @@ -86,4 +86,5 @@ VOID _gx_display_driver_565rgb_jpeg_draw(GX_DRAW_CONTEXT *context, INT xpos, INT pixelmap -> gx_pixelmap_data_size, context, xpos, ypos); } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/display/gx_display_driver_565rgb_pixel_blend.c b/project/gui/azure/guix/display/gx_display_driver_565rgb_pixel_blend.c index d2a0eac21..dd4bccd2d 100644 --- a/project/gui/azure/guix/display/gx_display_driver_565rgb_pixel_blend.c +++ b/project/gui/azure/guix/display/gx_display_driver_565rgb_pixel_blend.c @@ -44,7 +44,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_display_driver_565rgb_pixel_blend PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -83,6 +83,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_display_driver_565rgb_pixel_blend(GX_DRAW_CONTEXT *context, INT x, INT y, GX_COLOR fcolor, GX_UBYTE alpha) @@ -94,14 +98,12 @@ GX_UBYTE balpha; USHORT bcolor; USHORT *put; - /* Is the pixel non-transparent? */ if (alpha > 0) { /* calculate address of pixel */ put = (USHORT *)context -> gx_draw_context_memory; - put += context -> gx_draw_context_pitch * y; - put += x; + GX_CALCULATE_PUTROW(put, x, y, context); /* No need to blend if alpha value is 255. */ if (alpha == 255) diff --git a/project/gui/azure/guix/display/gx_display_driver_565rgb_rotated_jpeg_draw.c b/project/gui/azure/guix/display/gx_display_driver_565rgb_rotated_jpeg_draw.c index 77ce3a8f6..382ed3c02 100644 --- a/project/gui/azure/guix/display/gx_display_driver_565rgb_rotated_jpeg_draw.c +++ b/project/gui/azure/guix/display/gx_display_driver_565rgb_rotated_jpeg_draw.c @@ -35,7 +35,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_dislay_driver_565rgb_jpeg_draw PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -70,10 +70,10 @@ /* DATE NAME DESCRIPTION */ /* */ /* 12-31-2020 Kenneth Maxwell Initial Version 6.1.3 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* removed a parameter from */ /* jpeg mcu decode function, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) @@ -83,4 +83,5 @@ VOID _gx_display_driver_565rgb_rotated_jpeg_draw(GX_DRAW_CONTEXT *context, INT x pixelmap -> gx_pixelmap_data_size, context, xpos, ypos); } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/display/gx_display_language_table_set.c b/project/gui/azure/guix/display/gx_display_language_table_set.c index 3f11055a0..f3c54837d 100644 --- a/project/gui/azure/guix/display/gx_display_language_table_set.c +++ b/project/gui/azure/guix/display/gx_display_language_table_set.c @@ -212,7 +212,7 @@ GX_CONST GX_STRING **old_table = display -> gx_display_language_table; /* FUNCTION RELEASE */ /* */ /* _gx_display_language_direction_table_set_ext PORTABLE C */ -/* 6.1.10 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -224,7 +224,7 @@ GX_CONST GX_STRING **old_table = display -> gx_display_language_table; /* INPUT */ /* */ /* display Pointer to display */ -/* language_direciton_table The language direction table */ +/* language_direction_table The language direction table */ /* to be set */ /* num_languages Number of languages in the */ /* table */ @@ -246,6 +246,8 @@ GX_CONST GX_STRING **old_table = display -> gx_display_language_table; /* DATE NAME DESCRIPTION */ /* */ /* 01-31-2022 Ting Zhu Initial Version 6.1.10 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_DYNAMIC_BIDI_TEXT_SUPPORT) diff --git a/project/gui/azure/guix/drop/gx_drop_list_draw.c b/project/gui/azure/guix/drop/gx_drop_list_draw.c index 641a98353..66dcc1b48 100644 --- a/project/gui/azure/guix/drop/gx_drop_list_draw.c +++ b/project/gui/azure/guix/drop/gx_drop_list_draw.c @@ -33,13 +33,114 @@ #include "gx_utility.h" #include "gx_drop_list.h" +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_drop_list_selected_children_draw PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function draws the children of the selected item to the drop */ +/* list client area with the specified shift values. */ +/* */ +/* INPUT */ +/* */ +/* drop_list Pointer to drop list widget */ +/* widget Widget to be drawn */ +/* xshift Shift value in x coordinate */ +/* yshift Shift value in y coordinate */ +/* */ +/* OUTPUT */ +/* */ +/* None */ +/* */ +/* CALLS */ +/* */ +/* _gx_utility_rectangle_shift Shift rectangle */ +/* */ +/* CALLED BY */ +/* */ +/* _gx_drop_list_draw */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +static VOID _gx_drop_list_selected_children_draw(GX_DROP_LIST *drop_list, GX_WIDGET *widget, GX_VALUE xshift, GX_VALUE yshift) +{ +GX_WIDGET *child; +GX_WIDGET *child_child; +GX_RECTANGLE old_size; +GX_RECTANGLE old_clip; +ULONG old_style; + + /* Save the first child. */ + child = widget -> gx_widget_first_child; + + /* Draw the children. */ + while (child) + { + /* Save the widget size. */ + old_size = child -> gx_widget_size; + + /* Save the widget clip size. */ + old_clip = child -> gx_widget_clip; + + /* Save the widget style. */ + old_style = child -> gx_widget_style; + + /* Update the widget style temporarily. */ + if (drop_list -> gx_widget_status & GX_STATUS_HAS_FOCUS) + { + child -> gx_widget_style |= ~GX_STYLE_DRAW_SELECTED; + } + else + { + child -> gx_widget_style &= ~GX_STYLE_DRAW_SELECTED; + } + + /* Shift the widget size and clip with the specified shift values temporarily. */ + _gx_utility_rectangle_shift(&child -> gx_widget_size, xshift, yshift); + _gx_utility_rectangle_shift(&child -> gx_widget_clip, xshift, yshift); + + child_child = child -> gx_widget_first_child; + + /* Set the first child to NULL temporarily. */ + child -> gx_widget_first_child = GX_NULL; + + /* Draw the widget. */ + child -> gx_widget_draw_function(child); + + if (child_child) + { + child -> gx_widget_first_child = child_child; + + _gx_drop_list_selected_children_draw(drop_list, child, xshift, yshift); + } + + /* Recover the widget properties. */ + child -> gx_widget_size = old_size; + child -> gx_widget_clip = old_clip; + child -> gx_widget_style = old_style; + + child = child -> gx_widget_next; + } +} /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_drop_list_draw PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -77,32 +178,79 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* improved drawing of the */ +/* selected item, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_drop_list_draw(GX_DROP_LIST *drop_list) { GX_RECTANGLE client; GX_WIDGET *selected; -GX_WIDGET *widget; -GX_VERTICAL_LIST *list; -GX_RECTANGLE selected_size; -GX_RECTANGLE selected_clip; -ULONG selected_style; +GX_VALUE xshift; +GX_VALUE yshift; +INT selected_index; +GX_VERTICAL_LIST *list = &drop_list -> gx_drop_list_popup.gx_popup_list_list; +GX_RECTANGLE size; +GX_RECTANGLE clip; +ULONG style; +GX_WIDGET *child = GX_NULL; +GX_BOOL reuse_list_item = GX_FALSE; - widget = (GX_WIDGET *)drop_list; + /* Draw the background. */ _gx_drop_list_background_draw(drop_list); - list = (GX_VERTICAL_LIST *)&drop_list -> gx_drop_list_popup.gx_popup_list_list; + /* Pick the selected item. */ _gx_vertical_list_selected_widget_get(list, &selected); + if (!selected && list -> gx_vertical_list_callback) + { + /* If not be able to retrieve the selected widget, its possible that the selcted item + has been reused for displaying the other list items during the scrolling. + In this case, try to get the selected index first, then reuse the list child to draw the selected item. */ + + /* Get the selected index. */ + _gx_vertical_list_selected_index_get(list, &selected_index); + + if((selected_index >= 0) && (selected_index < list -> gx_vertical_list_total_rows)) + { + /* Make the first list child as the selected widget temporarily. */ + selected = _gx_widget_first_client_child_get((GX_WIDGET *)list); + + /* Call the list callback function to create the selected widget. */ + list -> gx_vertical_list_callback(list, selected, selected_index); + + reuse_list_item = GX_TRUE; + } + } + if (selected) { - /* draw the selected widget into my client area: */ - _gx_widget_client_get(widget, -1, &client); - selected_size = selected -> gx_widget_size; - selected_clip = selected -> gx_widget_clip; - selected_style = selected -> gx_widget_style; + _gx_widget_client_get((GX_WIDGET *)drop_list, -1, &client); + + size = selected -> gx_widget_size; + clip = selected -> gx_widget_clip; + + if (selected -> gx_widget_first_child) + { + child = selected -> gx_widget_first_child; + selected -> gx_widget_first_child = GX_NULL; + + /* Calculate the distance from the selected widget to the client area. */ + xshift = (GX_VALUE)(client.gx_rectangle_left - size.gx_rectangle_left); + yshift = (GX_VALUE)((client.gx_rectangle_bottom + client.gx_rectangle_top - size.gx_rectangle_bottom - size.gx_rectangle_top) >> 1); + } + + selected -> gx_widget_size = client; + selected -> gx_widget_clip = client; + + + /* Save the widget style. */ + style = selected -> gx_widget_style; + + /* Update the widget style temporarily. */ if (drop_list -> gx_widget_status & GX_STATUS_HAS_FOCUS) { selected -> gx_widget_style |= ~GX_STYLE_DRAW_SELECTED; @@ -111,14 +259,29 @@ ULONG selected_style; { selected -> gx_widget_style &= ~GX_STYLE_DRAW_SELECTED; } - selected -> gx_widget_size = client; - selected -> gx_widget_clip = client; + selected -> gx_widget_draw_function(selected); - selected -> gx_widget_size = selected_size; - selected -> gx_widget_clip = selected_clip; - selected -> gx_widget_style = selected_style; + + if (child) + { + selected -> gx_widget_first_child = child; + + /* Draw the selected widget into my client area: */ + _gx_drop_list_selected_children_draw(drop_list, selected, xshift, yshift); + } + + selected -> gx_widget_size = size; + selected -> gx_widget_clip = clip; + selected -> gx_widget_style = style; + } + + if (reuse_list_item) + { + /* Call the list callback funtion to create the widget with its original index. */ + list -> gx_vertical_list_callback(list, selected, list -> gx_vertical_list_top_index); } - _gx_widget_children_draw(widget); + /* Draw the children. */ + _gx_widget_children_draw((GX_WIDGET *)drop_list); } diff --git a/project/gui/azure/guix/gx_api.h b/project/gui/azure/guix/gx_api.h index a9456582c..fb877f14a 100644 --- a/project/gui/azure/guix/gx_api.h +++ b/project/gui/azure/guix/gx_api.h @@ -24,7 +24,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* gx_api.h PORTABLE C */ -/* 6.2.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -68,7 +68,7 @@ /* added new widget type */ /* GX_GENERIC_SCROLL_WHEEL, */ /* added animation delete API, */ -/* added generic Dave2D */ +/* added generic Dave2D */ /* graphics accelerator */ /* support, */ /* resulting in version 6.1.7 */ @@ -104,6 +104,14 @@ /* 03-08-2023 Ting Zhu Modified comment(s), */ /* updated patch version, */ /* resulting in version 6.2.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added new APIs for loading */ +/* pixelmap and font from */ +/* standalone binary, */ +/* removed unused defines, */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ @@ -126,8 +134,8 @@ extern "C" { #define AZURE_RTOS_GUIX #define GUIX_MAJOR_VERSION 6 -#define GUIX_MINOR_VERSION 2 -#define GUIX_PATCH_VERSION 1 +#define GUIX_MINOR_VERSION 3 +#define GUIX_PATCH_VERSION 0 /* The following symbols are defined for backward compatibility reasons.*/ #define __PRODUCT_GUIX__ @@ -363,7 +371,9 @@ typedef struct GX_STRING_STRUCT #define GX_FALSE 0 #define GX_NULL 0 #define GX_ID_NONE 0 -#define GX_MAGIC_NUMBER 0x4758U +#define GX_MAGIC_NUMBER 0x4758U /* GX */ +#define GX_RESOURCE_TYPE_BINRES_NORMAL 0x4758U /* GX */ +#define GX_RESOURCE_TYPE_BINRES_STANDALONE 0x4753U /* GS */ /* API return values. */ @@ -970,6 +980,7 @@ typedef struct GX_STRING_STRUCT #define GX_CANVAS_VISIBLE 0x04 /* Canvas is visible */ #define GX_CANVAS_MODIFIED 0x08 #define GX_CANVAS_COMPOSITE 0x20 /* Canvas is a buffer for creating composite*/ +#define GX_CANVAS_PARTIAL_FRAME_BUFFER 0x40 /* Define common combinations. */ @@ -1519,6 +1530,10 @@ typedef struct GX_DRAW_CONTEXT_STRUCT GX_RECTANGLE gx_draw_context_dirty; GX_RECTANGLE *gx_draw_context_clip; GX_VALUE gx_draw_context_pitch; +#if defined GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + GX_VALUE gx_draw_context_offset_x; + GX_VALUE gx_draw_context_offset_y; +#endif } GX_DRAW_CONTEXT; /* Define fill map info type. */ @@ -1808,6 +1823,12 @@ typedef struct GX_CANVAS_STRUCT /* Define the canvas memory pointer. */ GX_COLOR *gx_canvas_memory; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + GX_VALUE gx_canvas_memory_width; + GX_VALUE gx_canvas_memory_height; + GX_VALUE gx_canvas_memory_offset_x; + GX_VALUE gx_canvas_memory_offset_y; +#endif /* padded canvas memory buffer, only needed for Win32 */ #ifdef GX_TARGET_WIN32 @@ -1835,7 +1856,6 @@ typedef struct GX_CANVAS_STRUCT GX_UBYTE gx_canvas_alpha; GX_UBYTE gx_canvas_draw_nesting; GX_BYTE gx_canvas_hardware_layer; - } GX_CANVAS; /* Define Theme type */ @@ -1877,7 +1897,6 @@ typedef struct GX_PEN_CONFIGURATION_STRUCT UINT gx_pen_configuration_max_pen_speed_ticks; } GX_PEN_CONFIGURATION; - #define GX_RESOURCE_HEADER_SIZE 20 #define GX_THEME_HEADER_SIZE 114 #define GX_COLOR_HEADER_SIZE 8 @@ -3002,6 +3021,8 @@ typedef struct GX_FIXED_POINT_STRUCT #endif #define gx_binres_language_table_load_ext _gx_binres_language_table_load_ext #define gx_binres_theme_load _gx_binres_theme_load +#define gx_binres_pixelmap_load _gx_binres_pixelmap_load +#define gx_binres_font_load _gx_binres_font_load #define gx_brush_default _gx_brush_default #define gx_brush_define _gx_brush_define @@ -3488,8 +3509,6 @@ typedef struct GX_FIXED_POINT_STRUCT #define gx_text_scroll_wheel_draw _gx_text_scroll_wheel_draw #define gx_text_scroll_wheel_event_process _gx_text_scroll_wheel_event_process -#define gx_transition_window_create(a, b, c, d, e, f) _gx_transition_window_create(a, b, (GX_WIDGET *)c, d, e, f) - #define gx_tree_view_create(a, b, c, d, e, f) _gx_tree_view_create((GX_TREE_VIEW *)a, b, (GX_WIDGET *)c, d, e, f) #define gx_tree_view_draw _gx_tree_view_draw #define gx_tree_view_event_process _gx_tree_view_event_process @@ -3662,6 +3681,8 @@ UINT _gx_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****returne #endif UINT _gx_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table); UINT _gx_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme); +UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap); +UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size); UINT _gx_brush_default(GX_BRUSH *brush); UINT _gx_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style); @@ -4484,6 +4505,8 @@ UINT _gx_window_wallpaper_set(GX_WINDOW *window, GX_RESOURCE_ID wallpaper_id, GX #endif #define gx_binres_language_table_load_ext _gxe_binres_language_table_load_ext #define gx_binres_theme_load _gxe_binres_theme_load +#define gx_binres_pixelmap_load _gxe_binres_pixelmap_load +#define gx_binres_font_load _gxe_binres_font_load #define gx_brush_default _gxe_brush_default #define gx_brush_define _gxe_brush_define @@ -5139,6 +5162,8 @@ UINT _gxe_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****return #endif UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table); UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme); +UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap); +UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size); UINT _gxe_brush_default(GX_BRUSH *brush); UINT _gxe_brush_define(GX_BRUSH *brush, GX_COLOR line_color, GX_COLOR fill_color, UINT style); diff --git a/project/gui/azure/guix/gx_binres_loader.h b/project/gui/azure/guix/gx_binres_loader.h index b69fb5f13..ef26fafae 100644 --- a/project/gui/azure/guix/gx_binres_loader.h +++ b/project/gui/azure/guix/gx_binres_loader.h @@ -26,7 +26,7 @@ /* COMPONENT DEFINITION RELEASE */ /* */ /* gx_binres_loader.h PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -46,6 +46,9 @@ /* defined macros to read */ /* integer value, */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* declared new prototypes, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ @@ -84,6 +87,13 @@ UINT _gx_binres_resource_header_load(GX_BINRES_DATA_INFO *info, GX_RESOURCE_HEAD UINT _gx_binres_string_header_load(GX_BINRES_DATA_INFO *info, GX_STRING_HEADER *header); UINT _gx_binres_language_header_load(GX_BINRES_DATA_INFO *info, GX_LANGUAGE_HEADER *header); +UINT _gx_binres_one_pixelmap_load(GX_BINRES_DATA_INFO *info, GX_PIXELMAP **returned_pixelmap, USHORT *map_id); +UINT _gx_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap); +UINT _gx_binres_font_buffer_size_get(GX_BINRES_DATA_INFO *info, UINT *buffer_size, GX_BOOL reset_read_offset); +UINT _gx_binres_one_font_load(GX_BINRES_DATA_INFO *info, GX_FONT **return_font); +UINT _gx_binres_font_header_load(GX_BINRES_DATA_INFO *info, GX_FONT_HEADER *header); +UINT _gx_binres_font_load(GX_UBYTE *root_address, UINT font_index, GX_UBYTE *buffer, ULONG *buffer_size); +UINT _gx_binres_standalone_resource_seek(GX_BINRES_DATA_INFO *info, UINT res_index); /* Define error checking shells for API services. These are only referenced by the application. */ @@ -95,6 +105,8 @@ UINT _gxe_binres_language_table_load(GX_UBYTE *root_address, GX_UBYTE ****return #endif UINT _gxe_binres_language_table_load_ext(GX_UBYTE *root_address, GX_STRING ***returned_language_table); UINT _gxe_binres_theme_load(GX_UBYTE *root_address, INT theme_id, GX_THEME **returned_theme); +UINT _gxe_binres_pixelmap_load(GX_UBYTE *root_address, UINT map_index, GX_PIXELMAP *pixelmap); +UINT _gxe_binres_font_load(GX_UBYTE *root_address, UINT res_index, GX_UBYTE *buffer, ULONG *buffer_size); #endif diff --git a/project/gui/azure/guix/gx_display.h b/project/gui/azure/guix/gx_display.h index d47105e39..a31ea4a61 100644 --- a/project/gui/azure/guix/gx_display.h +++ b/project/gui/azure/guix/gx_display.h @@ -26,7 +26,7 @@ /* COMPONENT DEFINITION RELEASE */ /* */ /* gx_display.h PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -60,9 +60,11 @@ /* added language direction */ /* table set declarations, */ /* resulting in version 6.1.10 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* removed unused prototypes, */ -/* resulting in version 6.x */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ @@ -542,3 +544,13 @@ VOID *_win32_canvas_memory_prepare(GX_CANVAS *canvas, GX_RECTANGLE *dirty); } #endif +#if defined GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER +#define GX_CALCULATE_PUTROW(putrow, xpos, ypos, context)\ + putrow += (ypos - context->gx_draw_context_offset_y) * context->gx_draw_context_pitch;\ + putrow += (xpos - context->gx_draw_context_offset_x) +#else +#define GX_CALCULATE_PUTROW(putrow, xpos, ypos, context)\ + putrow += ypos * context->gx_draw_context_pitch;\ + putrow += xpos +#endif + diff --git a/project/gui/azure/guix/gx_image_reader.h b/project/gui/azure/guix/gx_image_reader.h index 7bfa5fda5..1c7669ccc 100644 --- a/project/gui/azure/guix/gx_image_reader.h +++ b/project/gui/azure/guix/gx_image_reader.h @@ -26,7 +26,7 @@ /* COMPONENT DEFINITION RELEASE */ /* */ /* gx_image_reader.h PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -52,9 +52,11 @@ /* added definitions for fixed */ /* size table dimensions, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), added */ +/* 10-31-2023 Ting Zhu Modified comment(s), added */ /* support for ARM Helium, */ -/* resulting in version 6.x */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) @@ -133,6 +135,10 @@ typedef struct GX_JPEG_INFO_STRUCT VOID (*gx_jpeg_pixel_write)(struct GX_JPEG_INFO_STRUCT *jpeg_info, GX_UBYTE red, GX_UBYTE green, GX_UBYTE blue); #endif GX_UBYTE *gx_jpeg_output_buffer; +#if defined(GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER) + GX_VALUE gx_jpeg_output_buffer_offset_x; + GX_VALUE gx_jpeg_output_buffer_offset_y; +#endif USHORT gx_jpeg_output_width; USHORT gx_jpeg_output_height; INT gx_jpeg_output_stride; @@ -303,4 +309,5 @@ static uint8x16_t _gx_jpeg_y_offset_rotated_table_ccw[4] = { #endif /* GX_IMAGE_READER_H */ -#endif /* GX_SOFTWARE_DECODER_SUPPORT */ \ No newline at end of file +#endif /* GX_SOFTWARE_DECODER_SUPPORT */ + diff --git a/project/gui/azure/guix/gx_port.h b/project/gui/azure/guix/gx_port.h index 5ace142e5..d0663cc6d 100644 --- a/project/gui/azure/guix/gx_port.h +++ b/project/gui/azure/guix/gx_port.h @@ -139,7 +139,7 @@ typedef SHORT GX_VALUE; #ifdef GX_SYSTEM_INIT CHAR _gx_version_id[] = - "Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/GNU Version 6.2.1 *"; + "Copyright (c) Microsoft Corporation. All rights reserved. * GUIX Cortex-A7/GNU Version 6.3.0 *"; #else extern CHAR _gx_version_id[]; #endif diff --git a/project/gui/azure/guix/gx_user.h b/project/gui/azure/guix/gx_user.h index 77ed1c6c3..f8253d911 100644 --- a/project/gui/azure/guix/gx_user.h +++ b/project/gui/azure/guix/gx_user.h @@ -24,7 +24,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* gx_user.h PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -45,10 +45,11 @@ /* 01-31-2022 Kenneth Maxwell Modified comment(s), */ /* fixed typo, */ /* resulting in version 6.1.10 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ -/* added GX_ENABLE_ARM_HELIUM */ -/* definition, */ -/* resulting in version 6.x */ +/* 10-31-2023 Ting Zhu Modified comment(s), added */ +/* GX_ENABLE_ARM_HELIUM and */ +/* partial canvas frame buffer */ +/* support configurations, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ @@ -76,5 +77,18 @@ /* This can be defined to enable the use of ARM Helium intrinsics for JPEG decoding. */ /* #define GX_ENABLE_ARM_HELIUM */ + +/* This can be defined to enable the partial canvas frame buffer feature. */ +/* #define GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER */ + +/* The two following definitions can be used to specify the canvas refresh directions for the partial canvas frame buffer feature. + By default, the canvas refreshes its dirty areas one by one. + If the application requires refreshing the canvas in a specific direction to mitigate tearing effects, one of the following two definitions can be used. + In this scenario, the total dirty area that covers all the dirty areas is calculated, and then the canvas is refreshed in the direction + defined by one of the following two definitions. */ + +/* #define GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL */ +/* #define GX_CANVAS_REFRESH_DIRECTION_VERTICAL */ + #endif diff --git a/project/gui/azure/guix/image/gx_image_reader_image_decode.c b/project/gui/azure/guix/image/gx_image_reader_image_decode.c index 3910e13ca..94c193af5 100644 --- a/project/gui/azure/guix/image/gx_image_reader_image_decode.c +++ b/project/gui/azure/guix/image/gx_image_reader_image_decode.c @@ -108,7 +108,7 @@ GX_CONST GX_UBYTE *buffer; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_image_decode PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -143,10 +143,10 @@ GX_CONST GX_UBYTE *buffer; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* modified jpeg decode */ /* function parameter list, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_SOFTWARE_DECODER_SUPPORT) diff --git a/project/gui/azure/guix/image/gx_image_reader_jpeg_decode.c b/project/gui/azure/guix/image/gx_image_reader_jpeg_decode.c index e9bcae891..df0adc8f4 100644 --- a/project/gui/azure/guix/image/gx_image_reader_jpeg_decode.c +++ b/project/gui/azure/guix/image/gx_image_reader_jpeg_decode.c @@ -178,7 +178,7 @@ INT index; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_huffcode_find PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -221,9 +221,9 @@ INT index; /* changed bit_count to */ /* GX_VALUE data type, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_huffcode_find(GX_JPEG_INFO *jpeg_info, @@ -266,7 +266,7 @@ GX_HUFFCODE_INFO *code_info; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_huffman_table_set PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -303,9 +303,9 @@ GX_HUFFCODE_INFO *code_info; /* added range test to prevent */ /* underflow, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_huffman_table_set(GX_JPEG_INFO *jpeg_info, UINT segment_len) @@ -554,7 +554,7 @@ INT index; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_dc_decode PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -595,9 +595,9 @@ INT index; /* 10-31-2022 Kenneth Maxwell Modified comment(s), */ /* added range test, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_dc_decode(GX_JPEG_INFO *jpeg_info, UINT i_component) @@ -654,7 +654,7 @@ GX_BOOL negative; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_ac_decode PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -695,9 +695,9 @@ GX_BOOL negative; /* 10-31-2022 Kenneth Maxwell Modified comment(s), */ /* added range test, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_ac_decode(GX_JPEG_INFO *jpeg_info, UINT i_component) @@ -834,7 +834,7 @@ INT negative; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_dequantize_idct PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -891,7 +891,7 @@ INT negative; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_dequantize_idct(INT *block, INT *quant_table, GX_BYTE *out, INT stride) @@ -1099,7 +1099,7 @@ int16_t const *base; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_1d_idct PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -1135,9 +1135,9 @@ int16_t const *base; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_1d_idct(INT *input_data, INT *output_data, INT post_scale, INT round) @@ -1190,7 +1190,7 @@ INT t; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_dequantize_idct PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -1234,9 +1234,9 @@ INT t; /* added range check for */ /* table_index, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_dequantize_idct(INT *block, INT *quant_table, GX_BYTE *out, INT stride) @@ -1291,7 +1291,7 @@ INT row; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_one_block_decode PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -1332,9 +1332,9 @@ INT row; /* returned result of */ /* dequantize_idct, */ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_one_block_decode(GX_JPEG_INFO *jpeg_info, UINT i_component, GX_BYTE *block_data) @@ -1386,7 +1386,7 @@ INT stride; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_24xrgb_pixel_write_helium PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1423,34 +1423,18 @@ INT stride; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_24xrgb_pixel_write_helium(GX_JPEG_INFO *jpeg_info, uint8x16_t vred, uint8x16_t vgreen, uint8x16_t vblue, INT size) { -static uint8x16_t voffset = {0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60}; -static uint8x16_t valpha = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; -mve_pred16_t p; - - if (size == 16) - { - vstrbq_scatter_offset_u8(jpeg_info -> gx_jpeg_putdata++, voffset, vblue); - vstrbq_scatter_offset_u8(jpeg_info -> gx_jpeg_putdata++, voffset, vgreen); - vstrbq_scatter_offset_u8(jpeg_info -> gx_jpeg_putdata++, voffset, vred); - vstrbq_scatter_offset_u8(jpeg_info -> gx_jpeg_putdata++, voffset, valpha); +INT index; - jpeg_info -> gx_jpeg_putdata += 60; - } - else + for(index = 0; index < size; index++) { - /* Write the specified size of RGB values to memory. */ - p = 0xffff >> (16 - size); - vstrbq_scatter_offset_p_u8(jpeg_info -> gx_jpeg_putdata++, voffset, vblue, p); - vstrbq_scatter_offset_p_u8(jpeg_info -> gx_jpeg_putdata++, voffset, vgreen, p); - vstrbq_scatter_offset_p_u8(jpeg_info -> gx_jpeg_putdata++, voffset, vred, p); - vstrbq_scatter_offset_p_u8(jpeg_info -> gx_jpeg_putdata++, voffset, valpha, p); + *((GX_COLOR *)jpeg_info -> gx_jpeg_putdata) = 0xff000000 | ((ULONG)vred[index] << 16) | ((ULONG)vgreen[index] << 8) | (ULONG)vblue[index]; - jpeg_info -> gx_jpeg_putdata += ((size - 1) << 2); + jpeg_info -> gx_jpeg_putdata += 4; } } #else @@ -1459,7 +1443,7 @@ mve_pred16_t p; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_1555xrgb_pixel_write PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1492,7 +1476,7 @@ mve_pred16_t p; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_24xrgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX_UBYTE red, GX_UBYTE green, GX_UBYTE blue) @@ -1509,7 +1493,7 @@ static VOID _gx_image_reader_jpeg_24xrgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_24bpp_pixel_write_helium PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1547,7 +1531,7 @@ static VOID _gx_image_reader_jpeg_24xrgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_24bpp_pixel_write_helium(GX_JPEG_INFO *jpeg_info, uint8x16_t vred, uint8x16_t vgreen, uint8x16_t vblue, INT size) @@ -1578,7 +1562,7 @@ mve_pred16_t p; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_24bpp_pixel_write PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1611,7 +1595,7 @@ mve_pred16_t p; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_24bpp_pixel_write(GX_JPEG_INFO *jpeg_info, GX_UBYTE red, GX_UBYTE green, GX_UBYTE blue) @@ -1628,7 +1612,7 @@ static VOID _gx_image_reader_jpeg_24bpp_pixel_write(GX_JPEG_INFO *jpeg_info, GX_ /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_565rgb_pixel_write_helium PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1672,7 +1656,7 @@ static VOID _gx_image_reader_jpeg_24bpp_pixel_write(GX_JPEG_INFO *jpeg_info, GX_ /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_565rgb_pixel_write_helium(GX_JPEG_INFO *jpeg_info, uint8x16_t vred, uint8x16_t vgreen, uint8x16_t vblue, INT size) @@ -1729,7 +1713,7 @@ GX_UBYTE blue[16]; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_1555xrgb_pixel_write PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1762,7 +1746,7 @@ GX_UBYTE blue[16]; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_565rgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX_UBYTE red, GX_UBYTE green, GX_UBYTE blue) @@ -1783,7 +1767,7 @@ static VOID _gx_image_reader_jpeg_565rgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_1555xrgb_pixel_write_helium PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1827,7 +1811,7 @@ static VOID _gx_image_reader_jpeg_565rgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_1555xrgb_pixel_write_helium(GX_JPEG_INFO *jpeg_info, uint8x16_t vred, uint8x16_t vgreen, uint8x16_t vblue, INT size) @@ -1884,7 +1868,7 @@ GX_UBYTE blue[16]; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_1555xrgb_pixel_write PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1917,7 +1901,7 @@ GX_UBYTE blue[16]; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static VOID _gx_image_reader_jpeg_1555xrgb_pixel_write(GX_JPEG_INFO *jpeg_info, GX_UBYTE red, GX_UBYTE green, GX_UBYTE blue) @@ -1937,7 +1921,7 @@ static VOID _gx_image_reader_jpeg_1555xrgb_pixel_write(GX_JPEG_INFO *jpeg_info, /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_pixel_write_info_set PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -1979,7 +1963,7 @@ static VOID _gx_image_reader_jpeg_1555xrgb_pixel_write(GX_JPEG_INFO *jpeg_info, /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_pixel_write_info_set(GX_JPEG_INFO *jpeg_info) @@ -2063,7 +2047,7 @@ static UINT _gx_image_reader_jpeg_pixel_write_info_set(GX_JPEG_INFO *jpeg_info) /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_one_mcu_write PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -2103,9 +2087,11 @@ static UINT _gx_image_reader_jpeg_pixel_write_info_set(GX_JPEG_INFO *jpeg_info) /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* added Helium support, */ -/* resulting in version 6.x */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_one_mcu_write(GX_JPEG_INFO *jpeg_info, INT xpos, INT ypos, INT h, INT v) @@ -2162,8 +2148,13 @@ INT blue; } put = (GX_UBYTE *)jpeg_info -> gx_jpeg_output_buffer; +#if defined(GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER) + put += (ypos + ystart - jpeg_info -> gx_jpeg_output_buffer_offset_y) * jpeg_info -> gx_jpeg_output_stride; + put += (xpos + xstart - jpeg_info -> gx_jpeg_output_buffer_offset_x) * jpeg_info -> gx_jpeg_output_bpp; +#else put += (ypos + ystart) * jpeg_info -> gx_jpeg_output_stride; put += (xpos + xstart) * jpeg_info -> gx_jpeg_output_bpp; +#endif #if defined(GX_ENABLE_ARM_HELIUM) index = (h == 1 ? 0 : (h - 1 + (xstart % h))); @@ -2224,7 +2215,7 @@ INT blue; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_one_mcu_rotated_write PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Ting Zhu, Microsoft Corporation */ @@ -2261,7 +2252,7 @@ INT blue; /* */ /* DATE NAME DESCRIPTION */ /* */ -/* xx-xx-xxxx Ting Zhu Initial Version 6.x */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_one_mcu_rotated_write(GX_JPEG_INFO *jpeg_info, INT xpos, INT ypos, INT h, INT v) @@ -2427,7 +2418,7 @@ GX_BYTE sign = 1; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_decompress PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -2465,9 +2456,9 @@ GX_BYTE sign = 1; /* 10-31-2022 Kenneth Maxwell Modified comment(s), */ /* abort if block decode fails,*/ /* resulting in version 6.2.0 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_decompress(GX_JPEG_INFO *jpeg_info) @@ -2542,7 +2533,7 @@ UINT (*one_mcu_write)(GX_JPEG_INFO *jpeg_info, INT xpos, INT ypos, INT h, INT v) /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_decode_blocks PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -2584,9 +2575,9 @@ UINT (*one_mcu_write)(GX_JPEG_INFO *jpeg_info, INT xpos, INT ypos, INT h, INT v) /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), removed */ +/* 10-31-2023 Ting Zhu Modified comment(s), removed */ /* huffman table free logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ static UINT _gx_image_reader_jpeg_decode_blocks(GX_JPEG_INFO *jpeg_info) @@ -2689,7 +2680,7 @@ UINT status = GX_SUCCESS; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_decode PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -2724,9 +2715,9 @@ UINT status = GX_SUCCESS; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_image_reader_jpeg_decode(GX_IMAGE_READER *image_reader, GX_PIXELMAP *outmap) @@ -2794,7 +2785,7 @@ GX_JPEG_INFO *jpeg_info; /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_jpeg_mcu_decode PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -2833,9 +2824,9 @@ GX_JPEG_INFO *jpeg_info; /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_image_reader_jpeg_mcu_decode(GX_CONST GX_UBYTE *read_data, ULONG data_size, @@ -2871,8 +2862,15 @@ GX_JPEG_INFO *jpeg_info; jpeg_info -> gx_jpeg_output_color_format = context -> gx_draw_context_display -> gx_display_color_format; jpeg_info -> gx_jpeg_output_rotation_angle = context -> gx_draw_context_display -> gx_display_rotation_angle; jpeg_info -> gx_jpeg_output_buffer = (GX_UBYTE *)context -> gx_draw_context_memory; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + jpeg_info -> gx_jpeg_output_width = (USHORT)context -> gx_draw_context_canvas -> gx_canvas_memory_width; + jpeg_info -> gx_jpeg_output_height = (USHORT)context -> gx_draw_context_canvas -> gx_canvas_memory_height; + jpeg_info -> gx_jpeg_output_buffer_offset_x = context -> gx_draw_context_offset_x; + jpeg_info -> gx_jpeg_output_buffer_offset_y = context -> gx_draw_context_offset_y; +#else jpeg_info -> gx_jpeg_output_width = (USHORT)context -> gx_draw_context_canvas -> gx_canvas_x_resolution; jpeg_info -> gx_jpeg_output_height = (USHORT)context -> gx_draw_context_canvas -> gx_canvas_y_resolution; +#endif jpeg_info -> gx_jpeg_output_clip = *context -> gx_draw_context_clip; @@ -2882,4 +2880,5 @@ GX_JPEG_INFO *jpeg_info; return status; } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/image/gx_image_reader_start.c b/project/gui/azure/guix/image/gx_image_reader_start.c index 3a2a0d50f..e5d5bc63f 100644 --- a/project/gui/azure/guix/image/gx_image_reader_start.c +++ b/project/gui/azure/guix/image/gx_image_reader_start.c @@ -292,7 +292,7 @@ static UINT _gx_image_reader_pixelmap_info_set(GX_IMAGE_READER *image_reader, GX /* FUNCTION RELEASE */ /* */ /* _gx_image_reader_start PORTABLE C */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -340,9 +340,9 @@ static UINT _gx_image_reader_pixelmap_info_set(GX_IMAGE_READER *image_reader, GX /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ -/* xx-xx-xxxx Ting Zhu Modified comment(s), */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ /* improved logic, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_image_reader_start(GX_IMAGE_READER *image_reader, GX_PIXELMAP *outmap) @@ -517,4 +517,5 @@ GX_BOOL do_compress; return status; } -#endif \ No newline at end of file +#endif + diff --git a/project/gui/azure/guix/multi_line/gx_multi_line_text_button_text_set.c b/project/gui/azure/guix/multi_line/gx_multi_line_text_button_text_set.c index 7ec818c2f..83837125d 100644 --- a/project/gui/azure/guix/multi_line/gx_multi_line_text_button_text_set.c +++ b/project/gui/azure/guix/multi_line/gx_multi_line_text_button_text_set.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_multi_line_text_button_text_set PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -67,14 +67,24 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added return status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ #if defined(GX_ENABLE_DEPRECATED_STRING_API) UINT _gx_multi_line_text_button_text_set(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_CHAR *text) { - _gx_text_button_text_set((GX_TEXT_BUTTON *)button, text); - _gx_multi_line_text_button_line_pointers_set(button); - return GX_SUCCESS; +UINT status; + + status = _gx_text_button_text_set((GX_TEXT_BUTTON *)button, text); + + if (status == GX_SUCCESS) + { + _gx_multi_line_text_button_line_pointers_set(button); + } + + return status; } #endif @@ -83,7 +93,7 @@ UINT _gx_multi_line_text_button_text_set(GX_MULTI_LINE_TEXT_BUTTON *button, GX_ /* FUNCTION RELEASE */ /* */ /* _gx_multi_line_text_button_text_set_ext PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -117,11 +127,20 @@ UINT _gx_multi_line_text_button_text_set(GX_MULTI_LINE_TEXT_BUTTON *button, GX_ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added return status check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_multi_line_text_button_text_set_ext(GX_MULTI_LINE_TEXT_BUTTON *button, GX_CONST GX_STRING *text) { - _gx_text_button_text_set_ext((GX_TEXT_BUTTON *)button, text); - _gx_multi_line_text_button_line_pointers_set(button); - return GX_SUCCESS; +UINT status; + + status = _gx_text_button_text_set_ext((GX_TEXT_BUTTON *)button, text); + + if (status == GX_SUCCESS) + { + _gx_multi_line_text_button_line_pointers_set(button); + } + return status; } diff --git a/project/gui/azure/guix/scrollbar/gx_scrollbar_draw.c b/project/gui/azure/guix/scrollbar/gx_scrollbar_draw.c index 708d68322..ea0c62af5 100644 --- a/project/gui/azure/guix/scrollbar/gx_scrollbar_draw.c +++ b/project/gui/azure/guix/scrollbar/gx_scrollbar_draw.c @@ -37,7 +37,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_scrollbar_draw PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -83,6 +83,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* improved logic, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ VOID _gx_scrollbar_draw(GX_SCROLLBAR *scrollbar) @@ -216,13 +219,15 @@ GX_COLOR fill_color; /* Reset dirty area temporarily to avoid cover the end pixelmap area. */ old_dirty = _gx_system_current_draw_context -> gx_draw_context_dirty; - _gx_utility_rectangle_combine(&old_dirty, &size); - _gx_system_current_draw_context -> gx_draw_context_dirty = size; + if(_gx_utility_rectangle_overlap_detect(&old_dirty, &size, &size) == GX_TRUE) + { + _gx_system_current_draw_context -> gx_draw_context_dirty = size; - _gx_canvas_pixelmap_draw(xpos, ypos, map); + _gx_canvas_pixelmap_draw(xpos, ypos, map); - /* Set dirty area back. */ - _gx_system_current_draw_context -> gx_draw_context_dirty = old_dirty; + /* Set dirty area back. */ + _gx_system_current_draw_context -> gx_draw_context_dirty = old_dirty; + } } } } diff --git a/project/gui/azure/guix/scrollbar/gxe_scrollbar_reset.c b/project/gui/azure/guix/scrollbar/gxe_scrollbar_reset.c index ae5426e2a..84b2ba5c2 100644 --- a/project/gui/azure/guix/scrollbar/gxe_scrollbar_reset.c +++ b/project/gui/azure/guix/scrollbar/gxe_scrollbar_reset.c @@ -34,7 +34,7 @@ GX_CALLER_CHECKING_EXTERNS /* FUNCTION RELEASE */ /* */ /* _gxe_scrollbar_reset PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -71,6 +71,8 @@ GX_CALLER_CHECKING_EXTERNS /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gxe_scrollbar_reset(GX_SCROLLBAR *scrollbar, GX_SCROLL_INFO *info) @@ -92,7 +94,7 @@ UINT status; return(GX_INVALID_WIDGET); } - /* Check fro valid scroll info. */ + /* Check for valid scroll info. */ if ((info != GX_NULL) && ((info -> gx_scroll_value > info -> gx_scroll_maximum) || (info -> gx_scroll_value < info -> gx_scroll_minimum))) { diff --git a/project/gui/azure/guix/system/gx_system_canvas_refresh.c b/project/gui/azure/guix/system/gx_system_canvas_refresh.c index 70d5b2137..d79691de4 100644 --- a/project/gui/azure/guix/system/gx_system_canvas_refresh.c +++ b/project/gui/azure/guix/system/gx_system_canvas_refresh.c @@ -30,13 +30,217 @@ #include "gx_widget.h" #include "gx_utility.h" +/**************************************************************************/ +/* */ +/* FUNCTION RELEASE */ +/* */ +/* _gx_system_canvas_draw_partial_canvas PORTABLE C */ +/* 6.3.0 */ +/* AUTHOR */ +/* */ +/* Ting Zhu, Microsoft Corporation */ +/* */ +/* DESCRIPTION */ +/* */ +/* This function draws the dirty area of the specified canvas with */ +/* partial canvas buffer and toggle the dirty area to the display or */ +/* a composite canvas. */ +/* */ +/* INPUT */ +/* */ +/* None */ +/* */ +/* OUTPUT */ +/* */ +/* None */ +/* */ +/* CALLS */ +/* */ +/* _gx_system_dirty_list_trim Trim dirty area list */ +/* _gx_canvas_drawing_initiate Initiate drawing on canvas */ +/* _gx_widget_children_draw Draw widgets children */ +/* [gx_widget_draw_function] Call widget's drawing function*/ +/* _gx_canvas_drawing_complete Complete drawing on canvas */ +/* _gx_system_canvas_toggle Toggle the frame buffer */ +/* _gx_utility_rectangle_shift Shift a rectangle */ +/* */ +/* CALLED BY */ +/* */ +/* _gx_system_canvas_refresh */ +/* */ +/* RELEASE HISTORY */ +/* */ +/* DATE NAME DESCRIPTION */ +/* */ +/* 10-31-2023 Ting Zhu Initial Version 6.3.0 */ +/* */ +/**************************************************************************/ +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER +static UINT _gx_system_canvas_draw_partial_canvas(GX_WINDOW_ROOT *root) +{ +UINT status = GX_SUCCESS; +GX_RECTANGLE dirty_sum; +GX_RECTANGLE dirty_frame; +UINT index; +GX_WIDGET *drawit; +GX_DIRTY_AREA *dirty_list_entry; +GX_CANVAS *canvas = root -> gx_window_root_canvas; +GX_VALUE dirty_width; +GX_VALUE dirty_height; + +#if defined(GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL) || defined(GX_CANVAS_REFRESH_DIRECTION_VERTICAL) +GX_RECTANGLE dirty_mask; + + if (_gx_system_dirty_list_trim(&dirty_sum, root) == GX_FALSE) + { + return GX_SUCCESS; + } + + dirty_mask = dirty_sum; +#endif + + /* Refresh canvas in the dirty area. */ + if (canvas -> gx_canvas_draw_count > 0) + { + _gx_system_dirty_partial_add((GX_WIDGET *)root, &canvas -> gx_canvas_dirty_area); + canvas -> gx_canvas_draw_count = 0; + } + +#if defined(GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL) + dirty_height = (GX_VALUE)(dirty_sum.gx_rectangle_bottom - dirty_sum.gx_rectangle_top + 1); + dirty_width = (GX_VALUE)(canvas -> gx_canvas_memory_size / canvas -> gx_canvas_display -> gx_display_driver_row_pitch_get((USHORT)dirty_height)); + dirty_width = (GX_VALUE)(dirty_width & 0xFFFC); + dirty_mask.gx_rectangle_right = (GX_VALUE)(dirty_mask.gx_rectangle_left + dirty_width - 1); + + while (dirty_mask.gx_rectangle_left <= dirty_sum.gx_rectangle_right) + { + if (dirty_mask.gx_rectangle_right > dirty_sum.gx_rectangle_right) + { + dirty_mask.gx_rectangle_right = dirty_sum.gx_rectangle_right; + } +#elif defined(GX_CANVAS_REFRESH_DIRECTION_VERTICAL) + dirty_width = (GX_VALUE)(dirty_sum.gx_rectangle_right - dirty_sum.gx_rectangle_left + 1); + dirty_height = (GX_VALUE)(canvas -> gx_canvas_memory_size / canvas -> gx_canvas_display -> gx_display_driver_row_pitch_get((USHORT)((dirty_width + 3) & 0xFFFC))); + dirty_mask.gx_rectangle_bottom = (GX_VALUE)(dirty_mask.gx_rectangle_top + dirty_height - 1); + + while (dirty_mask.gx_rectangle_top <= dirty_sum.gx_rectangle_bottom) + { + if (dirty_mask.gx_rectangle_bottom > dirty_sum.gx_rectangle_bottom) + { + dirty_mask.gx_rectangle_bottom = dirty_sum.gx_rectangle_bottom; + } +#endif + + /* Initialize dirty area pointers. */ + dirty_list_entry = canvas -> gx_canvas_dirty_list; + + /* Loop through dirty areas to redraw as needed. */ + for (index = 0; index < canvas -> gx_canvas_dirty_count; index++) + { + /* Pickup widget associated with dirty area. */ + drawit = dirty_list_entry -> gx_dirty_area_widget; + + /* Is the widget pointer valid? */ + + if (drawit && (drawit -> gx_widget_status & GX_STATUS_VISIBLE)) + { + /* if the object is transparent, we need to draw the parent. + This should not happen, because dircty_partial_add checks + for transparency, but just for safety we test again here */ + + if (drawit -> gx_widget_status & GX_STATUS_TRANSPARENT || + drawit -> gx_widget_style & (GX_STYLE_BORDER_RAISED | GX_STYLE_BORDER_RECESSED)) + { + while (drawit -> gx_widget_parent) + { + drawit = drawit -> gx_widget_parent; + + if (!(drawit -> gx_widget_status & GX_STATUS_TRANSPARENT)) + { + /* we need to start drawing at this non-transparent + background widget */ + + drawit -> gx_widget_status |= GX_STATUS_DIRTY; + break; + } + } + } + +#if defined(GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL) || defined(GX_CANVAS_REFRESH_DIRECTION_VERTICAL) + if (_gx_utility_rectangle_overlap_detect(&dirty_list_entry -> gx_dirty_area_rectangle, &dirty_mask, &dirty_frame) == GX_TRUE && + _gx_utility_rectangle_overlap_detect(&dirty_frame, &drawit -> gx_widget_clip, &dirty_frame) == GX_TRUE) + { +#else + dirty_sum = dirty_list_entry -> gx_dirty_area_rectangle; + if (_gx_utility_rectangle_overlap_detect(&dirty_sum, &drawit -> gx_widget_clip, &dirty_sum) == GX_TRUE) + { + dirty_frame = dirty_sum; + + /* Split dirty area into small pieces. */ + dirty_width = (GX_VALUE)(dirty_frame.gx_rectangle_right - dirty_frame.gx_rectangle_left + 1); + dirty_height = (GX_VALUE)(canvas -> gx_canvas_memory_size / canvas -> gx_canvas_display -> gx_display_driver_row_pitch_get((USHORT)((dirty_width + 3) & 0xFFFC))); + dirty_frame.gx_rectangle_bottom = (GX_VALUE)(dirty_frame.gx_rectangle_top + dirty_height - 1); + + while (dirty_frame.gx_rectangle_top <= dirty_sum.gx_rectangle_bottom) + { + if (dirty_frame.gx_rectangle_bottom > dirty_sum.gx_rectangle_bottom) + { + dirty_frame.gx_rectangle_bottom = dirty_sum.gx_rectangle_bottom; + } +#endif + + /* Initiate drawing on this canvas. */ + status = _gx_canvas_drawing_initiate(canvas, drawit, &dirty_frame); + + if (status == GX_NO_VIEWS) + { + /* If we are attempting to draw the root window and it has no views, + just draw the children of the root */ + + if (drawit -> gx_widget_type == GX_TYPE_ROOT_WINDOW) + { + _gx_widget_children_draw(drawit); + } + } + else + { + drawit -> gx_widget_draw_function(drawit); + } + + /* Indicate that drawing on this canvas is complete. */ + _gx_canvas_drawing_complete(canvas, GX_TRUE); + +#if !defined(GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL) && !defined(GX_CANVAS_REFRESH_DIRECTION_VERTICAL) + _gx_utility_rectangle_shift(&dirty_frame, 0, dirty_height); + } +#endif + } + } + + /* Move to the next dirty area. */ + dirty_list_entry++; + } + +#ifdef GX_CANVAS_REFRESH_DIRECTION_HORIZONTAL + _gx_utility_rectangle_shift(&dirty_mask, dirty_width, 0); +} +#elif defined(GX_CANVAS_REFRESH_DIRECTION_VERTICAL) + _gx_utility_rectangle_shift(&dirty_mask, 0, dirty_height); +} +#endif + +canvas -> gx_canvas_dirty_count = 0; + +return GX_SUCCESS; +} +#endif /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _gx_system_canvas_refresh PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -77,6 +281,10 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added partial canvas buffer */ +/* support, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_system_canvas_refresh(VOID) @@ -119,6 +327,15 @@ GX_WINDOW_ROOT *root; /* pick up the canvas pointer */ canvas = root -> gx_window_root_canvas; +#ifdef GX_ENABLE_CANVAS_PARTIAL_FRAME_BUFFER + if (canvas -> gx_canvas_status & GX_CANVAS_PARTIAL_FRAME_BUFFER) + { + _gx_system_canvas_draw_partial_canvas(root); + root = (GX_WINDOW_ROOT *)root -> gx_widget_next; + continue; + } +#endif + /* Trim any redundant dirty areas prior to doing the update. */ if (_gx_system_dirty_list_trim(&dirty_sum, root)) { @@ -126,20 +343,20 @@ GX_WINDOW_ROOT *root; _gx_canvas_drawing_initiate(canvas, (GX_WIDGET *)root, &dirty_sum); /* Initialize dirty area pointers. */ - dirty = canvas -> gx_canvas_dirty_list; + dirty = canvas -> gx_canvas_dirty_list; /* Loop through dirty areas to redraw as needed. */ for (index = 0; index < canvas -> gx_canvas_dirty_count; index++) { /* Pickup widget associated with dirty area. */ - drawit = dirty -> gx_dirty_area_widget; + drawit = dirty -> gx_dirty_area_widget; /* Is the widget pointer valid? */ if (drawit) { /* if the object is transparent, we need to draw the parent. - This should not happen, because dircty_partial_add checks + This should not happen, because dircty_partial_add checks for transparency, but just for safety we test again here */ if (drawit -> gx_widget_status & GX_STATUS_TRANSPARENT) @@ -152,7 +369,7 @@ GX_WINDOW_ROOT *root; { /* we need to start drawing at this non-transparent background widget */ - + drawit -> gx_widget_status |= GX_STATUS_DIRTY; break; } @@ -196,7 +413,7 @@ GX_WINDOW_ROOT *root; if (_gx_canvas_composite_create(&canvas)) { - if(canvas -> gx_canvas_draw_count > 0) + if (canvas -> gx_canvas_draw_count > 0) { canvas -> gx_canvas_display -> gx_display_driver_buffer_toggle(canvas, &canvas -> gx_canvas_dirty_area); canvas -> gx_canvas_draw_count = 0; diff --git a/project/gui/azure/guix/text_input_cursor/gxe_text_input_cursor_height_set.c b/project/gui/azure/guix/text_input_cursor/gxe_text_input_cursor_height_set.c index 272e01f82..83d236456 100644 --- a/project/gui/azure/guix/text_input_cursor/gxe_text_input_cursor_height_set.c +++ b/project/gui/azure/guix/text_input_cursor/gxe_text_input_cursor_height_set.c @@ -33,7 +33,7 @@ /* FUNCTION RELEASE */ /* */ /* _gxe_text_input_cursor_height_set PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -71,6 +71,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* added invalid height check, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gxe_text_input_cursor_height_set(GX_TEXT_INPUT_CURSOR *cursor_ptr, GX_UBYTE height) @@ -82,6 +85,11 @@ UINT status; return(GX_PTR_ERROR); } + if (height == 0) + { + return(GX_INVALID_VALUE); + } + status = _gx_text_input_cursor_height_set(cursor_ptr, height); return(status); diff --git a/project/gui/azure/guix/window/gx_window_root_create.c b/project/gui/azure/guix/window/gx_window_root_create.c index 83f3c6eca..10ee979e6 100644 --- a/project/gui/azure/guix/window/gx_window_root_create.c +++ b/project/gui/azure/guix/window/gx_window_root_create.c @@ -34,7 +34,7 @@ /* FUNCTION RELEASE */ /* */ /* _gx_window_root_create PORTABLE C */ -/* 6.1 */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* Kenneth Maxwell, Microsoft Corporation */ @@ -74,6 +74,9 @@ /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ /* resulting in version 6.1 */ +/* 10-31-2023 Ting Zhu Modified comment(s), */ +/* updated the link logic, */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ UINT _gx_window_root_create(GX_WINDOW_ROOT *root_window, GX_CONST GX_CHAR *name, @@ -97,15 +100,21 @@ UINT _gx_window_root_create(GX_WINDOW_ROOT *root_window, GX_CONST GX_CHAR *name root_window -> gx_widget_status &= ~GX_STATUS_MOVABLE; root_window -> gx_widget_event_process_function = (UINT (*)(GX_WIDGET *, GX_EVENT *))_gx_window_root_event_process; + GX_ENTER_CRITICAL + if (_gx_system_root_window_created_list) { /* link this root to the one previously created */ root_window -> gx_widget_next = (GX_WIDGET *)_gx_system_root_window_created_list; + + _gx_system_root_window_created_list -> gx_widget_previous = (GX_WIDGET *)root_window; } /* Update the root window pointer */ _gx_system_root_window_created_list = root_window; + GX_EXIT_CRITICAL + /* Return the status from window create. */ return(GX_SUCCESS); } diff --git a/project/gui/azure/threadx/port/tx_cortex_a7_port.h b/project/gui/azure/threadx/port/tx_cortex_a7_port.h index 9cf78a2af..4899294ab 100644 --- a/project/gui/azure/threadx/port/tx_cortex_a7_port.h +++ b/project/gui/azure/threadx/port/tx_cortex_a7_port.h @@ -395,7 +395,7 @@ void tx_thread_vfp_disable(void); #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX SMP/Cortex-A7/GNU Version 6.2.1 *"; + "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX SMP/Cortex-A7/GNU Version 6.3.0 *"; #else extern CHAR _tx_version_id[]; #endif diff --git a/project/gui/azure/threadx/port/tx_linux_gnu_port.h b/project/gui/azure/threadx/port/tx_linux_gnu_port.h index fd14cd9fa..2c8696962 100644 --- a/project/gui/azure/threadx/port/tx_linux_gnu_port.h +++ b/project/gui/azure/threadx/port/tx_linux_gnu_port.h @@ -632,7 +632,7 @@ void _tx_thread_smp_debug_entry_insert(ULONG id, ULONG su #ifdef TX_THREAD_INIT CHAR _tx_version_id[] = - "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX SMP/Linux/gcc Version 6.2.1 *"; + "Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX SMP/Linux/gcc Version 6.3.0 *"; #else extern CHAR _tx_version_id[]; #endif diff --git a/project/gui/azure/threadx/tx_api.h b/project/gui/azure/threadx/tx_api.h index be3ebc3f6..8626fed8e 100644 --- a/project/gui/azure/threadx/tx_api.h +++ b/project/gui/azure/threadx/tx_api.h @@ -26,7 +26,7 @@ /* APPLICATION INTERFACE DEFINITION RELEASE */ /* */ /* tx_api.h PORTABLE SMP */ -/* 6.x */ +/* 6.3.0 */ /* AUTHOR */ /* */ /* William E. Lamie, Microsoft Corporation */ @@ -85,10 +85,10 @@ /* 03-08-2023 Tiejun Zhou Modified comment(s), */ /* update patch number, */ /* resulting in version 6.2.1 */ -/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */ +/* 10-31-2023 Xiuwen Cai Modified comment(s), */ /* added option for random */ /* number stack filling, */ -/* resulting in version 6.x */ +/* resulting in version 6.3.0 */ /* */ /**************************************************************************/ @@ -140,8 +140,8 @@ extern "C" { #define AZURE_RTOS_THREADX #define THREADX_MAJOR_VERSION 6 -#define THREADX_MINOR_VERSION 2 -#define THREADX_PATCH_VERSION 1 +#define THREADX_MINOR_VERSION 3 +#define THREADX_PATCH_VERSION 0 /* Define the following symbol for backward compatibility */ #define EL_PRODUCT_THREADX diff --git a/project/gui/lvgl/drivers/display/drm.c b/project/gui/lvgl/drivers/display/drm.c index 94f35cde5..7a23e5f85 100644 --- a/project/gui/lvgl/drivers/display/drm.c +++ b/project/gui/lvgl/drivers/display/drm.c @@ -3,6 +3,7 @@ #if USE_DRM #include +#include #include #include #include @@ -19,73 +20,60 @@ #include #include -#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) +#define DBG_TAG "drm" -#ifndef drm_print -#define drm_print(msg, ...) fprintf(stderr, msg, ##__VA_ARGS__); -#endif - -#ifndef drm_error -#define drm_error(msg, ...) drm_print("\033[1;31m[DRM][E]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) -#ifndef drm_info -#define drm_info(msg, ...) drm_print("\033[1;32m[DRM][I]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif - -#ifndef drm_debug -#define drm_debug(msg, ...) {}//drm_print("\033[1;34m[DRM][D]: " msg "\033[0m\n", ##__VA_ARGS__) -#endif +#define print(msg, ...) fprintf(stderr, msg, ##__VA_ARGS__); +#define err(msg, ...) print("error: " msg "\n", ##__VA_ARGS__) +#define info(msg, ...) print(msg "\n", ##__VA_ARGS__) +#define dbg(msg, ...) {} //print(DBG_TAG ": " msg "\n", ##__VA_ARGS__) struct drm_buffer { - uint32_t handle; - uint32_t pitch; - uint32_t offset; + uint32_t handle; + uint32_t pitch; + uint32_t offset; unsigned long int size; - void *map; - uint32_t fb_handle; + uint8_t * map; + uint32_t fb_handle; }; struct drm_dev { - int fd; - uint32_t conn_id; - uint32_t enc_id; - uint32_t crtc_id; - uint32_t plane_id; - uint32_t crtc_idx; - uint32_t width, height; - uint32_t mmWidth; - uint32_t mmHeight; - uint32_t fourcc; - drmModeModeInfo mode; - uint32_t blob_id; - drmModeCrtc *saved_crtc; - drmModeAtomicReq *req; - drmEventContext drm_event_ctx; - drmModePlane *plane; - drmModeCrtc *crtc; - drmModeConnector *conn; - uint32_t count_plane_props; - uint32_t count_crtc_props; - uint32_t count_conn_props; + int fd; + uint32_t conn_id, enc_id, crtc_id, plane_id, crtc_idx; + uint32_t width, height; + uint32_t mmWidth, mmHeight; + uint32_t fourcc; + drmModeModeInfo mode; + uint32_t blob_id; + drmModeCrtc *saved_crtc; + drmModeAtomicReq *req; + drmEventContext drm_event_ctx; + drmModePlane *plane; + drmModeCrtc *crtc; + drmModeConnector *conn; + uint32_t count_plane_props; + uint32_t count_crtc_props; + uint32_t count_conn_props; drmModePropertyPtr plane_props[128]; drmModePropertyPtr crtc_props[128]; drmModePropertyPtr conn_props[128]; - struct drm_buffer drm_bufs[2]; - struct drm_buffer *cur_bufs[2]; + struct drm_buffer drm_bufs[2]; /*DUMB buffers*/ + uint8_t active_drm_buf_idx; /*Double buffering handling*/ + lv_disp_draw_buf_t draw_buf; } drm_dev; static uint32_t get_plane_property_id(const char *name) { uint32_t i; - drm_debug("Find plane property:[%s]", name); - for (i = 0; i < drm_dev.count_plane_props; ++i) { - if (!strcmp(drm_dev.plane_props[i]->name, name)) { + dbg("Find plane property: %s", name); + + for (i = 0; i < drm_dev.count_plane_props; ++i) + if (!strcmp(drm_dev.plane_props[i]->name, name)) return drm_dev.plane_props[i]->prop_id; - } - } - drm_debug("Unknown plane property:[%s]", name); + + dbg("Unknown plane property: %s", name); return 0; } @@ -94,13 +82,13 @@ static uint32_t get_crtc_property_id(const char *name) { uint32_t i; - drm_debug("Find crtc property:[%s]", name); - for (i = 0; i < drm_dev.count_crtc_props; ++i) { - if (!strcmp(drm_dev.crtc_props[i]->name, name)) { + dbg("Find crtc property: %s", name); + + for (i = 0; i < drm_dev.count_crtc_props; ++i) + if (!strcmp(drm_dev.crtc_props[i]->name, name)) return drm_dev.crtc_props[i]->prop_id; - } - } - drm_debug("Unknown crtc property:[%s]", name); + + dbg("Unknown crtc property: %s", name); return 0; } @@ -109,18 +97,19 @@ static uint32_t get_conn_property_id(const char *name) { uint32_t i; - drm_debug("Find conn property:[%s]", name); - for (i = 0; i < drm_dev.count_conn_props; ++i) { - if (!strcmp(drm_dev.conn_props[i]->name, name)) { + dbg("Find conn property: %s", name); + + for (i = 0; i < drm_dev.count_conn_props; ++i) + if (!strcmp(drm_dev.conn_props[i]->name, name)) return drm_dev.conn_props[i]->prop_id; - } - } - drm_debug("Unknown conn property:[%s]", name); + + dbg("Unknown conn property: %s", name); return 0; } -static void page_flip_handler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data) +static void page_flip_handler(int fd, unsigned int sequence, unsigned int tv_sec, + unsigned int tv_usec, void *user_data) { LV_UNUSED(fd); LV_UNUSED(sequence); @@ -128,25 +117,29 @@ static void page_flip_handler(int fd, unsigned int sequence, unsigned int tv_sec LV_UNUSED(tv_usec); LV_UNUSED(user_data); - drm_debug("flip"); + dbg("flip"); + + if(drm_dev.req) { + drmModeAtomicFree(drm_dev.req); + drm_dev.req = NULL; + } } static int drm_get_plane_props(void) { uint32_t i; - drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(drm_dev.fd, drm_dev.plane_id, DRM_MODE_OBJECT_PLANE); + drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(drm_dev.fd, drm_dev.plane_id, + DRM_MODE_OBJECT_PLANE); if (!props) { - drm_error("drmModeObjectGetProperties failed"); + err("drmModeObjectGetProperties failed"); return -1; } - - drm_debug("Found [%u] plane props", props->count_props); - + dbg("Found %u plane props", props->count_props); drm_dev.count_plane_props = props->count_props; for (i = 0; i < props->count_props; i++) { drm_dev.plane_props[i] = drmModeGetProperty(drm_dev.fd, props->props[i]); - drm_debug("Added plane prop [%u:%s]", drm_dev.plane_props[i]->prop_id, drm_dev.plane_props[i]->name); + dbg("Added plane prop %u:%s", drm_dev.plane_props[i]->prop_id, drm_dev.plane_props[i]->name); } drmModeFreeObjectProperties(props); @@ -157,18 +150,17 @@ static int drm_get_crtc_props(void) { uint32_t i; - drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(drm_dev.fd, drm_dev.crtc_id, DRM_MODE_OBJECT_CRTC); + drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(drm_dev.fd, drm_dev.crtc_id, + DRM_MODE_OBJECT_CRTC); if (!props) { - drm_error("drmModeObjectGetProperties failed"); + err("drmModeObjectGetProperties failed"); return -1; } - - drm_debug("Found [%u] crtc props", props->count_props); - + dbg("Found %u crtc props", props->count_props); drm_dev.count_crtc_props = props->count_props; for (i = 0; i < props->count_props; i++) { drm_dev.crtc_props[i] = drmModeGetProperty(drm_dev.fd, props->props[i]); - drm_debug("Added crtc prop [%u:%s]", drm_dev.crtc_props[i]->prop_id, drm_dev.crtc_props[i]->name); + dbg("Added crtc prop %u:%s", drm_dev.crtc_props[i]->prop_id, drm_dev.crtc_props[i]->name); } drmModeFreeObjectProperties(props); @@ -179,18 +171,17 @@ static int drm_get_conn_props(void) { uint32_t i; - drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(drm_dev.fd, drm_dev.conn_id, DRM_MODE_OBJECT_CONNECTOR); + drmModeObjectPropertiesPtr props = drmModeObjectGetProperties(drm_dev.fd, drm_dev.conn_id, + DRM_MODE_OBJECT_CONNECTOR); if (!props) { - drm_error("drmModeObjectGetProperties failed"); + err("drmModeObjectGetProperties failed"); return -1; } - - drm_debug("Found [%u] connector props", props->count_props); - + dbg("Found %u connector props", props->count_props); drm_dev.count_conn_props = props->count_props; for (i = 0; i < props->count_props; i++) { drm_dev.conn_props[i] = drmModeGetProperty(drm_dev.fd, props->props[i]); - drm_debug("Added connector prop [%u:%s]", drm_dev.conn_props[i]->prop_id, drm_dev.conn_props[i]->name); + dbg("Added connector prop %u:%s", drm_dev.conn_props[i]->prop_id, drm_dev.conn_props[i]->name); } drmModeFreeObjectProperties(props); @@ -203,13 +194,13 @@ static int drm_add_plane_property(const char *name, uint64_t value) uint32_t prop_id = get_plane_property_id(name); if (!prop_id) { - drm_error("Couldn't find plane prop:[%s]", name); + err("Couldn't find plane prop %s", name); return -1; } ret = drmModeAtomicAddProperty(drm_dev.req, drm_dev.plane_id, get_plane_property_id(name), value); if (ret < 0) { - drm_error("drmModeAtomicAddProperty (%s:%" PRIu64 ") failed, return:[%d]", name, value, ret); + err("drmModeAtomicAddProperty (%s:%" PRIu64 ") failed: %d", name, value, ret); return ret; } @@ -222,13 +213,13 @@ static int drm_add_crtc_property(const char *name, uint64_t value) uint32_t prop_id = get_crtc_property_id(name); if (!prop_id) { - drm_error("Couldn't find crtc prop:[%s]", name); + err("Couldn't find crtc prop %s", name); return -1; } ret = drmModeAtomicAddProperty(drm_dev.req, drm_dev.crtc_id, get_crtc_property_id(name), value); if (ret < 0) { - drm_error("drmModeAtomicAddProperty (%s:%" PRIu64 ") failed, return:[%d]", name, value, ret); + err("drmModeAtomicAddProperty (%s:%" PRIu64 ") failed: %d", name, value, ret); return ret; } @@ -241,13 +232,13 @@ static int drm_add_conn_property(const char *name, uint64_t value) uint32_t prop_id = get_conn_property_id(name); if (!prop_id) { - drm_error("Couldn't find conn prop:[%s]", name); + err("Couldn't find conn prop %s", name); return -1; } ret = drmModeAtomicAddProperty(drm_dev.req, drm_dev.conn_id, get_conn_property_id(name), value); if (ret < 0) { - drm_error("drmModeAtomicAddProperty (%s:%" PRIu64 ") failed, return:[%d]", name, value, ret); + err("drmModeAtomicAddProperty (%s:%" PRIu64 ") failed: %d", name, value, ret); return ret; } @@ -258,17 +249,19 @@ static int drm_dmabuf_set_plane(struct drm_buffer *buf) { int ret; static int first = 1; - uint32_t flags = DRM_MODE_PAGE_FLIP_EVENT; + uint32_t flags = DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_NONBLOCK; drm_dev.req = drmModeAtomicAlloc(); - // 在第一次原子提交时,做一个模式集 + /* On first Atomic commit, do a modeset */ if (first) { drm_add_conn_property("CRTC_ID", drm_dev.crtc_id); + drm_add_crtc_property("MODE_ID", drm_dev.blob_id); drm_add_crtc_property("ACTIVE", 1); flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; + first = 0; } @@ -285,7 +278,7 @@ static int drm_dmabuf_set_plane(struct drm_buffer *buf) ret = drmModeAtomicCommit(drm_dev.fd, drm_dev.req, flags, NULL); if (ret) { - drm_error("drmModeAtomicCommit failed, errstr:[%s]", strerror(errno)); + err("drmModeAtomicCommit failed: %s", strerror(errno)); drmModeAtomicFree(drm_dev.req); return ret; } @@ -296,25 +289,25 @@ static int drm_dmabuf_set_plane(struct drm_buffer *buf) static int find_plane(unsigned int fourcc, uint32_t *plane_id, uint32_t crtc_id, uint32_t crtc_idx) { LV_UNUSED(crtc_id); - - int ret = 0; - unsigned int i, j; - drmModePlanePtr plane; drmModePlaneResPtr planes; + drmModePlanePtr plane; + unsigned int i; + unsigned int j; + int ret = 0; unsigned int format = fourcc; planes = drmModeGetPlaneResources(drm_dev.fd); if (!planes) { - drm_error("drmModeGetPlaneResources failed"); + err("drmModeGetPlaneResources failed"); return -1; } - drm_debug("found planes count:[%u]", planes->count_planes); + dbg("drm: found planes %u", planes->count_planes); for (i = 0; i < planes->count_planes; ++i) { plane = drmModeGetPlane(drm_dev.fd, planes->planes[i]); if (!plane) { - drm_error("drmModeGetPlane failed, errstr:[%s]", strerror(errno)); + err("drmModeGetPlane failed: %s", strerror(errno)); break; } @@ -324,9 +317,8 @@ static int find_plane(unsigned int fourcc, uint32_t *plane_id, uint32_t crtc_id, } for (j = 0; j < plane->count_formats; ++j) { - if (plane->formats[j] == format) { + if (plane->formats[j] == format) break; - } } if (j == plane->count_formats) { @@ -337,81 +329,81 @@ static int find_plane(unsigned int fourcc, uint32_t *plane_id, uint32_t crtc_id, *plane_id = plane->plane_id; drmModeFreePlane(plane); - drm_debug("found plane:[%d]", *plane_id); + dbg("found plane %d", *plane_id); break; } - if (i == planes->count_planes) { + if (i == planes->count_planes) ret = -1; - } drmModeFreePlaneResources(planes); + return ret; } static int drm_find_connector(void) { - int i; - drmModeRes *res; - drmModeEncoder *enc = NULL; drmModeConnector *conn = NULL; + drmModeEncoder *enc = NULL; + drmModeRes *res; + int i; if ((res = drmModeGetResources(drm_dev.fd)) == NULL) { - drm_error("drmModeGetResources failed, fd:[%d] failed", drm_dev.fd); + err("drmModeGetResources() failed"); return -1; } if (res->count_crtcs <= 0) { - drm_error("no Crtcs"); + err("no Crtcs"); goto free_res; } - // 找到所有可用的连接器 + /* find all available connectors */ for (i = 0; i < res->count_connectors; i++) { conn = drmModeGetConnector(drm_dev.fd, res->connectors[i]); - if (!conn) { + if (!conn) continue; - } -#if (DRM_CONNECTOR_ID >= 0) +#if DRM_CONNECTOR_ID >= 0 if (conn->connector_id != DRM_CONNECTOR_ID) { drmModeFreeConnector(conn); continue; } #endif + if (conn->connection == DRM_MODE_CONNECTED) { - drm_debug("connector id:[%d] connected", conn->connector_id); + dbg("drm: connector %d: connected", conn->connector_id); } else if (conn->connection == DRM_MODE_DISCONNECTED) { - drm_debug("connector id:[%d] disconnected", conn->connector_id); + dbg("drm: connector %d: disconnected", conn->connector_id); } else if (conn->connection == DRM_MODE_UNKNOWNCONNECTION) { - drm_debug("connector id:[%d] unknownconnection", conn->connector_id); + dbg("drm: connector %d: unknownconnection", conn->connector_id); } else { - drm_debug("connector id:[%d] unknown", conn->connector_id); + dbg("drm: connector %d: unknown", conn->connector_id); } - if ((conn->connection == DRM_MODE_CONNECTED) && (conn->count_modes > 0)) { + if (conn->connection == DRM_MODE_CONNECTED && conn->count_modes > 0) break; - } drmModeFreeConnector(conn); conn = NULL; }; if (!conn) { - drm_error("suitable connector not found"); + err("suitable connector not found"); goto free_res; } drm_dev.conn_id = conn->connector_id; - drm_debug("conn_id:[%d]", drm_dev.conn_id); + dbg("conn_id: %d", drm_dev.conn_id); drm_dev.mmWidth = conn->mmWidth; drm_dev.mmHeight = conn->mmHeight; - memcpy(&drm_dev.mode, &conn->modes[0], sizeof(drmModeModeInfo)); + lv_memcpy(&drm_dev.mode, &conn->modes[0], sizeof(drmModeModeInfo)); - if (drmModeCreatePropertyBlob(drm_dev.fd, &drm_dev.mode, sizeof(drm_dev.mode), &drm_dev.blob_id)) { - drm_error("error creating mode blob, errstr:[%m]"); + if (drmModeCreatePropertyBlob(drm_dev.fd, &drm_dev.mode, sizeof(drm_dev.mode), + &drm_dev.blob_id)) { + err("error creating mode blob"); goto free_res; } @@ -420,15 +412,13 @@ static int drm_find_connector(void) for (i = 0 ; i < res->count_encoders; i++) { enc = drmModeGetEncoder(drm_dev.fd, res->encoders[i]); - if (!enc) { + if (!enc) continue; - } - drm_debug("enc:[%d] enc_id:[%d] conn enc_id:[%d]", i, enc->encoder_id, conn->encoder_id); + dbg("enc%d enc_id %d conn enc_id %d", i, enc->encoder_id, conn->encoder_id); - if (enc->encoder_id == conn->encoder_id) { + if (enc->encoder_id == conn->encoder_id) break; - } drmModeFreeEncoder(enc); enc = NULL; @@ -436,35 +426,35 @@ static int drm_find_connector(void) if (enc) { drm_dev.enc_id = enc->encoder_id; - drm_debug("enc_id:[%d]", drm_dev.enc_id); + dbg("enc_id: %d", drm_dev.enc_id); drm_dev.crtc_id = enc->crtc_id; - drm_debug("crtc_id:[%d]", drm_dev.crtc_id); + dbg("crtc_id: %d", drm_dev.crtc_id); drmModeFreeEncoder(enc); } else { - // 编码器尚未关联,查找 + /* Encoder hasn't been associated yet, look it up */ for (i = 0; i < conn->count_encoders; i++) { int crtc, crtc_id = -1; enc = drmModeGetEncoder(drm_dev.fd, conn->encoders[i]); - if (!enc) { + if (!enc) continue; - } - for (crtc = 0; crtc < res->count_crtcs; crtc++) { + for (crtc = 0 ; crtc < res->count_crtcs; crtc++) { uint32_t crtc_mask = 1 << crtc; crtc_id = res->crtcs[crtc]; - drm_debug("enc_id:[%d] crtc:[%d] id:[%d] mask:[%X] possible:[%X]", enc->encoder_id, crtc, crtc_id, crtc_mask, enc->possible_crtcs); - if (enc->possible_crtcs & crtc_mask) { + + dbg("enc_id %d crtc%d id %d mask %x possible %x", enc->encoder_id, crtc, crtc_id, crtc_mask, enc->possible_crtcs); + + if (enc->possible_crtcs & crtc_mask) break; - } } if (crtc_id > 0) { drm_dev.enc_id = enc->encoder_id; - drm_debug("enc_id:[%d]", drm_dev.enc_id); + dbg("enc_id: %d", drm_dev.enc_id); drm_dev.crtc_id = crtc_id; - drm_debug("crtc_id:[%d]", drm_dev.crtc_id); + dbg("crtc_id: %d", drm_dev.crtc_id); break; } @@ -473,7 +463,7 @@ static int drm_find_connector(void) } if (!enc) { - drm_error("suitable encoder not found"); + err("suitable encoder not found"); goto free_res; } @@ -490,44 +480,49 @@ static int drm_find_connector(void) } if (drm_dev.crtc_idx == UINT32_MAX) { - drm_error("drm: CRTC not found"); + err("drm: CRTC not found"); goto free_res; } - drm_debug("crtc_idx:[%d]", drm_dev.crtc_idx); + dbg("crtc_idx: %d", drm_dev.crtc_idx); + return 0; free_res: drmModeFreeResources(res); + return -1; } static int drm_open(const char *path) { - int ret; int fd, flags; uint64_t has_dumb; + int ret; - fd = open(path, DRM_CLOEXEC | DRM_RDWR); + fd = open(path, O_RDWR); if (fd < 0) { - drm_error("cannot open \"%s\", errstr:[%m]", path); + err("cannot open \"%s\"", path); return -1; } - if (((flags = fcntl(fd, F_GETFD)) < 0) || (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0)) { - drm_error("fcntl FD_CLOEXEC failed, errstr:[%m]"); - goto drm_error; + /* set FD_CLOEXEC flag */ + if ((flags = fcntl(fd, F_GETFD)) < 0 || + fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) { + err("fcntl FD_CLOEXEC failed"); + goto err; } + /* check capability */ ret = drmGetCap(fd, DRM_CAP_DUMB_BUFFER, &has_dumb); - if ((ret < 0) || (has_dumb == 0)) { - drm_error("drmGetCap DRM_CAP_DUMB_BUFFER failed or \"%s\" doesn't have dumb buffer", path); - goto drm_error; + if (ret < 0 || has_dumb == 0) { + err("drmGetCap DRM_CAP_DUMB_BUFFER failed or \"%s\" doesn't have dumb " + "buffer", path); + goto err; } return fd; - -drm_error: +err: close(fd); return -1; } @@ -538,135 +533,137 @@ static int drm_setup(unsigned int fourcc) const char *device_path = NULL; device_path = getenv("DRM_CARD"); - if (!device_path) { + if (!device_path) device_path = DRM_CARD; - } drm_dev.fd = drm_open(device_path); - if (drm_dev.fd < 0) { + if (drm_dev.fd < 0) return -1; - } ret = drmSetClientCap(drm_dev.fd, DRM_CLIENT_CAP_ATOMIC, 1); if (ret) { - drm_error("No atomic modesetting support, errstr:[%s]", strerror(errno)); - goto drm_error; + err("No atomic modesetting support: %s", strerror(errno)); + goto err; } ret = drm_find_connector(); if (ret) { - drm_error("available drm devices not found"); - goto drm_error; + err("available drm devices not found"); + goto err; } ret = find_plane(fourcc, &drm_dev.plane_id, drm_dev.crtc_id, drm_dev.crtc_idx); if (ret) { - drm_error("Cannot find plane"); - goto drm_error; + err("Cannot find plane"); + goto err; } drm_dev.plane = drmModeGetPlane(drm_dev.fd, drm_dev.plane_id); if (!drm_dev.plane) { - drm_error("Cannot get plane"); - goto drm_error; + err("Cannot get plane"); + goto err; } drm_dev.crtc = drmModeGetCrtc(drm_dev.fd, drm_dev.crtc_id); if (!drm_dev.crtc) { - drm_error("Cannot get crtc"); - goto drm_error; + err("Cannot get crtc"); + goto err; } drm_dev.conn = drmModeGetConnector(drm_dev.fd, drm_dev.conn_id); if (!drm_dev.conn) { - drm_error("Cannot get connector"); - goto drm_error; + err("Cannot get connector"); + goto err; } ret = drm_get_plane_props(); if (ret) { - drm_error("Cannot get plane props"); - goto drm_error; + err("Cannot get plane props"); + goto err; } ret = drm_get_crtc_props(); if (ret) { - drm_error("Cannot get crtc props"); - goto drm_error; + err("Cannot get crtc props"); + goto err; } ret = drm_get_conn_props(); if (ret) { - drm_error("Cannot get connector props"); - goto drm_error; + err("Cannot get connector props"); + goto err; } drm_dev.drm_event_ctx.version = DRM_EVENT_CONTEXT_VERSION; drm_dev.drm_event_ctx.page_flip_handler = page_flip_handler; drm_dev.fourcc = fourcc; - drm_info("Found plane_id:[%u] connector_id:[%d] crtc_id:[%d]", drm_dev.plane_id, drm_dev.conn_id, drm_dev.crtc_id); - drm_info("wxh:[%dx%d]-(%dmm X %dmm) pixel format:[%c%c%c%c]", drm_dev.width, drm_dev.height, drm_dev.mmWidth, drm_dev.mmHeight, (fourcc >> 0) & 0xFF, (fourcc >> 8) & 0xFF, (fourcc >> 16) & 0xFF, (fourcc >> 24) & 0xFF); + info("drm: Found plane_id: %u connector_id: %d crtc_id: %d", + drm_dev.plane_id, drm_dev.conn_id, drm_dev.crtc_id); + + info("drm: %dx%d (%dmm X% dmm) pixel format %c%c%c%c", + drm_dev.width, drm_dev.height, drm_dev.mmWidth, drm_dev.mmHeight, + (fourcc>>0)&0xff, (fourcc>>8)&0xff, (fourcc>>16)&0xff, (fourcc>>24)&0xff); return 0; -drm_error: +err: close(drm_dev.fd); return -1; } static int drm_allocate_dumb(struct drm_buffer *buf) { - int ret; - struct drm_mode_map_dumb mreq; struct drm_mode_create_dumb creq; + struct drm_mode_map_dumb mreq; uint32_t handles[4] = {0}, pitches[4] = {0}, offsets[4] = {0}; + int ret; - // 创建哑缓冲区 - memset(&creq, 0x00, sizeof(creq)); + /* create dumb buffer */ + lv_memset(&creq, 0, sizeof(creq)); creq.width = drm_dev.width; creq.height = drm_dev.height; creq.bpp = LV_COLOR_DEPTH; - ret = drmIoctl(drm_dev.fd, DRM_IOCTL_MODE_CREATE_DUMB, &creq); if (ret < 0) { - drm_error("DRM_IOCTL_MODE_CREATE_DUMB failed, return:[%d], errstr:[%m]", ret); + err("DRM_IOCTL_MODE_CREATE_DUMB fail"); return -1; } buf->handle = creq.handle; buf->pitch = creq.pitch; buf->size = creq.size; - drm_debug("pitch:[%d], size:[%d]", buf->pitch, (int)buf->size); - // 为内存映射准备缓冲区 - memset(&mreq, 0x00, sizeof(mreq)); + /* prepare buffer for memory mapping */ + lv_memset(&mreq, 0, sizeof(mreq)); mreq.handle = creq.handle; ret = drmIoctl(drm_dev.fd, DRM_IOCTL_MODE_MAP_DUMB, &mreq); if (ret) { - drm_error("DRM_IOCTL_MODE_MAP_DUMB failed, return:[%d], errstr:[%m]", ret); + err("DRM_IOCTL_MODE_MAP_DUMB fail"); return -1; } buf->offset = mreq.offset; + info("size %lu pitch %u offset %u", buf->size, buf->pitch, buf->offset); - // 执行实际的内存映射 + /* perform actual memory mapping */ buf->map = mmap(0, creq.size, PROT_READ | PROT_WRITE, MAP_SHARED, drm_dev.fd, mreq.offset); if (buf->map == MAP_FAILED) { - drm_error("mmap fail, errstr:[%m]"); + err("mmap fail"); return -1; } - // 将帧缓冲区清除为0(=ARGB8888中的完全透明) - memset(buf->map, 0x00, creq.size); + /* clear the framebuffer to 0 (= full transparency in ARGB8888) */ + lv_memset(buf->map, 0, creq.size); - // 为哑缓冲区创建帧缓冲区对象 + /* create framebuffer object for the dumb-buffer */ handles[0] = creq.handle; pitches[0] = creq.pitch; offsets[0] = 0; - ret = drmModeAddFB2(drm_dev.fd, drm_dev.width, drm_dev.height, drm_dev.fourcc, handles, pitches, offsets, &buf->fb_handle, 0); + ret = drmModeAddFB2(drm_dev.fd, drm_dev.width, drm_dev.height, drm_dev.fourcc, + handles, pitches, offsets, &buf->fb_handle, 0); if (ret) { - drm_error("drmModeAddFB2 failed, return:[%d], errstr:[%m]", ret); + err("drmModeAddFB fail"); return -1; } @@ -677,118 +674,89 @@ static int drm_setup_buffers(void) { int ret; - // 分配DUMB缓冲区 + /*Allocate DUMB buffers*/ ret = drm_allocate_dumb(&drm_dev.drm_bufs[0]); - if (ret) { + if (ret) return ret; - } ret = drm_allocate_dumb(&drm_dev.drm_bufs[1]); - if (ret) { + if (ret) return ret; - } - - // 设置缓冲处理 - drm_dev.cur_bufs[0] = NULL; - drm_dev.cur_bufs[1] = &drm_dev.drm_bufs[0]; return 0; } -void drm_wait_vsync(lv_display_t *disp_drv) +void drm_wait_vsync(lv_disp_drv_t * disp_drv) { - LV_UNUSED(disp_drv); - - int ret; - fd_set fds; - - FD_ZERO(&fds); - FD_SET(drm_dev.fd, &fds); - - do { - ret = select(drm_dev.fd + 1, &fds, NULL, NULL, NULL); - } while ((ret == -1) && (errno == EINTR)); - - if (ret < 0) { - drm_error("select failed, errstr:[%s]", strerror(errno)); - drmModeAtomicFree(drm_dev.req); - drm_dev.req = NULL; - - return; - } - - if (FD_ISSET(drm_dev.fd, &fds)) { - drmHandleEvent(drm_dev.fd, &drm_dev.drm_event_ctx); + while(drm_dev.req) { + struct pollfd pfd; + pfd.fd = drm_dev.fd; + pfd.events = POLLIN; + + int ret; + do { + ret = poll(&pfd, 1, -1); + } while (ret == -1 && errno == EINTR); + + if(ret > 0) + drmHandleEvent(drm_dev.fd, &drm_dev.drm_event_ctx); + else { + err("poll failed: %s", strerror(errno)); + return; + } } - drmModeAtomicFree(drm_dev.req); - drm_dev.req = NULL; + lv_disp_flush_ready(disp_drv); } -void drm_flush(lv_display_t *disp_drv, const lv_area_t *area, uint8_t *color_p) +void drm_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, uint8_t * color_p) { - int i, y; - uint32_t w = (area->x2 - area->x1 + 1); - uint32_t h = (area->y2 - area->y1 + 1); - struct drm_buffer *fbuf = drm_dev.cur_bufs[1]; - - drm_debug("x1:[%d] x2:[%d] y1:[%d] y2:[%d] w:[%d] h:[%d]", area->x1, area->x2, area->y1, area->y2, w, h); - - // 部分更新 - if (((w != drm_dev.width) || (h != drm_dev.height)) && drm_dev.cur_bufs[0]) { - memcpy(fbuf->map, drm_dev.cur_bufs[0]->map, fbuf->size); - } - - for (y = 0, i = area->y1 ; i <= area->y2 ; ++i, ++y) { - memcpy((uint8_t *)fbuf->map + (area->x1 * (LV_COLOR_SIZE / 8)) + (fbuf->pitch * i), (uint8_t *)color_p + (w * (LV_COLOR_SIZE / 8) * y), w * (LV_COLOR_SIZE / 8)); - } - - if (drm_dev.req) { - drm_wait_vsync(disp_drv); + struct drm_buffer *fbuf = &drm_dev.drm_bufs[drm_dev.active_drm_buf_idx ^ 1]; + + if(!disp_drv->direct_mode) { + /*Backwards compatibility: Non-direct flush */ + uint32_t w = (area->x2 - area->x1) + 1; + for (int y = 0, i = area->y1; i <= area->y2 ; ++i, ++y) { + lv_memcpy(fbuf->map + (area->x1 * (LV_COLOR_SIZE / 8)) + (fbuf->pitch * i), + (uint8_t *)color_p + (w * (LV_COLOR_SIZE / 8) * y), + w * (LV_COLOR_SIZE / 8)); + } } - // 显示fbuf平面 - if (drm_dmabuf_set_plane(fbuf)) { - drm_error("Flush fail"); - return; - } else { - drm_debug("Flush done"); - } + if(lv_disp_flush_is_last(disp_drv)) { + /*Request buffer swap*/ + if(drm_dmabuf_set_plane(fbuf)) { + err("Flush fail"); + return; + } + else + dbg("Flush done"); - if (!drm_dev.cur_bufs[0]) { - drm_dev.cur_bufs[1] = &drm_dev.drm_bufs[1]; - } else { - drm_dev.cur_bufs[1] = drm_dev.cur_bufs[0]; + drm_dev.active_drm_buf_idx ^= 1; } - drm_dev.cur_bufs[0] = fbuf; - - lv_display_flush_ready(disp_drv); } -#if (LV_COLOR_DEPTH == 32) -#define DRM_FOURCC DRM_FORMAT_XRGB8888 -#elif (LV_COLOR_DEPTH == 16) -#define DRM_FOURCC DRM_FORMAT_RGB565 +#if LV_COLOR_DEPTH == 32 +#define DRM_FOURCC DRM_FORMAT_XRGB8888 +#elif LV_COLOR_DEPTH == 16 +#define DRM_FOURCC DRM_FORMAT_RGB565 #else #error LV_COLOR_DEPTH not supported #endif void drm_get_sizes(lv_coord_t *width, lv_coord_t *height, uint32_t *dpi) { - if (width) { + if (width) *width = drm_dev.width; - } - if (height) { + if (height) *height = drm_dev.height; - } - if (dpi && drm_dev.mmWidth) { + if (dpi && drm_dev.mmWidth) *dpi = DIV_ROUND_UP(drm_dev.width * 25400, drm_dev.mmWidth * 1000); - } } -void drm_init(void) +int drm_init(void) { int ret; @@ -796,20 +764,36 @@ void drm_init(void) if (ret) { close(drm_dev.fd); drm_dev.fd = -1; - - return; + return -1; } ret = drm_setup_buffers(); if (ret) { - drm_error("DRM buffer allocation failed"); + err("DRM buffer allocation failed"); close(drm_dev.fd); drm_dev.fd = -1; - - return; + return -1; } - drm_info("DRM subsystem and buffer mapped successfully"); + info("DRM subsystem and buffer mapped successfully"); + return 0; +} + +int drm_disp_drv_init(lv_disp_drv_t * disp_drv) +{ + lv_disp_drv_init(disp_drv); + + int ret = drm_init(); + if(ret) return ret; + + lv_disp_draw_buf_init(&drm_dev.draw_buf, drm_dev.drm_bufs[1].map, drm_dev.drm_bufs[0].map, drm_dev.width * drm_dev.height); + disp_drv->draw_buf = &drm_dev.draw_buf; + disp_drv->direct_mode = true; + disp_drv->hor_res = drm_dev.width; + disp_drv->ver_res = drm_dev.height; + disp_drv->flush_cb = drm_flush; + disp_drv->wait_cb = drm_wait_vsync; + return 0; } void drm_exit(void) @@ -818,4 +802,4 @@ void drm_exit(void) drm_dev.fd = -1; } -#endif +#endif \ No newline at end of file diff --git a/project/gui/lvgl/drivers/display/drm.h b/project/gui/lvgl/drivers/display/drm.h index e8a3dffc4..ba84e534a 100644 --- a/project/gui/lvgl/drivers/display/drm.h +++ b/project/gui/lvgl/drivers/display/drm.h @@ -23,12 +23,14 @@ extern "C" { #include "../../src/display/lv_display.h" #endif -void drm_init(void); +int drm_init(void); void drm_exit(void); +int drm_disp_drv_init(lv_disp_drv_t *disp_drv); +void drm_get_sizes(lv_coord_t *width, lv_coord_t *height, uint32_t *dpi); + void drm_wait_vsync(lv_display_t *drv); void drm_flush(lv_display_t *drv, const lv_area_t *area, uint8_t *color_p); -void drm_get_sizes(lv_coord_t *width, lv_coord_t *height, uint32_t *dpi); #endif diff --git a/project/gui/lvgl/drivers/indev/evdev.c b/project/gui/lvgl/drivers/indev/evdev.c index d6e5e68ab..a9de292d7 100644 --- a/project/gui/lvgl/drivers/indev/evdev.c +++ b/project/gui/lvgl/drivers/indev/evdev.c @@ -5,6 +5,7 @@ #include #include #include +#include #if USE_BSD_EVDEV #include @@ -16,217 +17,198 @@ #include "xkb.h" #endif -int evdev_root_x; -int evdev_root_y; -int evdev_button; -int evdev_key_val; -int evdev_fd = -1; +evdev_device_t global_dsc; -int map(int x, int in_min, int in_max, int out_min, int out_max); +/********************** + * STATIC FUNCTIONS + **********************/ -void evdev_init(void) +static int _evdev_process_key(uint16_t code, bool pressed) { - if (!evdev_set_file(EVDEV_NAME)) { - return; +#if USE_XKB + return xkb_process_key(code, pressed); +#else + LV_UNUSED(pressed); + switch(code) { + case KEY_UP: + return LV_KEY_UP; + case KEY_DOWN: + return LV_KEY_DOWN; + case KEY_RIGHT: + return LV_KEY_RIGHT; + case KEY_LEFT: + return LV_KEY_LEFT; + case KEY_ESC: + return LV_KEY_ESC; + case KEY_DELETE: + return LV_KEY_DEL; + case KEY_BACKSPACE: + return LV_KEY_BACKSPACE; + case KEY_ENTER: + return LV_KEY_ENTER; + case KEY_NEXT: + case KEY_TAB: + return LV_KEY_NEXT; + case KEY_PREVIOUS: + return LV_KEY_PREV; + case KEY_HOME: + return LV_KEY_HOME; + case KEY_END: + return LV_KEY_END; + default: + return 0; } +#endif /*USE_XKB*/ +} -#if USE_XKB - xkb_init(); -#endif +static int _evdev_calibrate(int v, int in_min, int in_max, int out_min, int out_max) +{ + if(in_min != in_max) v = (v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; + return LV_CLAMP(out_min, v, out_max); } -bool evdev_set_file(char *dev_name) -{ - if (evdev_fd != -1) { - close(evdev_fd); - } +static lv_point_t _evdev_process_pointer(lv_indev_drv_t * drv, int x, int y) +{ + evdev_device_t * dsc = drv->user_data ? drv->user_data : &global_dsc; -#if USE_BSD_EVDEV - evdev_fd = open(dev_name, O_RDWR | O_NOCTTY); -#else - evdev_fd = open(dev_name, O_RDWR | O_NOCTTY | O_NDELAY); -#endif + int swapped_x = dsc->swap_axes ? y : x; + int swapped_y = dsc->swap_axes ? x : y; - if(evdev_fd == -1) { - perror("unable to open evdev interface:"); - return false; - } + int offset_x = 0; /*Not lv_disp_get_offset_x(drv->disp) for bc*/ + int offset_y = 0; /*Not lv_disp_get_offset_y(drv->disp) for bc*/ + int width = lv_disp_get_hor_res(drv->disp); + int height = lv_disp_get_ver_res(drv->disp); -#if USE_BSD_EVDEV - fcntl(evdev_fd, F_SETFL, O_NONBLOCK); -#else - fcntl(evdev_fd, F_SETFL, O_ASYNC | O_NONBLOCK); -#endif + lv_point_t p; + p.x = _evdev_calibrate(swapped_x, dsc->hor_min, dsc->hor_max, offset_x, offset_x + width - 1); + p.y = _evdev_calibrate(swapped_y, dsc->ver_min, dsc->ver_max, offset_y, offset_y + height - 1); + return p; +} - evdev_root_x = 0; - evdev_root_y = 0; - evdev_key_val = 0; - evdev_button = LV_INDEV_STATE_RELEASED; +/********************** + * GLOBAL FUNCTIONS + **********************/ - return true; +void evdev_init() +{ + evdev_device_init(&global_dsc); +#ifdef EVDEV_SWAP_AXES + evdev_device_set_swap_axes(&global_dsc, EVDEV_SWAP_AXES); +#endif +#if EVDEV_CALIBRATE + evdev_device_set_calibration(&global_dsc, EVDEV_HOR_MIN, EVDEV_VER_MIN, EVDEV_HOR_MAX, EVDEV_VER_MAX); +#endif + evdev_device_set_file(&global_dsc, EVDEV_NAME); } -void evdev_read(lv_indev_t *drv, lv_indev_data_t *data) +void evdev_device_init(evdev_device_t * dsc) { - struct input_event in; + lv_memset(dsc, 0, sizeof(evdev_device_t)); + dsc->fd = -1; - while (read(evdev_fd, &in, sizeof(struct input_event)) > 0) { - if (in.type == EV_REL) { - if (in.code == REL_X) { -#if EVDEV_SWAP_AXES - evdev_root_y += in.value; -#else - evdev_root_x += in.value; -#endif - } else if (in.code == REL_Y) { -#if EVDEV_SWAP_AXES - evdev_root_x += in.value; -#else - evdev_root_y += in.value; -#endif - } - } else if (in.type == EV_ABS) { - if (in.code == ABS_X) { -#if EVDEV_SWAP_AXES - evdev_root_y = in.value; -#else - evdev_root_x = in.value; -#endif - } else if (in.code == ABS_Y) { -#if EVDEV_SWAP_AXES - evdev_root_x = in.value; -#else - evdev_root_y = in.value; -#endif - } else if (in.code == ABS_MT_POSITION_X) { -#if EVDEV_SWAP_AXES - evdev_root_y = in.value; -#else - evdev_root_x = in.value; -#endif - } else if (in.code == ABS_MT_POSITION_Y) { -#if EVDEV_SWAP_AXES - evdev_root_x = in.value; -#else - evdev_root_y = in.value; -#endif - } else if (in.code == ABS_MT_TRACKING_ID) { - if (in.value == -1) { - evdev_button = LV_INDEV_STATE_RELEASED; - } else if (in.value == 0) { - evdev_button = LV_INDEV_STATE_PRESSED; - } - } - } else if (in.type == EV_KEY) { - if ((in.code == BTN_MOUSE) || (in.code == BTN_TOUCH)) { - if (in.value == 0) { - evdev_button = LV_INDEV_STATE_RELEASED; - } else if (in.value == 1) { - evdev_button = LV_INDEV_STATE_PRESSED; - } - } else if (drv->type == LV_INDEV_TYPE_KEYPAD) { #if USE_XKB - data->key = xkb_process_key(in.code, in.value != 0); -#else - switch (in.code) { - case KEY_BACKSPACE: - data->key = LV_KEY_BACKSPACE; - break; - - case KEY_ENTER: - data->key = LV_KEY_ENTER; - break; - - case KEY_PREVIOUS: - data->key = LV_KEY_PREV; - break; - - case KEY_NEXT: - data->key = LV_KEY_NEXT; - break; - - case KEY_UP: - data->key = LV_KEY_UP; - break; - - case KEY_LEFT: - data->key = LV_KEY_LEFT; - break; - - case KEY_RIGHT: - data->key = LV_KEY_RIGHT; - break; - - case KEY_DOWN: - data->key = LV_KEY_DOWN; - break; - - case KEY_TAB: - data->key = LV_KEY_NEXT; - break; - - default: - data->key = 0; - break; - } + xkb_init(); #endif - if (data->key != 0) { - data->state = (in.value) ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; - } - - evdev_key_val = data->key; - evdev_button = data->state; - return; - } - } - } +} - if (drv->type == LV_INDEV_TYPE_KEYPAD) { - data->key = evdev_key_val; - data->state = (lv_indev_state_t)evdev_button; - return; - } +bool evdev_set_file(const char * dev_path) +{ + return evdev_device_set_file(&global_dsc, dev_path); +} - if (drv->type != LV_INDEV_TYPE_POINTER) { - return; +bool evdev_device_set_file(evdev_device_t * dsc, const char * dev_path) +{ + /*Reset state*/ + dsc->root_x = 0; + dsc->root_y = 0; + dsc->key = 0; + dsc->state = LV_INDEV_STATE_RELEASED; + + /*Close previous*/ + if(dsc->fd >= 0) { + close(dsc->fd); + dsc->fd = -1; } + if(!dev_path) return false; -#if EVDEV_CALIBRATE - evdev_root_x = LV_CLAMP(EVDEV_HOR_MIN, evdev_root_x, EVDEV_HOR_MAX); - evdev_root_y = LV_CLAMP(EVDEV_VER_MIN, evdev_root_y, EVDEV_VER_MAX); - - data->point.x = map(evdev_root_x, EVDEV_HOR_MIN, EVDEV_HOR_MAX, 0, drv->disp->hor_res); - data->point.y = map(evdev_root_y, EVDEV_VER_MIN, EVDEV_VER_MAX, 0, drv->disp->ver_res); -#else - evdev_root_x = LV_CLAMP(0, evdev_root_x, drv->disp->hor_res - 1); - evdev_root_y = LV_CLAMP(0, evdev_root_y, drv->disp->ver_res - 1); - - data->point.x = evdev_root_x; - data->point.y = evdev_root_y; -#endif - - data->state = (lv_indev_state_t)evdev_button; - - if (data->point.x < 0) { - data->point.x = 0; + /*Open new*/ + dsc->fd = open(dev_path, O_RDONLY | O_NOCTTY | O_CLOEXEC); + if(dsc->fd < 0) { + LV_LOG_ERROR("open failed: %s", strerror(errno)); + return false; } - - if (data->point.y < 0) { - data->point.y = 0; + if(fcntl(dsc->fd, F_SETFL, O_NONBLOCK) < 0) { + LV_LOG_ERROR("fcntl failed: %s", strerror(errno)); + close(dsc->fd); + dsc->fd = -1; + return false; } - if (data->point.x >= drv->disp->hor_res) { - data->point.x = drv->disp->hor_res - 1; - } + return true; +} - if (data->point.y >= drv->disp->ver_res) { - data->point.y = drv->disp->ver_res - 1; - } +void evdev_device_set_swap_axes(evdev_device_t * dsc, bool swap_axes) +{ + dsc->swap_axes = swap_axes; } -int map(int x, int in_min, int in_max, int out_min, int out_max) +void evdev_device_set_calibration(evdev_device_t * dsc, int ver_min, int hor_min, int ver_max, int hor_max) { - return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; + dsc->ver_min = ver_min; + dsc->hor_min = hor_min; + dsc->ver_max = ver_max; + dsc->hor_max = hor_max; +} + +void evdev_read(lv_indev_drv_t * drv, lv_indev_data_t * data) +{ + evdev_device_t * dsc = drv->user_data ? drv->user_data : &global_dsc; + if(dsc->fd < 0) return; + + /*Update dsc with buffered events*/ + struct input_event in = { 0 }; + while(read(dsc->fd, &in, sizeof(in)) > 0) { + if(in.type == EV_REL) { + if(in.code == REL_X) dsc->root_x += in.value; + else if(in.code == REL_Y) dsc->root_y += in.value; + } + else if(in.type == EV_ABS) { + if(in.code == ABS_X || in.code == ABS_MT_POSITION_X) dsc->root_x = in.value; + else if(in.code == ABS_Y || in.code == ABS_MT_POSITION_Y) dsc->root_y = in.value; + else if(in.code == ABS_MT_TRACKING_ID) { + if(in.value == -1) dsc->state = LV_INDEV_STATE_RELEASED; + else if(in.value == 0) dsc->state = LV_INDEV_STATE_PRESSED; + } + } + else if(in.type == EV_KEY) { + if(in.code == BTN_MOUSE || in.code == BTN_TOUCH) { + if(in.value == 0) dsc->state = LV_INDEV_STATE_RELEASED; + else if(in.value == 1) dsc->state = LV_INDEV_STATE_PRESSED; + } + else { + dsc->key = _evdev_process_key(in.code, in.value != 0); + if(dsc->key) { + dsc->state = in.value ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; + data->continue_reading = true; /*Keep following events in buffer for now*/ + break; + } + } + } + } + + /*Process and store in data*/ + switch(drv->type) { + case LV_INDEV_TYPE_KEYPAD: + data->state = dsc->state; + data->key = dsc->key; + break; + case LV_INDEV_TYPE_POINTER: + data->state = dsc->state; + data->point = _evdev_process_pointer(drv, dsc->root_x, dsc->root_y); + break; + default: + break; + } } #endif diff --git a/project/gui/lvgl/drivers/indev/evdev.h b/project/gui/lvgl/drivers/indev/evdev.h index b1048df7b..5579b5dbe 100644 --- a/project/gui/lvgl/drivers/indev/evdev.h +++ b/project/gui/lvgl/drivers/indev/evdev.h @@ -23,32 +23,30 @@ extern "C" { #include "../../src/indev/lv_indev.h" #endif -/** - * 函数名称: evdev_init - * 功能描述: 输入事件设备初始化 - * 输入参数: 无 - * 输出参数: 无 - * 返回说明: 无 - */ +typedef struct { + /*Device*/ + int fd; + /*Config*/ + bool swap_axes; + int ver_min; + int hor_min; + int ver_max; + int hor_max; + /*State*/ + int root_x; + int root_y; + int key; + lv_indev_state_t state; +} evdev_device_t; + void evdev_init(void); -/** - * 函数名称: evdev_set_file - * 功能描述: 为evdev重新配置设备文件 - * 输入参数: dev_name --> 设置evdev设备文件名 - * 输出参数: 无 - * 返回说明: true: 设备文件设置完成。false: 当前系统不存在设备文件 - */ -bool evdev_set_file(char *dev_name); - -/** - * 函数名称: evdev_read - * 功能描述: 获取evdev的当前位置和状态 - * 输入参数: drv --> 输入设备驱动 - * 输出参数: data --> 将evdev数据存储在这里 - * 返回说明: 无 - */ -void evdev_read(lv_indev_t *drv, lv_indev_data_t *data); +void evdev_device_init(evdev_device_t *dsc); +bool evdev_set_file(const char * dev_path); +bool evdev_device_set_file(evdev_device_t * dsc, const char * dev_path); +void evdev_device_set_swap_axes(evdev_device_t * dsc, bool swap_axes); +void evdev_device_set_calibration(evdev_device_t * dsc, int hor_min, int ver_min, int hor_max, int ver_max); +void evdev_read(lv_indev_drv_t * drv, lv_indev_data_t * data); #endif diff --git a/project/gui/lvgl/lv_conf.h b/project/gui/lvgl/lv_conf.h index d150d332c..0a140914b 100644 --- a/project/gui/lvgl/lv_conf.h +++ b/project/gui/lvgl/lv_conf.h @@ -23,10 +23,6 @@ #endif #endif -#if LV_USE_STDLIB_SPRINTF == LV_STDLIB_BUILTIN -#define LV_SPRINTF_USE_FLOAT 0 -#endif - #define LV_DEF_REFR_PERIOD 33 #define LV_DPI_DEF 130 @@ -125,7 +121,7 @@ #define LV_USE_OBJ_ID 0 #define LV_USE_OBJ_ID_BUILTIN 0 - +#define LV_USE_OBJ_PROPERTY 0 #define LV_BIG_ENDIAN_SYSTEM 0 #define LV_ATTRIBUTE_TICK_INC @@ -143,6 +139,7 @@ #define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning #define LV_USE_LARGE_COORD 0 +#define LV_USE_FLOAT 0 #define LV_FONT_MONTSERRAT_8 1 #define LV_FONT_MONTSERRAT_10 1 @@ -391,6 +388,7 @@ #endif #define LV_USE_TFT_ESPI 0 +#define LV_USE_EVDEV 0 #define LV_USE_LINUX_FBDEV 0 #if LV_USE_LINUX_FBDEV @@ -401,9 +399,11 @@ #endif #define LV_USE_NUTTX 0 + +#if LV_USE_NUTTX +#define LV_USE_NUTTX_LIBUV 0 + #define LV_USE_NUTTX_CUSTOM_INIT 0 -#define LV_USE_NUTTX_TOUCHSCREEN 0 -#define LV_USE_LINUX_DRM 0 #define LV_USE_NUTTX_LCD 0 #if LV_USE_NUTTX_LCD @@ -411,4 +411,11 @@ #define LV_NUTTX_LCD_BUFFER_SIZE 60 #endif +#define LV_USE_NUTTX_TOUCHSCREEN 0 +#endif + +#define LV_USE_LINUX_DRM 0 + + + #endif diff --git a/project/gui/lvgl/lvgl.h b/project/gui/lvgl/lvgl.h index 8bec2339c..ee2162ef3 100644 --- a/project/gui/lvgl/lvgl.h +++ b/project/gui/lvgl/lvgl.h @@ -129,6 +129,9 @@ extern "C" { #include "src/dev/nuttx/lv_nuttx_fbdev.h" #include "src/dev/nuttx/lv_nuttx_touchscreen.h" #include "src/dev/nuttx/lv_nuttx_lcd.h" +#include "src/dev/nuttx/lv_nuttx_libuv.h" + +#include "src/dev/evdev/lv_evdev.h" #include "src/core/lv_global.h" /********************* diff --git a/project/gui/lvgl/src/core/Makefile b/project/gui/lvgl/src/core/Makefile index a50e225ab..98accda39 100644 --- a/project/gui/lvgl/src/core/Makefile +++ b/project/gui/lvgl/src/core/Makefile @@ -10,3 +10,4 @@ obj-y += lv_obj_tree.o obj-y += lv_obj.o obj-y += lv_refr.o obj-y += lv_obj_id_builtin.o +obj-y += lv_obj_property.o diff --git a/project/gui/lvgl/src/core/lv_global.h b/project/gui/lvgl/src/core/lv_global.h index 01e7e316e..28a7085d8 100644 --- a/project/gui/lvgl/src/core/lv_global.h +++ b/project/gui/lvgl/src/core/lv_global.h @@ -31,6 +31,7 @@ extern "C" { #include "../misc/lv_profiler_builtin.h" #include "../misc/lv_style.h" #include "../misc/lv_timer.h" +#include "../others/sysmon/lv_sysmon.h" #include "../stdlib/builtin/lv_tlsf.h" #if LV_USE_FONT_COMPRESSED @@ -170,18 +171,16 @@ typedef struct _lv_global_t { lv_profiler_builtin_ctx_t profiler_context; #endif -#if LV_USE_MSG - bool msg_restart_notify; - unsigned int msg_recursion_counter; - lv_ll_t msg_subs_ll; -#endif - #if LV_USE_FILE_EXPLORER != 0 lv_style_t fe_list_button_style; #endif #if LV_USE_SYSMON && LV_USE_PERF_MONITOR - void * sysmon_perf_info; + lv_sysmon_backend_data_t sysmon_perf; +#endif + +#if LV_USE_SYSMON && LV_USE_MEM_MONITOR + lv_sysmon_backend_data_t sysmon_mem; #endif #if LV_USE_IME_PINYIN != 0 diff --git a/project/gui/lvgl/src/core/lv_obj.c b/project/gui/lvgl/src/core/lv_obj.c index 59e94ebff..c06aa0669 100644 --- a/project/gui/lvgl/src/core/lv_obj.c +++ b/project/gui/lvgl/src/core/lv_obj.c @@ -1,4 +1,4 @@ -/** +/** * @file lv_obj.c * */ @@ -45,10 +45,28 @@ static void draw_scrollbar(lv_obj_t * obj, lv_layer_t * layer); static lv_result_t scrollbar_init_draw_dsc(lv_obj_t * obj, lv_draw_rect_dsc_t * dsc); static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_find); static void update_obj_state(lv_obj_t * obj, lv_state_t new_state); +#if LV_USE_OBJ_PROPERTY + static lv_result_t lv_obj_set_any(lv_obj_t *, lv_prop_id_t, const lv_property_t *); + static lv_result_t lv_obj_get_any(const lv_obj_t *, lv_prop_id_t, lv_property_t *); +#endif /********************** * STATIC VARIABLES **********************/ +#if LV_USE_OBJ_PROPERTY +static const lv_property_ops_t properties[] = { + { + .id = LV_PROPERTY_OBJ_PARENT, + .setter = lv_obj_set_parent, + .getter = lv_obj_get_parent, + }, + { + .id = LV_PROPERTY_ID_ANY, + .setter = lv_obj_set_any, + .getter = lv_obj_get_any, + } +}; +#endif const lv_obj_class_t lv_obj_class = { .constructor_cb = lv_obj_constructor, @@ -61,6 +79,12 @@ const lv_obj_class_t lv_obj_class = { .instance_size = (sizeof(lv_obj_t)), .base_class = NULL, .name = "obj", +#if LV_USE_OBJ_PROPERTY + .prop_index_start = LV_PROPERTY_OBJ_START, + .prop_index_end = LV_PROPERTY_OBJ_END, + .properties = properties, + .properties_count = sizeof(properties) / sizeof(properties[0]), +#endif }; /********************** @@ -152,8 +176,7 @@ void lv_obj_remove_flag(lv_obj_t * obj, lv_obj_flag_t f) } - -void lv_obj_set_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v) +void lv_obj_update_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v) { if(v) lv_obj_add_flag(obj, f); else lv_obj_remove_flag(obj, f); @@ -184,7 +207,6 @@ void lv_obj_remove_state(lv_obj_t * obj, lv_state_t state) } } - void lv_obj_set_state(lv_obj_t * obj, lv_state_t state, bool v) { if(v) lv_obj_add_state(obj, state); @@ -785,3 +807,34 @@ static bool obj_valid_child(const lv_obj_t * parent, const lv_obj_t * obj_to_fin } return false; } + +#if LV_USE_OBJ_PROPERTY +static lv_result_t lv_obj_set_any(lv_obj_t * obj, lv_prop_id_t id, const lv_property_t * prop) +{ + LV_ASSERT_OBJ(obj, MY_CLASS); + + if(id >= LV_PROPERTY_OBJ_FLAG_START && id <= LV_PROPERTY_OBJ_FLAG_END) { + lv_obj_flag_t flag = 1L << (id - LV_PROPERTY_OBJ_FLAG_START); + if(prop->num) lv_obj_add_flag(obj, flag); + else lv_obj_remove_flag(obj, flag); + return LV_RESULT_OK; + } + else { + return LV_RESULT_INVALID; + } +} + +static lv_result_t lv_obj_get_any(const lv_obj_t * obj, lv_prop_id_t id, lv_property_t * prop) +{ + LV_ASSERT_OBJ(obj, MY_CLASS); + if(id >= LV_PROPERTY_OBJ_FLAG_START && id <= LV_PROPERTY_OBJ_FLAG_END) { + lv_obj_flag_t flag = 1L << (id - LV_PROPERTY_OBJ_FLAG_START); + prop->id = id; + prop->num = obj->flags & flag; + return LV_RESULT_OK; + } + else { + return LV_RESULT_INVALID; + } +} +#endif diff --git a/project/gui/lvgl/src/core/lv_obj.h b/project/gui/lvgl/src/core/lv_obj.h index 63b43f5b9..902d4242b 100644 --- a/project/gui/lvgl/src/core/lv_obj.h +++ b/project/gui/lvgl/src/core/lv_obj.h @@ -22,6 +22,7 @@ extern "C" { #include "../misc/lv_area.h" #include "../misc/lv_color.h" #include "../misc/lv_assert.h" +#include "lv_obj_property.h" /********************* * DEFINES @@ -92,6 +93,9 @@ typedef uint32_t lv_part_t; /** * On/Off features controlling the object's behavior. * OR-ed values are possible + * + * Note: update obj flags corresponding properties below + * whenever add/remove flags or change bit definition of flags. */ typedef enum { LV_OBJ_FLAG_HIDDEN = (1L << 0), /**< Make the object hidden. (Like it wasn't there at all)*/ @@ -137,6 +141,48 @@ typedef _lv_obj_flag_t lv_obj_flag_t; typedef uint32_t lv_obj_flag_t; #endif /*DOXYGEN*/ +#if LV_USE_OBJ_PROPERTY +enum { + /*OBJ flag properties */ + LV_PROPERTY_ID(OBJ, FLAG_START, LV_PROPERTY_TYPE_INT, 0), + LV_PROPERTY_ID(OBJ, FLAG_HIDDEN, LV_PROPERTY_TYPE_INT, 0), + LV_PROPERTY_ID(OBJ, FLAG_CLICKABLE, LV_PROPERTY_TYPE_INT, 1), + LV_PROPERTY_ID(OBJ, FLAG_CLICK_FOCUSABLE, LV_PROPERTY_TYPE_INT, 2), + LV_PROPERTY_ID(OBJ, FLAG_CHECKABLE, LV_PROPERTY_TYPE_INT, 3), + LV_PROPERTY_ID(OBJ, FLAG_SCROLLABLE, LV_PROPERTY_TYPE_INT, 4), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_ELASTIC, LV_PROPERTY_TYPE_INT, 5), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_MOMENTUM, LV_PROPERTY_TYPE_INT, 6), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_ONE, LV_PROPERTY_TYPE_INT, 7), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_CHAIN_HOR, LV_PROPERTY_TYPE_INT, 8), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_CHAIN_VER, LV_PROPERTY_TYPE_INT, 9), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_ON_FOCUS, LV_PROPERTY_TYPE_INT, 10), + LV_PROPERTY_ID(OBJ, FLAG_SCROLL_WITH_ARROW, LV_PROPERTY_TYPE_INT, 11), + LV_PROPERTY_ID(OBJ, FLAG_SNAPPABLE, LV_PROPERTY_TYPE_INT, 12), + LV_PROPERTY_ID(OBJ, FLAG_PRESS_LOCK, LV_PROPERTY_TYPE_INT, 13), + LV_PROPERTY_ID(OBJ, FLAG_EVENT_BUBBLE, LV_PROPERTY_TYPE_INT, 14), + LV_PROPERTY_ID(OBJ, FLAG_GESTURE_BUBBLE, LV_PROPERTY_TYPE_INT, 15), + LV_PROPERTY_ID(OBJ, FLAG_ADV_HITTEST, LV_PROPERTY_TYPE_INT, 16), + LV_PROPERTY_ID(OBJ, FLAG_IGNORE_LAYOUT, LV_PROPERTY_TYPE_INT, 17), + LV_PROPERTY_ID(OBJ, FLAG_FLOATING, LV_PROPERTY_TYPE_INT, 18), + LV_PROPERTY_ID(OBJ, FLAG_SEND_DRAW_TASK_EVENTS, LV_PROPERTY_TYPE_INT, 19), + LV_PROPERTY_ID(OBJ, FLAG_OVERFLOW_VISIBLE, LV_PROPERTY_TYPE_INT, 20), + LV_PROPERTY_ID(OBJ, FLAG_FLEX_IN_NEW_TRACK, LV_PROPERTY_TYPE_INT, 21), + LV_PROPERTY_ID(OBJ, FLAG_LAYOUT_1, LV_PROPERTY_TYPE_INT, 23), + LV_PROPERTY_ID(OBJ, FLAG_LAYOUT_2, LV_PROPERTY_TYPE_INT, 24), + LV_PROPERTY_ID(OBJ, FLAG_WIDGET_1, LV_PROPERTY_TYPE_INT, 25), + LV_PROPERTY_ID(OBJ, FLAG_WIDGET_2, LV_PROPERTY_TYPE_INT, 26), + LV_PROPERTY_ID(OBJ, FLAG_USER_1, LV_PROPERTY_TYPE_INT, 27), + LV_PROPERTY_ID(OBJ, FLAG_USER_2, LV_PROPERTY_TYPE_INT, 28), + LV_PROPERTY_ID(OBJ, FLAG_USER_3, LV_PROPERTY_TYPE_INT, 29), + LV_PROPERTY_ID(OBJ, FLAG_USER_4, LV_PROPERTY_TYPE_INT, 30), + LV_PROPERTY_ID(OBJ, FLAG_END, LV_PROPERTY_TYPE_INT, 30), + + /*OBJ normal properties*/ + LV_PROPERTY_ID(OBJ, PARENT, LV_PROPERTY_TYPE_POINTER, 31), + + LV_PROPERTY_OBJ_END, +}; +#endif #include "lv_obj_tree.h" #include "lv_obj_pos.h" @@ -223,7 +269,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent); void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f); /** - * Clear one or more flags + * Remove one or more flags * @param obj pointer to an object * @param f OR-ed values from `lv_obj_flag_t` to set. */ @@ -232,10 +278,10 @@ void lv_obj_remove_flag(lv_obj_t * obj, lv_obj_flag_t f); /** * Set add or remove one or more flags. * @param obj pointer to an object - * @param f OR-ed values from `lv_obj_flag_t` to set. + * @param f OR-ed values from `lv_obj_flag_t` to update. * @param v true: add the flags; false: remove the flags */ -void lv_obj_set_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v); +void lv_obj_update_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v); /** * Add one or more states to the object. The other state bits will remain unchanged. diff --git a/project/gui/lvgl/src/core/lv_obj_class.h b/project/gui/lvgl/src/core/lv_obj_class.h index 6cddf3f8c..61f1c35e6 100644 --- a/project/gui/lvgl/src/core/lv_obj_class.h +++ b/project/gui/lvgl/src/core/lv_obj_class.h @@ -15,6 +15,7 @@ extern "C" { *********************/ #include #include +#include "lv_obj_property.h" #include "../misc/lv_area.h" /********************* @@ -61,6 +62,14 @@ typedef struct _lv_obj_class_t { /*class_p is the class in which event is being processed.*/ void (*event_cb)(const struct _lv_obj_class_t * class_p, struct _lv_event_t * e); /**< Widget type specific event function*/ + +#if LV_USE_OBJ_PROPERTY + uint32_t prop_index_start; + uint32_t prop_index_end; + const lv_property_ops_t * properties; + uint32_t properties_count; +#endif + void * user_data; const char * name; lv_coord_t width_def; diff --git a/project/gui/lvgl/src/core/lv_obj_draw.c b/project/gui/lvgl/src/core/lv_obj_draw.c index 2acb735c6..9cc0b11aa 100644 --- a/project/gui/lvgl/src/core/lv_obj_draw.c +++ b/project/gui/lvgl/src/core/lv_obj_draw.c @@ -71,10 +71,9 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t draw_dsc->bg_grad.stops[1].color = lv_obj_get_style_bg_grad_color_filtered(obj, part); draw_dsc->bg_grad.stops[0].frac = lv_obj_get_style_bg_main_stop(obj, part); draw_dsc->bg_grad.stops[1].frac = lv_obj_get_style_bg_grad_stop(obj, part); - draw_dsc->bg_grad.stops[0].opa = 0xFF; - draw_dsc->bg_grad.stops[1].opa = 0xFF; + draw_dsc->bg_grad.stops[0].opa = lv_obj_get_style_bg_main_opa(obj, part); + draw_dsc->bg_grad.stops[1].opa = lv_obj_get_style_bg_grad_opa(obj, part); } - draw_dsc->bg_grad.dither = lv_obj_get_style_bg_dither_mode(obj, part); } } } @@ -187,7 +186,8 @@ void lv_obj_init_draw_image_dsc(lv_obj_t * obj, uint32_t part, lv_draw_image_dsc if(draw_dsc->opa <= LV_OPA_MIN) return; draw_dsc->rotation = 0; - draw_dsc->zoom = LV_SCALE_NONE; + draw_dsc->zoom_x = LV_SCALE_NONE; + draw_dsc->zoom_y = LV_SCALE_NONE; draw_dsc->pivot.x = lv_area_get_width(&obj->coords) / 2; draw_dsc->pivot.y = lv_area_get_height(&obj->coords) / 2; diff --git a/project/gui/lvgl/src/core/lv_obj_pos.c b/project/gui/lvgl/src/core/lv_obj_pos.c index 770159ee2..a69ce74b5 100644 --- a/project/gui/lvgl/src/core/lv_obj_pos.c +++ b/project/gui/lvgl/src/core/lv_obj_pos.c @@ -1118,9 +1118,10 @@ static void layout_update_core(lv_obj_t * obj) static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv) { lv_coord_t angle = lv_obj_get_style_transform_rotation(obj, 0); - lv_coord_t zoom = lv_obj_get_style_transform_scale_safe(obj, 0); + lv_coord_t zoom_x = lv_obj_get_style_transform_scale_x_safe(obj, 0); + lv_coord_t zoom_y = lv_obj_get_style_transform_scale_y_safe(obj, 0); - if(angle == 0 && zoom == LV_SCALE_NONE) return; + if(angle == 0 && zoom_x == LV_SCALE_NONE && zoom_y == LV_SCALE_NONE) return; lv_point_t pivot = { .x = lv_obj_get_style_transform_pivot_x(obj, 0), @@ -1139,8 +1140,9 @@ static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv) if(inv) { angle = -angle; - zoom = (256 * 256) / zoom; + zoom_x = (256 * 256) / zoom_x; + zoom_y = (256 * 256) / zoom_y; } - lv_point_transform(p, angle, zoom, &pivot); + lv_point_transform(p, angle, zoom_x, zoom_y, &pivot, !inv); } diff --git a/project/gui/lvgl/src/core/lv_obj_property.c b/project/gui/lvgl/src/core/lv_obj_property.c new file mode 100644 index 000000000..1e9a14b30 --- /dev/null +++ b/project/gui/lvgl/src/core/lv_obj_property.c @@ -0,0 +1,179 @@ +/** + * @file lv_obj_id.c + * + */ + +/********************* + * INCLUDES + *********************/ +#include "../core/lv_obj.h" +#include "../stdlib/lv_string.h" +#include "lv_obj_property.h" + +#if LV_USE_OBJ_PROPERTY + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +typedef void (*lv_property_set_int_t)(struct _lv_obj_t *, int32_t); +typedef void (*lv_property_set_pointer_t)(struct _lv_obj_t *, const void *); +typedef void (*lv_property_set_color_t)(struct _lv_obj_t *, lv_color_t); +typedef lv_result_t (*lv_property_setter_t)(struct _lv_obj_t *, lv_prop_id_t, const lv_property_t *); + +typedef int32_t (*lv_property_get_int_t)(const struct _lv_obj_t *); +typedef void * (*lv_property_get_pointer_t)(const struct _lv_obj_t *); +typedef lv_color_t (*lv_property_get_color_t)(const struct _lv_obj_t *); +typedef lv_result_t (*lv_property_getter_t)(const struct _lv_obj_t *, lv_prop_id_t, lv_property_t *); + +/********************** + * STATIC PROTOTYPES + **********************/ + +static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t * value, bool set); + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +lv_result_t lv_obj_set_property(lv_obj_t * obj, const lv_property_t * value) +{ + LV_ASSERT(obj && value); + + if(value->id == LV_PROPERTY_ID_INVALID) { + LV_LOG_WARN("invalid property id set to %p\n", obj); + return LV_RESULT_INVALID; + } + + if(value->id < LV_PROPERTY_ID_START) { + lv_obj_set_local_style_prop(obj, value->id, value->_style, 0); + return LV_RESULT_OK; + } + + return obj_property(obj, value->id, (lv_property_t *)value, true); +} + +lv_result_t lv_obj_set_properties(struct _lv_obj_t * obj, const lv_property_t * value, uint32_t count) +{ + for(uint32_t i = 0; i < count; i++) { + lv_result_t result = lv_obj_set_property(obj, &value[i]); + if(result != LV_RESULT_OK) { + return result; + } + } + + return LV_RESULT_OK; +} + +lv_property_t lv_obj_get_property(lv_obj_t * obj, lv_prop_id_t id) +{ + lv_result_t result; + lv_property_t value; + + if(id == LV_PROPERTY_ID_INVALID) { + LV_LOG_WARN("invalid property id to get from %p\n", obj); + value.id = 0; + value.num = 0; + return value; + } + + if(id < LV_PROPERTY_ID_START) { + lv_obj_get_local_style_prop(obj, id, &value._style, 0); + value.id = id; + return value; + } + + result = obj_property(obj, id, &value, false); + if(result != LV_RESULT_OK) + value.id = 0; + + return value; +} + +static lv_result_t obj_property(lv_obj_t * obj, lv_prop_id_t id, lv_property_t * value, bool set) +{ + const lv_property_ops_t * properties; + const lv_property_ops_t * prop; + + const lv_obj_class_t * clz; + uint32_t index = LV_PROPERTY_ID_INDEX(id); + + for(clz = obj->class_p ; clz; clz = clz->base_class) { + properties = clz->properties; + if(properties == NULL) { + /* try base class*/ + continue; + } + + if(id != LV_PROPERTY_ID_ANY && (index < clz->prop_index_start || index > clz->prop_index_end)) { + /* try base class*/ + continue; + } + + /*Check if there's setter available for this class*/ + for(uint32_t i = 0; i < clz->properties_count; i++) { + prop = &properties[i]; + + /*pass id and value directly to widget's property method*/ + if(prop->id == LV_PROPERTY_ID_ANY) { + value->id = prop->id; + if(set) return ((lv_property_setter_t)prop->setter)(obj, id, value); + else return ((lv_property_getter_t)prop->getter)(obj, id, value); + } + + /*Not this id, check next*/ + if(prop->id != id) + continue; + + /*id matched but we got null pointer to functions*/ + if(set ? prop->setter == NULL : prop->getter == NULL) { + LV_LOG_WARN("null %s provided, id: %d\n", set ? "setter" : "getter", id); + return LV_RESULT_INVALID; + } + + /*Update value id if it's a read*/ + if(!set) value->id = prop->id; + + switch(LV_PROPERTY_ID_TYPE(prop->id)) { + case LV_PROPERTY_TYPE_INT: + if(set)((lv_property_set_int_t)(prop->setter))(obj, value->num); + else value->num = ((lv_property_get_int_t)(prop->getter))(obj); + break; + case LV_PROPERTY_TYPE_POINTER: + case LV_PROPERTY_TYPE_IMGSRC: + if(set)((lv_property_set_pointer_t)(prop->setter))(obj, value->ptr); + else value->ptr = ((lv_property_get_pointer_t)(prop->getter))(obj); + break; + case LV_PROPERTY_TYPE_COLOR: + if(set)((lv_property_set_color_t)prop->setter)(obj, value->color); + else value->color = ((lv_property_get_color_t)(prop->getter))(obj); + break; + default: + LV_LOG_WARN("unknown property id: 0x%08x\n", prop->id); + return LV_RESULT_INVALID; + break; + } + + return LV_RESULT_OK; + } + + /*If no setter found, try base class then*/ + } + + LV_LOG_WARN("unknown property id: 0x%08x\n", id); + return LV_RESULT_INVALID; +} + +#endif /*LV_USE_OBJ_PROPERTY*/ diff --git a/project/gui/lvgl/src/core/lv_obj_property.h b/project/gui/lvgl/src/core/lv_obj_property.h new file mode 100644 index 000000000..eaf3006e1 --- /dev/null +++ b/project/gui/lvgl/src/core/lv_obj_property.h @@ -0,0 +1,128 @@ +/** + * @file lv_obj_property.h + * + */ + +#ifndef LV_OBJ_PROPERTY_H +#define LV_OBJ_PROPERTY_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ +#include "../misc/lv_types.h" +#include "../misc/lv_style.h" + +#if LV_USE_OBJ_PROPERTY + +/********************* + * DEFINES + *********************/ + +/*All possible property value types*/ +#define LV_PROPERTY_TYPE_INVALID 0 /*Use default 0 as invalid to detect program outliers*/ +#define LV_PROPERTY_TYPE_INT 1 /*int32_t type*/ +#define LV_PROPERTY_TYPE_COLOR 2 /*ARGB8888 type*/ +#define LV_PROPERTY_TYPE_POINTER 3 /*void * pointer*/ +#define LV_PROPERTY_TYPE_IMGSRC 4 /*Special pointer for image*/ + +/********************** + * TYPEDEFS + **********************/ + +struct _lv_obj_t; + +#define LV_PROPERTY_ID(clz, name, type, index) LV_PROPERTY_## clz ##_##name = (LV_PROPERTY_## clz ##_START + (index)) | ((type) << 28) + +#define LV_PROPERTY_ID_TYPE(id) ((id) >> 28) +#define LV_PROPERTY_ID_INDEX(id) ((id) & 0xfffffff) + +/*Set properties from an array of lv_property_t*/ +#define LV_OBJ_PROPERTY_ARRAY_SET(obj, array) lv_obj_set_properties(obj, array, sizeof(array)/sizeof(array[0])) + +/** + * Group of predefined widget ID start value. + */ +enum { + LV_PROPERTY_ID_INVALID = 0, + + /*ID 0 to 0xff are style ID, check lv_style_prop_t*/ + LV_PROPERTY_ID_START = 0x100, /*ID little than 0xff is style ID*/ + + /* lv_obj.c */ + LV_PROPERTY_OBJ_START = 1000, + + /* lv_image.c */ + LV_PROPERTY_IMAGE_START = 1100, + + /*Special ID*/ + LV_PROPERTY_ID_BUILTIN_LAST, /*Use it to extend ID and make sure it's unique and compile time determinant*/ + + LV_PROPERTY_ID_ANY = 0x7ffffffe, /*Special ID used by lvgl to intercept all setter/getter call.*/ +}; + +typedef uint32_t lv_prop_id_t; + +typedef struct { + lv_prop_id_t id; + union { + int32_t num; /**< Number integer number (opacity, enums, booleans or "normal" numbers)*/ + const void * ptr; /**< Constant pointers (font, cone text, etc)*/ + lv_color_t color; /**< Colors*/ + lv_style_value_t _style; /**< A place holder for style value which is same as property value.*/ + }; +} lv_property_t; + +typedef struct { + lv_prop_id_t id; + + void * setter; + void * getter; +} lv_property_ops_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/*===================== + * Setter functions + *====================*/ + +/** + * Set widget property value. + * @param obj pointer to an object + * @param id ID of which property + * @param value The property value to set + * @return return LV_RESULT_OK if success + */ +lv_result_t lv_obj_set_property(struct _lv_obj_t * obj, const lv_property_t * value); + +lv_result_t lv_obj_set_properties(struct _lv_obj_t * obj, const lv_property_t * value, uint32_t count); + +/*===================== + * Getter functions + *====================*/ + +/** + * Read property value from object + * @param obj pointer to an object + * @param id ID of which property + * @param value pointer to a buffer to store the value + * @return ? to be discussed, LV_RESULT_OK or LV_RESULT_INVALID + */ +lv_property_t lv_obj_get_property(struct _lv_obj_t * obj, lv_prop_id_t id); + +/********************** + * MACROS + **********************/ + +#endif /*LV_USE_OBJ_PROPERTY*/ + +#ifdef __cplusplus +} /*extern "C"*/ +#endif + +#endif /*LV_OBJ_PROPERTY_H*/ diff --git a/project/gui/lvgl/src/core/lv_obj_scroll.c b/project/gui/lvgl/src/core/lv_obj_scroll.c index bf46d4b9f..0b495c257 100644 --- a/project/gui/lvgl/src/core/lv_obj_scroll.c +++ b/project/gui/lvgl/src/core/lv_obj_scroll.c @@ -499,14 +499,14 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t * lv_coord_t bottom_space = lv_obj_get_style_pad_bottom(obj, LV_PART_SCROLLBAR); lv_coord_t left_space = lv_obj_get_style_pad_left(obj, LV_PART_SCROLLBAR); lv_coord_t right_space = lv_obj_get_style_pad_right(obj, LV_PART_SCROLLBAR); - lv_coord_t tickness = lv_obj_get_style_width(obj, LV_PART_SCROLLBAR); + lv_coord_t thickness = lv_obj_get_style_width(obj, LV_PART_SCROLLBAR); lv_coord_t obj_h = lv_obj_get_height(obj); lv_coord_t obj_w = lv_obj_get_width(obj); /*Space required for the vertical and horizontal scrollbars*/ - lv_coord_t ver_reg_space = ver_draw ? tickness : 0; - lv_coord_t hor_req_space = hor_draw ? tickness : 0; + lv_coord_t ver_reg_space = ver_draw ? thickness : 0; + lv_coord_t hor_req_space = hor_draw ? thickness : 0; lv_coord_t rem; if(lv_obj_get_style_bg_opa(obj, LV_PART_SCROLLBAR) < LV_OPA_MIN && @@ -521,11 +521,11 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t * ver_area->y2 = obj->coords.y2; if(rtl) { ver_area->x1 = obj->coords.x1 + left_space; - ver_area->x2 = ver_area->x1 + tickness - 1; + ver_area->x2 = ver_area->x1 + thickness - 1; } else { ver_area->x2 = obj->coords.x2 - right_space; - ver_area->x1 = ver_area->x2 - tickness + 1; + ver_area->x1 = ver_area->x2 - thickness + 1; } lv_coord_t sb_h = ((obj_h - top_space - bottom_space - hor_req_space) * obj_h) / content_h; @@ -562,7 +562,7 @@ void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t * lv_coord_t content_w = obj_w + sl + sr; if(hor_draw && content_w) { hor_area->y2 = obj->coords.y2 - bottom_space; - hor_area->y1 = hor_area->y2 - tickness + 1; + hor_area->y1 = hor_area->y2 - thickness + 1; hor_area->x1 = obj->coords.x1; hor_area->x2 = obj->coords.x2; diff --git a/project/gui/lvgl/src/core/lv_obj_style.c b/project/gui/lvgl/src/core/lv_obj_style.c index e3213db6e..8ed6fe94d 100644 --- a/project/gui/lvgl/src/core/lv_obj_style.c +++ b/project/gui/lvgl/src/core/lv_obj_style.c @@ -319,7 +319,8 @@ static inline lv_style_value_t lv_style_prop_get_default_inlined(lv_style_prop_t 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: + case LV_STYLE_TRANSFORM_SCALE_X: + case LV_STYLE_TRANSFORM_SCALE_Y: return (lv_style_value_t) { .num = LV_SCALE_NONE }; @@ -343,6 +344,8 @@ static inline lv_style_value_t lv_style_prop_get_default_inlined(lv_style_prop_t 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: @@ -606,8 +609,6 @@ _lv_style_state_cmp_t _lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t sta else if(lv_style_get_prop(style, LV_STYLE_MIN_HEIGHT, &v)) layout_diff = true; else if(lv_style_get_prop(style, LV_STYLE_MAX_HEIGHT, &v)) layout_diff = true; else if(lv_style_get_prop(style, LV_STYLE_BORDER_WIDTH, &v)) layout_diff = true; - else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_ROTATION, &v)) layout_diff = true; - else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE, &v)) layout_diff = true; if(layout_diff) { return _LV_STYLE_STATE_CMP_DIFF_LAYOUT; @@ -617,7 +618,8 @@ _lv_style_state_cmp_t _lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t sta if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_WIDTH, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_HEIGHT, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_ROTATION, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; - else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; + else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE_X, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; + else if(lv_style_get_prop(style, LV_STYLE_TRANSFORM_SCALE_Y, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_OPA, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_PAD, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; else if(lv_style_get_prop(style, LV_STYLE_OUTLINE_WIDTH, &v)) res = _LV_STYLE_STATE_CMP_DIFF_DRAW_PAD; @@ -1043,7 +1045,8 @@ static void trans_anim_ready_cb(lv_anim_t * a) static lv_layer_type_t calculate_layer_type(lv_obj_t * obj) { if(lv_obj_get_style_transform_rotation(obj, 0) != 0) return LV_LAYER_TYPE_TRANSFORM; - if(lv_obj_get_style_transform_scale(obj, 0) != 256) return LV_LAYER_TYPE_TRANSFORM; + if(lv_obj_get_style_transform_scale_x(obj, 0) != 256) return LV_LAYER_TYPE_TRANSFORM; + if(lv_obj_get_style_transform_scale_y(obj, 0) != 256) 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_blend_mode(obj, 0) != LV_BLEND_MODE_NORMAL) return LV_LAYER_TYPE_SIMPLE; return LV_LAYER_TYPE_NONE; diff --git a/project/gui/lvgl/src/core/lv_obj_style.h b/project/gui/lvgl/src/core/lv_obj_style.h index 1aba04da7..1e74d952e 100644 --- a/project/gui/lvgl/src/core/lv_obj_style.h +++ b/project/gui/lvgl/src/core/lv_obj_style.h @@ -279,6 +279,13 @@ static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, lv_coord_t widt lv_obj_set_style_height(obj, height, selector); } +static inline void lv_obj_set_style_transform_scale(struct _lv_obj_t * obj, lv_coord_t value, + lv_style_selector_t selector) +{ + lv_obj_set_style_transform_scale_x(obj, value, selector); + lv_obj_set_style_transform_scale_y(obj, value, selector); +} + static inline lv_coord_t lv_obj_get_style_space_left(const struct _lv_obj_t * obj, uint32_t part) { lv_coord_t padding = lv_obj_get_style_pad_left(obj, part); @@ -313,9 +320,15 @@ static inline lv_coord_t lv_obj_get_style_space_bottom(const struct _lv_obj_t * lv_text_align_t lv_obj_calculate_style_text_align(const struct _lv_obj_t * obj, lv_part_t part, const char * txt); -static inline lv_coord_t lv_obj_get_style_transform_scale_safe(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_coord_t lv_obj_get_style_transform_scale_x_safe(const struct _lv_obj_t * obj, uint32_t part) +{ + int16_t zoom = lv_obj_get_style_transform_scale_x(obj, part); + return zoom != 0 ? zoom : 1; +} + +static inline lv_coord_t lv_obj_get_style_transform_scale_y_safe(const struct _lv_obj_t * obj, uint32_t part) { - int16_t zoom = lv_obj_get_style_transform_scale(obj, part); + int16_t zoom = lv_obj_get_style_transform_scale_y(obj, part); return zoom != 0 ? zoom : 1; } diff --git a/project/gui/lvgl/src/core/lv_obj_style_gen.c b/project/gui/lvgl/src/core/lv_obj_style_gen.c index bec9dbc19..c64f229ad 100644 --- a/project/gui/lvgl/src/core/lv_obj_style_gen.c +++ b/project/gui/lvgl/src/core/lv_obj_style_gen.c @@ -114,12 +114,20 @@ void lv_obj_set_style_translate_y(struct _lv_obj_t * obj, lv_coord_t value, lv_s lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSLATE_Y, v, selector); } -void lv_obj_set_style_transform_scale(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) +void lv_obj_set_style_transform_scale_x(struct _lv_obj_t * obj, lv_coord_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_TRANSFORM_SCALE, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_TRANSFORM_SCALE_X, v, selector); +} + +void lv_obj_set_style_transform_scale_y(struct _lv_obj_t * obj, lv_coord_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_TRANSFORM_SCALE_Y, v, selector); } void lv_obj_set_style_transform_rotation(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector) @@ -274,20 +282,28 @@ void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_ lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_STOP, v, selector); } -void lv_obj_set_style_bg_grad(struct _lv_obj_t * obj, const lv_grad_dsc_t * value, lv_style_selector_t selector) +void lv_obj_set_style_bg_main_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector) { lv_style_value_t v = { - .ptr = value + .num = (int32_t)value }; - lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_MAIN_OPA, v, selector); } -void lv_obj_set_style_bg_dither_mode(struct _lv_obj_t * obj, lv_dither_mode_t value, lv_style_selector_t selector) +void lv_obj_set_style_bg_grad_opa(struct _lv_obj_t * obj, lv_opa_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_BG_DITHER_MODE, v, selector); + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD_OPA, v, selector); +} + +void lv_obj_set_style_bg_grad(struct _lv_obj_t * obj, const lv_grad_dsc_t * value, lv_style_selector_t selector) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_obj_set_local_style_prop(obj, LV_STYLE_BG_GRAD, v, selector); } void lv_obj_set_style_bg_image_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector) @@ -650,8 +666,7 @@ void lv_obj_set_style_opa_layered(struct _lv_obj_t * obj, lv_opa_t value, lv_sty lv_obj_set_local_style_prop(obj, LV_STYLE_OPA_LAYERED, v, selector); } -void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, - lv_style_selector_t selector) +void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector) { lv_style_value_t v = { .ptr = value @@ -691,8 +706,7 @@ void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_styl lv_obj_set_local_style_prop(obj, LV_STYLE_ANIM_SPEED, v, selector); } -void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, - lv_style_selector_t selector) +void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector) { lv_style_value_t v = { .ptr = value @@ -764,8 +778,7 @@ void lv_obj_set_style_flex_grow(struct _lv_obj_t * obj, uint8_t value, lv_style_ lv_obj_set_local_style_prop(obj, LV_STYLE_FLEX_GROW, v, selector); } -void lv_obj_set_style_grid_column_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, - lv_style_selector_t selector) +void lv_obj_set_style_grid_column_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, lv_style_selector_t selector) { lv_style_value_t v = { .ptr = value diff --git a/project/gui/lvgl/src/core/lv_obj_style_gen.h b/project/gui/lvgl/src/core/lv_obj_style_gen.h index 513408f92..281e47d1c 100644 --- a/project/gui/lvgl/src/core/lv_obj_style_gen.h +++ b/project/gui/lvgl/src/core/lv_obj_style_gen.h @@ -92,9 +92,15 @@ static inline lv_coord_t lv_obj_get_style_translate_y(const struct _lv_obj_t * o return (lv_coord_t)v.num; } -static inline lv_coord_t lv_obj_get_style_transform_scale(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_coord_t lv_obj_get_style_transform_scale_x(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SCALE); + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SCALE_X); + return (lv_coord_t)v.num; +} + +static inline lv_coord_t lv_obj_get_style_transform_scale_y(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SCALE_Y); return (lv_coord_t)v.num; } @@ -202,8 +208,7 @@ static inline lv_color_t lv_obj_get_style_bg_grad_color(const struct _lv_obj_t * static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const struct _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_BG_GRAD_COLOR)); + 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)); return v.color; } @@ -225,16 +230,22 @@ static inline lv_coord_t lv_obj_get_style_bg_grad_stop(const struct _lv_obj_t * return (lv_coord_t)v.num; } -static inline const lv_grad_dsc_t * lv_obj_get_style_bg_grad(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_opa_t lv_obj_get_style_bg_main_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD); - return (const lv_grad_dsc_t *)v.ptr; + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_MAIN_OPA); + return (lv_opa_t)v.num; } -static inline lv_dither_mode_t lv_obj_get_style_bg_dither_mode(const struct _lv_obj_t * obj, uint32_t part) +static inline lv_opa_t lv_obj_get_style_bg_grad_opa(const struct _lv_obj_t * obj, uint32_t part) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_DITHER_MODE); - return (lv_dither_mode_t)v.num; + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_OPA); + return (lv_opa_t)v.num; +} + +static inline const lv_grad_dsc_t * lv_obj_get_style_bg_grad(const struct _lv_obj_t * obj, uint32_t part) +{ + lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD); + return (const lv_grad_dsc_t *)v.ptr; } static inline const void * lv_obj_get_style_bg_image_src(const struct _lv_obj_t * obj, uint32_t part) @@ -257,8 +268,7 @@ static inline lv_color_t lv_obj_get_style_bg_image_recolor(const struct _lv_obj_ static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const struct _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_BG_IMAGE_RECOLOR)); + 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)); return v.color; } @@ -282,8 +292,7 @@ static inline lv_color_t lv_obj_get_style_border_color(const struct _lv_obj_t * static inline lv_color_t lv_obj_get_style_border_color_filtered(const struct _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_BORDER_COLOR)); + lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR)); return v.color; } @@ -325,8 +334,7 @@ static inline lv_color_t lv_obj_get_style_outline_color(const struct _lv_obj_t * static inline lv_color_t lv_obj_get_style_outline_color_filtered(const struct _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_OUTLINE_COLOR)); + lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR)); return v.color; } @@ -374,8 +382,7 @@ static inline lv_color_t lv_obj_get_style_shadow_color(const struct _lv_obj_t * static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const struct _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_SHADOW_COLOR)); + lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR)); return v.color; } @@ -399,8 +406,7 @@ static inline lv_color_t lv_obj_get_style_image_recolor(const struct _lv_obj_t * static inline lv_color_t lv_obj_get_style_image_recolor_filtered(const struct _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_IMAGE_RECOLOR)); + lv_style_value_t v = _lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR)); return v.color; } @@ -560,8 +566,7 @@ static inline lv_opa_t lv_obj_get_style_opa_layered(const struct _lv_obj_t * obj return (lv_opa_t)v.num; } -static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, - uint32_t part) +static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const struct _lv_obj_t * obj, uint32_t part) { lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC); return (const lv_color_filter_dsc_t *)v.ptr; @@ -718,7 +723,8 @@ void lv_obj_set_style_transform_width(struct _lv_obj_t * obj, lv_coord_t value, void lv_obj_set_style_transform_height(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_translate_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_translate_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); -void lv_obj_set_style_transform_scale(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); +void lv_obj_set_style_transform_scale_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); +void lv_obj_set_style_transform_scale_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_transform_rotation(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_transform_pivot_x(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_transform_pivot_y(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); @@ -738,8 +744,9 @@ void lv_obj_set_style_bg_grad_color(struct _lv_obj_t * obj, lv_color_t value, lv void lv_obj_set_style_bg_grad_dir(struct _lv_obj_t * obj, lv_grad_dir_t value, lv_style_selector_t selector); void lv_obj_set_style_bg_main_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_bg_grad_stop(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); +void lv_obj_set_style_bg_main_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); +void lv_obj_set_style_bg_grad_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_bg_grad(struct _lv_obj_t * obj, const lv_grad_dsc_t * value, lv_style_selector_t selector); -void lv_obj_set_style_bg_dither_mode(struct _lv_obj_t * obj, lv_dither_mode_t value, lv_style_selector_t selector); void lv_obj_set_style_bg_image_src(struct _lv_obj_t * obj, const void * value, lv_style_selector_t selector); void lv_obj_set_style_bg_image_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_bg_image_recolor(struct _lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); @@ -785,14 +792,12 @@ void lv_obj_set_style_radius(struct _lv_obj_t * obj, lv_coord_t value, lv_style_ void lv_obj_set_style_clip_corner(struct _lv_obj_t * obj, bool value, lv_style_selector_t selector); void lv_obj_set_style_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_opa_layered(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); -void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, - lv_style_selector_t selector); +void lv_obj_set_style_color_filter_dsc(struct _lv_obj_t * obj, const lv_color_filter_dsc_t * value, lv_style_selector_t selector); void lv_obj_set_style_color_filter_opa(struct _lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); void lv_obj_set_style_anim(struct _lv_obj_t * obj, const lv_anim_t * value, lv_style_selector_t selector); void lv_obj_set_style_anim_time(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector); void lv_obj_set_style_anim_speed(struct _lv_obj_t * obj, uint32_t value, lv_style_selector_t selector); -void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, - lv_style_selector_t selector); +void lv_obj_set_style_transition(struct _lv_obj_t * obj, const lv_style_transition_dsc_t * value, lv_style_selector_t selector); void lv_obj_set_style_blend_mode(struct _lv_obj_t * obj, lv_blend_mode_t value, lv_style_selector_t selector); void lv_obj_set_style_layout(struct _lv_obj_t * obj, uint16_t value, lv_style_selector_t selector); void lv_obj_set_style_base_dir(struct _lv_obj_t * obj, lv_base_dir_t value, lv_style_selector_t selector); @@ -801,11 +806,9 @@ void lv_obj_set_style_flex_main_place(struct _lv_obj_t * obj, lv_flex_align_t va void lv_obj_set_style_flex_cross_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector); void lv_obj_set_style_flex_track_place(struct _lv_obj_t * obj, lv_flex_align_t value, lv_style_selector_t selector); void lv_obj_set_style_flex_grow(struct _lv_obj_t * obj, uint8_t value, lv_style_selector_t selector); -void lv_obj_set_style_grid_column_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, - lv_style_selector_t selector); +void lv_obj_set_style_grid_column_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, lv_style_selector_t selector); void lv_obj_set_style_grid_column_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); -void lv_obj_set_style_grid_row_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, - lv_style_selector_t selector); +void lv_obj_set_style_grid_row_dsc_array(struct _lv_obj_t * obj, const lv_coord_t * value, lv_style_selector_t selector); void lv_obj_set_style_grid_row_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_column_pos(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_x_align(struct _lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); diff --git a/project/gui/lvgl/src/core/lv_refr.c b/project/gui/lvgl/src/core/lv_refr.c index c18e386e5..f6abf960a 100644 --- a/project/gui/lvgl/src/core/lv_refr.c +++ b/project/gui/lvgl/src/core/lv_refr.c @@ -353,12 +353,14 @@ void _lv_display_refr_timer(lv_timer_t * tmr) lv_display_send_event(disp_refr, LV_EVENT_REFR_START, NULL); /*Refresh the screen's layout if required*/ + LV_PROFILER_BEGIN_TAG("layout"); lv_obj_update_layout(disp_refr->act_scr); if(disp_refr->prev_scr) lv_obj_update_layout(disp_refr->prev_scr); lv_obj_update_layout(disp_refr->bottom_layer); lv_obj_update_layout(disp_refr->top_layer); lv_obj_update_layout(disp_refr->sys_layer); + LV_PROFILER_END_TAG("layout"); /*Do nothing if there is no active screen*/ if(disp_refr->act_scr == NULL) { @@ -911,7 +913,8 @@ void refr_obj(lv_layer_t * layer, lv_obj_t * obj) layer_draw_dsc.rotation = lv_obj_get_style_transform_rotation(obj, 0); while(layer_draw_dsc.rotation > 3600) layer_draw_dsc.rotation -= 3600; while(layer_draw_dsc.rotation < 0) layer_draw_dsc.rotation += 3600; - layer_draw_dsc.zoom = lv_obj_get_style_transform_scale(obj, 0); + layer_draw_dsc.zoom_x = lv_obj_get_style_transform_scale_x(obj, 0); + layer_draw_dsc.zoom_y = lv_obj_get_style_transform_scale_y(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.src = new_layer; diff --git a/project/gui/lvgl/src/core/lv_refr.h b/project/gui/lvgl/src/core/lv_refr.h index 32921db9f..5bc6c667f 100644 --- a/project/gui/lvgl/src/core/lv_refr.h +++ b/project/gui/lvgl/src/core/lv_refr.h @@ -57,7 +57,7 @@ void lv_refr_now(lv_display_t * disp); /** * Redrawn on object an all its children using the passed draw context - * @param draw_ctx pointer to an initialized draw context + * @param layer pointer to a layer where to draw. * @param obj the start object from the redraw should start */ void lv_obj_redraw(lv_layer_t * layer, lv_obj_t * obj); diff --git a/project/gui/lvgl/src/dev/display/drm/lv_linux_drm.c b/project/gui/lvgl/src/dev/display/drm/lv_linux_drm.c index 3aeb67796..e9f7f7b63 100644 --- a/project/gui/lvgl/src/dev/display/drm/lv_linux_drm.c +++ b/project/gui/lvgl/src/dev/display/drm/lv_linux_drm.c @@ -65,9 +65,10 @@ typedef struct { drmModePropertyPtr plane_props[128]; drmModePropertyPtr crtc_props[128]; drmModePropertyPtr conn_props[128]; - drm_buffer_t drm_bufs[2]; /* DUMB buffers */ - uint8_t active_drm_buf_idx; /* double buffering handling */ - bool inactive_drm_buf_dirty; + drm_buffer_t drm_bufs[2]; /*DUMB buffers*/ + uint8_t active_drm_buf_idx; /*Double buffering handling*/ + uint8_t * intermediate_buffer; + unsigned long int intermediate_buffer_size; } drm_dev_t; /********************** @@ -155,10 +156,8 @@ void lv_linux_drm_set_file(lv_display_t * disp, const char * file, int64_t conne lv_coord_t ver_res = drm_dev->height; lv_coord_t width = drm_dev->mmWidth; - uint32_t draw_buf_size = hor_res * ver_res / 4; /*1/4 screen sized buffer has the same performance */ - lv_color_t * draw_buf = malloc(draw_buf_size * sizeof(lv_color_t)); - LV_ASSERT_MALLOC(draw_buf); - lv_display_set_draw_buffers(disp, draw_buf, NULL, draw_buf_size, LV_DISPLAY_RENDER_MODE_PARTIAL); + lv_display_set_draw_buffers(disp, drm_dev->intermediate_buffer, NULL, drm_dev->intermediate_buffer_size, + LV_DISPLAY_RENDER_MODE_DIRECT); lv_display_set_resolution(disp, hor_res, ver_res); if(width) { @@ -734,9 +733,7 @@ static int drm_allocate_dumb(drm_dev_t * drm_dev, drm_buffer_t * buf) buf->handle = creq.handle; buf->pitch = creq.pitch; - LV_LOG_TRACE("pitch %d", buf->pitch); buf->size = creq.size; - LV_LOG_TRACE("size %d", buf->size); /* prepare buffer for memory mapping */ lv_memzero(&mreq, sizeof(mreq)); @@ -748,6 +745,7 @@ static int drm_allocate_dumb(drm_dev_t * drm_dev, drm_buffer_t * buf) } buf->offset = mreq.offset; + LV_LOG_INFO("size %lu pitch %u offset %u", buf->size, buf->pitch, buf->offset); /* perform actual memory mapping */ buf->map = mmap(0, creq.size, PROT_READ | PROT_WRITE, MAP_SHARED, drm_dev->fd, mreq.offset); @@ -777,7 +775,7 @@ static int drm_setup_buffers(drm_dev_t * drm_dev) { int ret; - /* Allocate DUMB buffers */ + /*Allocate DUMB buffers*/ ret = drm_allocate_dumb(drm_dev, &drm_dev->drm_bufs[0]); if(ret) return ret; @@ -786,6 +784,14 @@ static int drm_setup_buffers(drm_dev_t * drm_dev) if(ret) return ret; + /*Allocate third buffer that flushes go into*/ + drm_dev->intermediate_buffer_size = drm_dev->width * drm_dev->height * (LV_COLOR_DEPTH / 8); + LV_ASSERT(drm_dev->intermediate_buffer_size <= drm_dev->drm_bufs[0].size); + LV_ASSERT(drm_dev->intermediate_buffer_size <= drm_dev->drm_bufs[1].size); + drm_dev->intermediate_buffer = malloc(drm_dev->intermediate_buffer_size); + LV_ASSERT_MALLOC(drm_dev->intermediate_buffer); + lv_memzero(drm_dev->intermediate_buffer, drm_dev->intermediate_buffer_size); + return 0; } @@ -811,32 +817,21 @@ static void drm_wait_vsync(drm_dev_t * drm_dev) static void drm_flush(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map) { - drm_dev_t * drm_dev = lv_display_get_driver_data(disp); - drm_buffer_t * fbuf = &drm_dev->drm_bufs[!drm_dev->active_drm_buf_idx]; - uint32_t w = (area->x2 - area->x1 + 1); - uint32_t h = (area->y2 - area->y1 + 1); - int i, y; - - LV_LOG_TRACE("x %d:%d y %d:%d w %d h %d", area->x1, area->x2, area->y1, area->y2, w, h); + LV_UNUSED(area); + LV_UNUSED(px_map); - /*Wait for last requested buffer swap to complete*/ - if(drm_dev->req) - drm_wait_vsync(drm_dev); + if(lv_display_flush_is_last(disp)) { + drm_dev_t * drm_dev = lv_display_get_driver_data(disp); - /*Prepare background buffer for partial update*/ - if(drm_dev->inactive_drm_buf_dirty && (area->x1 != 0 || area->y1 != 0 || w != drm_dev->width || h != drm_dev->height)) - lv_memcpy(fbuf->map, drm_dev->drm_bufs[drm_dev->active_drm_buf_idx].map, fbuf->size); - drm_dev->inactive_drm_buf_dirty = false; + /*Wait for last requested buffer swap to complete*/ + if(drm_dev->req) + drm_wait_vsync(drm_dev); - /*Flush to background buffer*/ - for(y = 0, i = area->y1 ; i <= area->y2 ; ++i, ++y) { - lv_memcpy(fbuf->map + (area->x1 * (LV_COLOR_DEPTH / 8)) + (fbuf->pitch * i), - px_map + (w * (LV_COLOR_DEPTH / 8) * y), - w * (LV_COLOR_DEPTH / 8)); - } + /*Update background buffer from intermediate buffer*/ + drm_buffer_t * fbuf = &drm_dev->drm_bufs[drm_dev->active_drm_buf_idx ^ 1]; + lv_memcpy(fbuf->map, drm_dev->intermediate_buffer, drm_dev->intermediate_buffer_size); - /*Request buffer swap*/ - if(lv_display_flush_is_last(disp)) { + /*Request buffer swap*/ if(drm_dmabuf_set_plane(drm_dev, fbuf)) { LV_LOG_ERROR("Flush fail"); return; @@ -844,8 +839,7 @@ static void drm_flush(lv_display_t * disp, const lv_area_t * area, uint8_t * px_ else LV_LOG_TRACE("Flush done"); - drm_dev->active_drm_buf_idx = !drm_dev->active_drm_buf_idx; - drm_dev->inactive_drm_buf_dirty = true; + drm_dev->active_drm_buf_idx ^= 1; } lv_display_flush_ready(disp); diff --git a/project/gui/lvgl/src/dev/evdev/Makefile b/project/gui/lvgl/src/dev/evdev/Makefile new file mode 100644 index 000000000..42b8633fa --- /dev/null +++ b/project/gui/lvgl/src/dev/evdev/Makefile @@ -0,0 +1 @@ +obj-y += lv_evdev.o diff --git a/project/gui/lvgl/src/dev/evdev/lv_evdev.c b/project/gui/lvgl/src/dev/evdev/lv_evdev.c new file mode 100644 index 000000000..069b4ea6b --- /dev/null +++ b/project/gui/lvgl/src/dev/evdev/lv_evdev.c @@ -0,0 +1,224 @@ +/** + * @file lv_evdev.c + * + */ + +/********************** + * INCLUDES + **********************/ +#include "lv_evdev.h" +#if LV_USE_EVDEV + +#include +#include +#include +#include /*To detect BSD*/ +#ifdef BSD + #include +#else + #include +#endif /*BSD*/ +#include "../../misc/lv_assert.h" +#include "../../misc/lv_math.h" +#include "../../stdlib/lv_mem.h" +#include "../../stdlib/lv_string.h" +#include "../../display/lv_display.h" + +/********************** + * TYPEDEFS + **********************/ + +typedef struct { + /*Device*/ + int fd; + /*Config*/ + bool swap_axes; + int min_x; + int min_y; + int max_x; + int max_y; + /*State*/ + int root_x; + int root_y; + int key; + lv_indev_state_t state; +} lv_evdev_t; + +/********************** + * STATIC FUNCTIONS + **********************/ + +static int _evdev_process_key(uint16_t code) +{ + switch(code) { + case KEY_UP: + return LV_KEY_UP; + case KEY_DOWN: + return LV_KEY_DOWN; + case KEY_RIGHT: + return LV_KEY_RIGHT; + case KEY_LEFT: + return LV_KEY_LEFT; + case KEY_ESC: + return LV_KEY_ESC; + case KEY_DELETE: + return LV_KEY_DEL; + case KEY_BACKSPACE: + return LV_KEY_BACKSPACE; + case KEY_ENTER: + return LV_KEY_ENTER; + case KEY_NEXT: + case KEY_TAB: + return LV_KEY_NEXT; + case KEY_PREVIOUS: + return LV_KEY_PREV; + case KEY_HOME: + return LV_KEY_HOME; + case KEY_END: + return LV_KEY_END; + default: + return 0; + } +} + +static int _evdev_calibrate(int v, int in_min, int in_max, int out_min, int out_max) +{ + if(in_min != in_max) v = (v - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; + return LV_CLAMP(out_min, v, out_max); +} + +static lv_point_t _evdev_process_pointer(lv_indev_t * indev, int x, int y) +{ + lv_display_t * disp = lv_indev_get_disp(indev); + lv_evdev_t * dsc = lv_indev_get_driver_data(indev); + LV_ASSERT_NULL(dsc); + + int swapped_x = dsc->swap_axes ? y : x; + int swapped_y = dsc->swap_axes ? x : y; + + int offset_x = lv_display_get_offset_x(disp); + int offset_y = lv_display_get_offset_y(disp); + int width = lv_display_get_horizontal_resolution(disp); + int height = lv_display_get_vertical_resolution(disp); + + lv_point_t p; + p.x = _evdev_calibrate(swapped_x, dsc->min_x, dsc->max_x, offset_x, offset_x + width - 1); + p.y = _evdev_calibrate(swapped_y, dsc->min_y, dsc->max_y, offset_y, offset_y + height - 1); + return p; +} + +static void _evdev_read(lv_indev_t * indev, lv_indev_data_t * data) +{ + lv_evdev_t * dsc = lv_indev_get_driver_data(indev); + LV_ASSERT_NULL(dsc); + + /*Update dsc with buffered events*/ + struct input_event in = { 0 }; + while(read(dsc->fd, &in, sizeof(in)) > 0) { + if(in.type == EV_REL) { + if(in.code == REL_X) dsc->root_x += in.value; + else if(in.code == REL_Y) dsc->root_y += in.value; + } + else if(in.type == EV_ABS) { + if(in.code == ABS_X || in.code == ABS_MT_POSITION_X) dsc->root_x = in.value; + else if(in.code == ABS_Y || in.code == ABS_MT_POSITION_Y) dsc->root_y = in.value; + else if(in.code == ABS_MT_TRACKING_ID) { + if(in.value == -1) dsc->state = LV_INDEV_STATE_RELEASED; + else if(in.value == 0) dsc->state = LV_INDEV_STATE_PRESSED; + } + } + else if(in.type == EV_KEY) { + if(in.code == BTN_MOUSE || in.code == BTN_TOUCH) { + if(in.value == 0) dsc->state = LV_INDEV_STATE_RELEASED; + else if(in.value == 1) dsc->state = LV_INDEV_STATE_PRESSED; + } + else { + dsc->key = _evdev_process_key(in.code); + if(dsc->key) { + dsc->state = in.value ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEASED; + data->continue_reading = true; /*Keep following events in buffer for now*/ + break; + } + } + } + } + + /*Process and store in data*/ + switch(lv_indev_get_type(indev)) { + case LV_INDEV_TYPE_KEYPAD: + data->state = dsc->state; + data->key = dsc->key; + break; + case LV_INDEV_TYPE_POINTER: + data->state = dsc->state; + data->point = _evdev_process_pointer(indev, dsc->root_x, dsc->root_y); + break; + default: + break; + } +} + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +lv_indev_t * lv_evdev_create(lv_indev_type_t indev_type, const char * dev_path) +{ + lv_evdev_t * dsc = lv_malloc(sizeof(lv_evdev_t)); + LV_ASSERT_MALLOC(dsc); + if(dsc == NULL) return NULL; + lv_memzero(dsc, sizeof(lv_evdev_t)); + + dsc->fd = open(dev_path, O_RDONLY | O_NOCTTY | O_CLOEXEC); + if(dsc->fd < 0) { + LV_LOG_ERROR("open failed: %s", strerror(errno)); + goto err_after_malloc; + } + + if(fcntl(dsc->fd, F_SETFL, O_NONBLOCK) < 0) { + LV_LOG_ERROR("fcntl failed: %s", strerror(errno)); + goto err_after_open; + } + + lv_indev_t * indev = lv_indev_create(); + if(indev == NULL) goto err_after_open; + lv_indev_set_type(indev, indev_type); + lv_indev_set_read_cb(indev, _evdev_read); + lv_indev_set_driver_data(indev, dsc); + return indev; + +err_after_open: + close(dsc->fd); +err_after_malloc: + lv_free(dsc); + return NULL; +} + +void lv_evdev_set_swap_axes(lv_indev_t * indev, bool swap_axes) +{ + lv_evdev_t * dsc = lv_indev_get_driver_data(indev); + LV_ASSERT_NULL(dsc); + dsc->swap_axes = swap_axes; +} + +void lv_evdev_set_calibration(lv_indev_t * indev, int min_x, int min_y, int max_x, int max_y) +{ + lv_evdev_t * dsc = lv_indev_get_driver_data(indev); + LV_ASSERT_NULL(dsc); + dsc->min_x = min_x; + dsc->min_y = min_y; + dsc->max_x = max_x; + dsc->max_y = max_y; +} + +void lv_evdev_delete(lv_indev_t * indev) +{ + lv_evdev_t * dsc = lv_indev_get_driver_data(indev); + LV_ASSERT_NULL(dsc); + close(dsc->fd); + lv_free(dsc); + + lv_indev_delete(indev); +} + +#endif /*LV_USE_EVDEV*/ diff --git a/project/gui/lvgl/src/dev/evdev/lv_evdev.h b/project/gui/lvgl/src/dev/evdev/lv_evdev.h new file mode 100644 index 000000000..95ab1544c --- /dev/null +++ b/project/gui/lvgl/src/dev/evdev/lv_evdev.h @@ -0,0 +1,64 @@ +/** + * @file lv_evdev.h + * + */ + +#ifndef LV_EVDEV_H +#define LV_EVDEV_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ + +#include "../../indev/lv_indev.h" + +#if LV_USE_EVDEV + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Create evdev input device. + * @param type LV_INDEV_TYPE_POINTER or LV_INDEV_TYPE_KEYPAD + * @param dev_path device path, e.g., /dev/input/event0 + * @return pointer to input device or NULL if opening failed + */ +lv_indev_t * lv_evdev_create(lv_indev_type_t indev_type, const char * dev_path); + +/** + * Set whether coordinates of pointer device should be swapped. Defaults to + * false. + * @param indev evdev input device + * @param swap_axes whether to swap x and y axes + */ +void lv_evdev_set_swap_axes(lv_indev_t * indev, bool swap_axes); + +/** + * Configure a coordinate transformation for pointer devices. Applied after + * axis swap, if any. Defaults to apply no transformation. + * @param indev evdev input device + * @param min_x pointer coordinate mapped to min x of display + * @param min_y pointer coordinate mapped to min y of display + * @param max_x pointer coordinate mapped to max x of display + * @param max_y pointer coordinate mapped to max y of display + */ +void lv_evdev_set_calibration(lv_indev_t * indev, int min_x, int min_y, int max_x, int max_y); + +/** + * Remove evdev input device. + * @param indev evdev input device to close and free + */ +void lv_evdev_delete(lv_indev_t * indev); + +#endif /*LV_USE_EVDEV*/ + +#ifdef __cplusplus +} /*extern "C"*/ +#endif + +#endif /*LV_EVDEV_H*/ diff --git a/project/gui/lvgl/src/dev/nuttx/Makefile b/project/gui/lvgl/src/dev/nuttx/Makefile index 3e7d682eb..53d242aff 100644 --- a/project/gui/lvgl/src/dev/nuttx/Makefile +++ b/project/gui/lvgl/src/dev/nuttx/Makefile @@ -1,4 +1,5 @@ obj-y += lv_nuttx_entry.o obj-y += lv_nuttx_fbdev.o obj-y += lv_nuttx_lcd.o +obj-y += lv_nuttx_libuv.o obj-y += lv_nuttx_touchscreen.o diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.c b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.c index 844e67736..74bb02fae 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.c +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.c @@ -13,7 +13,8 @@ #include #include #include -#include + +#include "../../../lvgl.h" /********************* * DEFINES @@ -44,10 +45,6 @@ static void syslog_print(lv_log_level_t level, const char * buf); #if LV_ENABLE_GLOBAL_CUSTOM -/**************************************************************************** - * Name: lv_global_free - ****************************************************************************/ - static void lv_global_free(void * data) { if(data) { @@ -55,10 +52,6 @@ static void lv_global_free(void * data) } } -/**************************************************************************** - * Name: lv_global_default - ****************************************************************************/ - lv_global_t * lv_global_default(void) { static int index = -1; @@ -79,46 +72,50 @@ lv_global_t * lv_global_default(void) } #endif -void lv_nuttx_info_init(lv_nuttx_t * info) +void lv_nuttx_dsc_init(lv_nuttx_dsc_t * dsc) { - lv_memzero(info, sizeof(lv_nuttx_t)); - info->fb_path = "/dev/fb0"; - info->input_path = "/dev/input0"; + lv_memzero(dsc, sizeof(lv_nuttx_dsc_t)); + dsc->fb_path = "/dev/fb0"; + dsc->input_path = "/dev/input0"; } -lv_display_t * lv_nuttx_init(const lv_nuttx_t * info) +void lv_nuttx_init(const lv_nuttx_dsc_t * dsc, lv_nuttx_result_t * result) { - lv_display_t * disp = NULL; - lv_log_register_print_cb(syslog_print); lv_tick_set_cb(millis); #if !LV_USE_NUTTX_CUSTOM_INIT - if(info && info->fb_path) { + if(dsc && dsc->fb_path) { + lv_display_t * disp = NULL; + #if LV_USE_NUTTX_LCD - disp = lv_nuttx_lcd_create(info->fb_path); + disp = lv_nuttx_lcd_create(dsc->fb_path); #else disp = lv_nuttx_fbdev_create(); - if(lv_nuttx_fbdev_set_file(disp, info->fb_path) != 0) { + if(lv_nuttx_fbdev_set_file(disp, dsc->fb_path) != 0) { lv_display_remove(disp); disp = NULL; } #endif + if(result) { + result->disp = disp; + } } - if(info && info->input_path) { + if(dsc && dsc->input_path) { #if LV_USE_NUTTX_TOUCHSCREEN - lv_nuttx_touchscreen_create(info->input_path); + lv_indev_t * indev = lv_nuttx_touchscreen_create(dsc->input_path); + if(result) { + result->indev = indev; + } #endif } #else - disp = lv_nuttx_init_custom(info); + lv_nuttx_init_custom(dsc, result); #endif - - return disp; } /********************** diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.h b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.h index 9377f2fb6..48d681835 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.h +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_entry.h @@ -33,33 +33,37 @@ extern "C" { typedef struct { const char * fb_path; const char * input_path; - bool need_wait_vsync; -} lv_nuttx_t; +} lv_nuttx_dsc_t; +typedef struct { + lv_display_t * disp; + lv_indev_t * indev; +} lv_nuttx_result_t; /********************** * GLOBAL PROTOTYPES **********************/ /** - * Initialize the lv_nuttx_t structure with default values for the NuttX port of LVGL. - * @param info Pointer to the lv_nuttx_t structure to be initialized. + * Initialize the lv_nuttx_dsc_t structure with default values for the NuttX port of LVGL. + * @param dsc Pointer to the lv_nuttx_dsc_t structure to be initialized. */ -void lv_nuttx_info_init(lv_nuttx_t * info); +void lv_nuttx_dsc_init(lv_nuttx_dsc_t * dsc); /** * Initialize the LVGL display driver for NuttX using the provided configuration information. - * @param info Pointer to the lv_nuttx_t structure containing the configuration information for the display driver. - * @return Pointer to the lv_display_t structure representing the initialized display driver. + * @param dsc Pointer to the lv_nuttx_dsc_t structure containing the configuration information for the display driver. + * @param result Pointer to the lv_nuttx_result_t structure containing display and input device handler. */ -lv_display_t * lv_nuttx_init(const lv_nuttx_t * info); +void lv_nuttx_init(const lv_nuttx_dsc_t * dsc, lv_nuttx_result_t * result); #if LV_USE_NUTTX_CUSTOM_INIT /** * Initialize the LVGL display driver for NuttX using the provided custom configuration information. - * @param info Pointer to the lv_nuttx_t structure containing the custom configuration information for the display driver. - * @return Pointer to the lv_display_t structure representing the initialized display driver. + * @param dsc Pointer to the lv_nuttx_dsc_t structure containing the custom configuration for the display driver. + * @param result Pointer to the lv_nuttx_result_t structure containing display and input device handler. */ -lv_display_t * lv_nuttx_init_custom(const lv_nuttx_t * info); +void lv_nuttx_init_custom(const lv_nuttx_dsc_t * dsc, lv_nuttx_result_t * result); + #endif /* LV_USE_NUTTX_CUSTOM_INIT */ /********************** diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.c b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.c index 63285150b..b63b79769 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.c +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.c @@ -15,11 +15,12 @@ #include #include #include +#include #include #include #include -#include +#include "../../../lvgl.h" #include "../../lvgl_private.h" /********************* @@ -47,6 +48,7 @@ typedef struct { static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * color_p); static int fbdev_get_pinfo(int fd, struct fb_planeinfo_s * pinfo); static int fbdev_init_mem2(lv_nuttx_fb_t * dsc); +static void _display_refr_timer_cb(lv_timer_t * tmr); /********************** * STATIC VARIABLES @@ -60,10 +62,6 @@ static int fbdev_init_mem2(lv_nuttx_fb_t * dsc); * GLOBAL FUNCTIONS **********************/ -/**************************************************************************** - * Name: lv_nuttx_fbdev_create - ****************************************************************************/ - lv_display_t * lv_nuttx_fbdev_create(void) { lv_nuttx_fb_t * dsc = lv_malloc(sizeof(lv_nuttx_fb_t)); @@ -82,10 +80,6 @@ lv_display_t * lv_nuttx_fbdev_create(void) return disp; } -/**************************************************************************** - * Name: lv_nuttx_fbdev_set_file - ****************************************************************************/ - int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file) { int ret; @@ -95,6 +89,7 @@ int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file) if(dsc->fd >= 0) close(dsc->fd); /* Open the file for reading and writing*/ + dsc->fd = open(file, O_RDWR); if(dsc->fd < 0) { LV_LOG_ERROR("Error: cannot open framebuffer device"); @@ -127,6 +122,7 @@ int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file) } /* double buffer mode */ + if(dsc->pinfo.yres_virtual == (dsc->vinfo.yres * 2)) { if((ret = fbdev_init_mem2(dsc)) < 0) { goto errout; @@ -135,7 +131,9 @@ int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file) lv_display_set_draw_buffers(disp, dsc->mem, dsc->mem2, (dsc->pinfo.stride * dsc->vinfo.yres), LV_DISP_RENDER_MODE_DIRECT); + lv_display_set_user_data(disp, (void *)(uintptr_t)(dsc->fd)); lv_display_set_resolution(disp, dsc->vinfo.xres, dsc->vinfo.yres); + lv_timer_set_cb(disp->refr_timer, _display_refr_timer_cb); LV_LOG_INFO("Resolution is set to %dx%d at %ddpi", dsc->vinfo.xres, dsc->vinfo.yres, lv_display_get_dpi(disp)); return 0; @@ -150,10 +148,30 @@ int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file) * STATIC FUNCTIONS **********************/ -static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * color_p) +static void _display_refr_timer_cb(lv_timer_t * tmr) { + lv_display_t * disp = lv_timer_get_user_data(tmr); lv_nuttx_fb_t * dsc = lv_display_get_driver_data(disp); + struct pollfd pfds[1]; + + lv_memset(pfds, 0, sizeof(pfds)); + pfds[0].fd = dsc->fd; + pfds[0].events = POLLOUT; + /* Query free fb to draw */ + + if(poll(pfds, 1, 0) < 0) { + return; + } + + if(pfds[0].revents & POLLOUT) { + _lv_display_refr_timer(tmr); + } +} + +static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * color_p) +{ + lv_nuttx_fb_t * dsc = lv_display_get_driver_data(disp); /* Skip the non-last flush */ @@ -171,6 +189,7 @@ static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * colo #if defined(CONFIG_FB_UPDATE) /*May be some direct update command is required*/ + struct fb_area_s fb_area; fb_area.x = area->x1; fb_area.y = area->y1; @@ -182,6 +201,7 @@ static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * colo #endif /* double framebuffer */ + if(dsc->mem2 != NULL) { if(disp->buf_act == disp->buf_1) { dsc->pinfo.yoffset = 0; @@ -197,11 +217,6 @@ static void flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * colo lv_display_flush_ready(disp); } - -/**************************************************************************** - * Name: fbdev_get_pinfo - ****************************************************************************/ - static int fbdev_get_pinfo(int fd, FAR struct fb_planeinfo_s * pinfo) { if(ioctl(fd, FBIOGET_PLANEINFO, (unsigned long)((uintptr_t)pinfo)) < 0) { @@ -216,7 +231,7 @@ static int fbdev_get_pinfo(int fd, FAR struct fb_planeinfo_s * pinfo) LV_LOG_INFO(" display: %u", pinfo->display); LV_LOG_INFO(" bpp: %u", pinfo->bpp); - /* Only these pixel depths are supported. viinfo.fmt is ignored, only + /* Only these pixel depths are supported. vinfo.fmt is ignored, only * certain color formats are supported. */ @@ -229,17 +244,13 @@ static int fbdev_get_pinfo(int fd, FAR struct fb_planeinfo_s * pinfo) return 0; } -/**************************************************************************** - * Name: fbdev_init_mem2 - ****************************************************************************/ - static int fbdev_init_mem2(lv_nuttx_fb_t * dsc) { uintptr_t buf_offset; struct fb_planeinfo_s pinfo; int ret; - memset(&pinfo, 0, sizeof(pinfo)); + lv_memset(&pinfo, 0, sizeof(pinfo)); /* Get display[1] planeinfo */ diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.h b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.h index e6b8be39c..994c4973b 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.h +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_fbdev.h @@ -14,7 +14,7 @@ extern "C" { * INCLUDES *********************/ -#include "lv_nuttx_entry.h" +#include "../../display/lv_display.h" #if LV_USE_NUTTX @@ -29,8 +29,17 @@ extern "C" { /********************** * GLOBAL PROTOTYPES **********************/ + +/** + * Create a new display with NuttX backend. + */ lv_display_t * lv_nuttx_fbdev_create(void); +/** + * Initialize display with specified framebuffer device + * @param disp pointer to display with NuttX backend + * @param file the name of framebuffer device + */ int lv_nuttx_fbdev_set_file(lv_display_t * disp, const char * file); /********************** diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.c b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.c index 7624d052c..9f29359d0 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.c +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.c @@ -9,6 +9,8 @@ #include "lv_nuttx_lcd.h" +#if LV_USE_NUTTX + #if LV_USE_NUTTX_LCD #include @@ -20,7 +22,7 @@ #include #include -#include +#include "../../../lvgl.h" #include "../../lvgl_private.h" /********************* @@ -134,7 +136,7 @@ static void rounder_cb(lv_event_t * e) static void flush_cb(lv_display_t * disp, const lv_area_t * area_p, uint8_t * color_p) { - lv_nuttx_lcd_t * lcd = disp->user_data; + lv_nuttx_lcd_t * lcd = disp->driver_data; lcd->area.row_start = area_p->y1; lcd->area.row_end = area_p->y2; @@ -198,9 +200,12 @@ static lv_display_t * lcd_init(int fd, int hor_res, int ver_res) lv_display_set_draw_buffers(lcd->disp, draw_buf, draw_buf_2, buf_size, render_mode); lv_display_set_flush_cb(lcd->disp, flush_cb); lv_event_add(&lcd->disp->event_list, rounder_cb, LV_EVENT_INVALIDATE_AREA, lcd); - lcd->disp->user_data = lcd; + lcd->disp->driver_data = lcd; + lcd->disp->user_data = (void *)(uintptr_t)fd; return lcd->disp; } #endif /*LV_USE_NUTTX_LCD*/ + +#endif /* LV_USE_NUTTX*/ diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.h b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.h index 93c4290a9..16e24ff8f 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.h +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_lcd.h @@ -14,7 +14,9 @@ extern "C" { * INCLUDES *********************/ -#include "lv_nuttx_entry.h" +#include "../../display/lv_display.h" + +#if LV_USE_NUTTX #if LV_USE_NUTTX_LCD @@ -38,6 +40,8 @@ lv_display_t * lv_nuttx_lcd_create(const char * dev_path); #endif /* LV_USE_NUTTX_LCD */ +#endif /* LV_USE_NUTTX*/ + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_libuv.c b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_libuv.c new file mode 100644 index 000000000..58642f1cc --- /dev/null +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_libuv.c @@ -0,0 +1,297 @@ +/** + * @file lv_nuttx_libuv.c + */ + +/********************* + * INCLUDES + *********************/ +#include "lv_nuttx_libuv.h" +#include + +#include "../../../lvgl.h" +#include "../../lvgl_private.h" + +#if LV_USE_NUTTX + +#if LV_USE_NUTTX_LIBUV +#include + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +typedef struct { + int fd; + bool polling; + uv_poll_t fb_poll; +} lv_nuttx_uv_fb_ctx_t; + +typedef struct { + int fd; + uv_poll_t input_poll; +} lv_nuttx_uv_input_ctx_t; + +typedef struct { + uv_timer_t uv_timer; + lv_nuttx_uv_fb_ctx_t fb_ctx; + lv_nuttx_uv_input_ctx_t input_ctx; +} lv_nuttx_uv_ctx_t; + +/********************** + * STATIC PROTOTYPES + **********************/ + +static void lv_nuttx_uv_timer_cb(uv_timer_t * handle); +static int lv_nuttx_uv_timer_init(lv_nuttx_uv_t * uv_info, lv_nuttx_uv_ctx_t * uv_ctx); +static void lv_nuttx_uv_timer_deinit(lv_nuttx_uv_ctx_t * uv_ctx); + +static void lv_nuttx_uv_disp_poll_cb(uv_poll_t * handle, int status, int events); +static void lv_nuttx_uv_disp_refr_req_cb(lv_event_t * e); +static int lv_nuttx_uv_fb_init(lv_nuttx_uv_t * uv_info, lv_nuttx_uv_fb_ctx_t * fb_ctx); +static void lv_nuttx_uv_fb_deinit(lv_nuttx_uv_fb_ctx_t * fb_ctx); + +static void lv_nuttx_uv_input_poll_cb(uv_poll_t * handle, int status, int events); +static int lv_nuttx_uv_input_init(lv_nuttx_uv_t * uv_info, lv_nuttx_uv_input_ctx_t * input_ctx); +static void lv_nuttx_uv_input_deinit(lv_nuttx_uv_input_ctx_t * input_ctx); + +/********************** + * STATIC VARIABLES + **********************/ + +/********************** + * MACROS + **********************/ + +/********************** + * GLOBAL FUNCTIONS + **********************/ + +void * lv_nuttx_uv_init(lv_nuttx_uv_t * uv_info) +{ + lv_nuttx_uv_ctx_t * uv_ctx; + int ret; + + uv_ctx = lv_malloc(sizeof(lv_nuttx_uv_ctx_t)); + LV_ASSERT_MALLOC(uv_ctx); + if(uv_ctx == NULL) return NULL; + lv_memset(uv_ctx, 0, sizeof(lv_nuttx_uv_ctx_t)); + + if((ret = lv_nuttx_uv_timer_init(uv_info, uv_ctx)) < 0) { + LV_LOG_ERROR("lv_nuttx_uv_timer_init fail : %d", ret); + goto err_out; + } + + if((ret = lv_nuttx_uv_fb_init(uv_info, &uv_ctx->fb_ctx)) < 0) { + LV_LOG_ERROR("lv_nuttx_uv_fb_init fail : %d", ret); + goto err_out; + } + + if((ret = lv_nuttx_uv_input_init(uv_info, &uv_ctx->input_ctx)) < 0) { + LV_LOG_ERROR("lv_nuttx_uv_input_init fail : %d", ret); + goto err_out; + } + + return uv_ctx; + +err_out: + lv_free(uv_ctx); + return NULL; +} + +void lv_nuttx_uv_deinit(void ** data) +{ + lv_nuttx_uv_ctx_t * uv_ctx = *data; + + if(uv_ctx == NULL) return; + lv_nuttx_uv_input_deinit(&uv_ctx->input_ctx); + lv_nuttx_uv_fb_deinit(&uv_ctx->fb_ctx); + lv_nuttx_uv_timer_deinit(uv_ctx); + + lv_free(uv_ctx); + *data = NULL; +} + +/********************** + * STATIC FUNCTIONS + **********************/ + +static void lv_nuttx_uv_timer_cb(uv_timer_t * handle) +{ + uint32_t sleep_ms; + + sleep_ms = lv_timer_handler(); + + if(sleep_ms == LV_NO_TIMER_READY) { + uv_timer_stop(handle); + return; + } + + /* Prevent busy loops. */ + + if(sleep_ms == 0) { + sleep_ms = 1; + } + + LV_LOG_TRACE("sleep_ms = %" PRIu32, sleep_ms); + uv_timer_start(handle, lv_nuttx_uv_timer_cb, sleep_ms, 0); +} + +static void lv_nuttx_uv_timer_resume(void * data) +{ + uv_timer_t * timer = (uv_timer_t *)data; + if(timer) + uv_timer_start(timer, lv_nuttx_uv_timer_cb, 0, 0); +} + +static int lv_nuttx_uv_timer_init(lv_nuttx_uv_t * uv_info, lv_nuttx_uv_ctx_t * uv_ctx) +{ + uv_loop_t * loop = uv_info->loop; + + LV_ASSERT_NULL(uv_ctx); + LV_ASSERT_NULL(loop); + + uv_timer_init(loop, &uv_ctx->uv_timer); + uv_timer_start(&uv_ctx->uv_timer, lv_nuttx_uv_timer_cb, 1, 1); + + lv_timer_handler_set_resume_cb(lv_nuttx_uv_timer_resume, &uv_ctx->uv_timer); + return 0; +} + +static void lv_nuttx_uv_timer_deinit(lv_nuttx_uv_ctx_t * uv_ctx) +{ + uv_close((uv_handle_t *)&uv_ctx->uv_timer, NULL); +} + +static void lv_nuttx_uv_disp_poll_cb(uv_poll_t * handle, int status, int events) +{ + lv_nuttx_uv_fb_ctx_t * fb_ctx = (lv_nuttx_uv_fb_ctx_t *)(handle->data); + + LV_UNUSED(status); + LV_UNUSED(events); + uv_poll_stop(handle); + _lv_display_refr_timer(NULL); + fb_ctx->polling = false; +} + +static void lv_nuttx_uv_disp_refr_req_cb(lv_event_t * e) +{ + lv_nuttx_uv_fb_ctx_t * fb_ctx = lv_event_get_user_data(e); + + if(fb_ctx->polling) { + return; + } + fb_ctx->polling = true; + uv_poll_start(&fb_ctx->fb_poll, UV_WRITABLE, lv_nuttx_uv_disp_poll_cb); +} + +static int lv_nuttx_uv_fb_init(lv_nuttx_uv_t * uv_info, lv_nuttx_uv_fb_ctx_t * fb_ctx) +{ + uv_loop_t * loop = uv_info->loop; + lv_display_t * disp = uv_info->disp; + + LV_ASSERT_NULL(fb_ctx); + LV_ASSERT_NULL(disp); + LV_ASSERT_NULL(loop); + + fb_ctx->fd = (uintptr_t)lv_display_get_user_data(disp); + + if(fb_ctx->fd <= 0) { + LV_LOG_INFO("skip uv fb init."); + return 0; + } + + if(!disp->refr_timer) { + LV_LOG_ERROR("disp->refr_timer is NULL"); + return -EINVAL; + } + + /* Remove default refr timer. */ + + lv_timer_del(disp->refr_timer); + disp->refr_timer = NULL; + + fb_ctx->fb_poll.data = fb_ctx; + uv_poll_init(loop, &fb_ctx->fb_poll, fb_ctx->fd); + uv_poll_start(&fb_ctx->fb_poll, UV_WRITABLE, lv_nuttx_uv_disp_poll_cb); + + LV_LOG_INFO("lvgl fb loop start OK"); + + /* Register for the invalidate area event */ + + lv_event_add(&disp->event_list, lv_nuttx_uv_disp_refr_req_cb, LV_EVENT_REFR_REQUEST, fb_ctx); + + return 0; +} + +static void lv_nuttx_uv_fb_deinit(lv_nuttx_uv_fb_ctx_t * fb_ctx) +{ + if(fb_ctx->fd > 0) { + uv_close((uv_handle_t *)&fb_ctx->fb_poll, NULL); + } +} + +static void lv_nuttx_uv_input_poll_cb(uv_poll_t * handle, int status, int events) +{ + lv_indev_t * indev = (lv_indev_t *)(handle->data); + + if(status < 0) { + LV_LOG_WARN("input poll error: %s ", uv_strerror(status)); + return; + } + + if(events & UV_READABLE) { + lv_indev_read(indev); + } +} + +static int lv_nuttx_uv_input_init(lv_nuttx_uv_t * uv_info, lv_nuttx_uv_input_ctx_t * input_ctx) +{ + uv_loop_t * loop = uv_info->loop; + lv_indev_t * indev = uv_info->indev; + + if(indev == NULL) { + LV_LOG_INFO("skip uv input init."); + return 0; + } + + LV_ASSERT_NULL(input_ctx); + LV_ASSERT_NULL(loop); + + if(!indev->read_timer) { + LV_LOG_ERROR("indev->read_timer is NULL"); + return -EINVAL; + } + + input_ctx->fd = (uintptr_t)lv_indev_get_user_data(indev); + if(input_ctx->fd <= 0) { + return 0; + } + + /* Remove default indev timer. */ + + lv_timer_del(indev->read_timer); + indev->read_timer = NULL; + + input_ctx->input_poll.data = indev; + uv_poll_init(loop, &input_ctx->input_poll, input_ctx->fd); + uv_poll_start(&input_ctx->input_poll, UV_READABLE, lv_nuttx_uv_input_poll_cb); + + LV_LOG_INFO("lvgl input loop start OK"); + + return 0; +} + +static void lv_nuttx_uv_input_deinit(lv_nuttx_uv_input_ctx_t * input_ctx) +{ + if(input_ctx->fd > 0) { + uv_close((uv_handle_t *)&input_ctx->input_poll, NULL); + } +} + +#endif /*LV_USE_NUTTX_LIBUV*/ + +#endif /*LV_USE_NUTTX*/ diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_libuv.h b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_libuv.h new file mode 100644 index 000000000..0799e67b1 --- /dev/null +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_libuv.h @@ -0,0 +1,66 @@ +/** + * @file lv_nuttx_libuv.h + * + */ + +#ifndef LV_NUTTX_LIBUV_H +#define LV_NUTTX_LIBUV_H + +#ifdef __cplusplus +extern "C" { +#endif + +/********************* + * INCLUDES + *********************/ + +#include "../../display/lv_display.h" +#include "../../indev/lv_indev.h" + +#if LV_USE_NUTTX + +#if LV_USE_NUTTX_LIBUV + +/********************* + * DEFINES + *********************/ + +/********************** + * TYPEDEFS + **********************/ + +typedef struct { + void * loop; + lv_display_t * disp; + lv_indev_t * indev; +} lv_nuttx_uv_t; + +/********************** + * GLOBAL PROTOTYPES + **********************/ + +/** + * Initialize the uv_loop using the provided configuration information. + * @param uv_info Pointer to the lv_nuttx_uv_t structure to be initialized. + */ +void * lv_nuttx_uv_init(lv_nuttx_uv_t * uv_info); + +/** + * Deinitialize the uv_loop configuration for NuttX porting layer. + * @param data Pointer to user data. + */ +void lv_nuttx_uv_deinit(void ** data); + +/********************** + * MACROS + **********************/ + +#endif /*LV_USE_NUTTX_LIBUV*/ + +#endif /*LV_USE_NUTTX*/ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*LV_NUTTX_LIBUV_H*/ diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.c b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.c index 1c0d19883..23d4c0d54 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.c +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.c @@ -8,6 +8,9 @@ *********************/ #include "lv_nuttx_touchscreen.h" + +#if LV_USE_NUTTX + #if LV_USE_NUTTX_TOUCHSCREEN #include @@ -82,7 +85,7 @@ lv_indev_t * lv_nuttx_touchscreen_create(const char * dev_path) static void touchscreen_read(lv_indev_t * drv, lv_indev_data_t * data) { - lv_nuttx_touchscreen_t * touchscreen = drv->user_data; + lv_nuttx_touchscreen_t * touchscreen = drv->driver_data; struct touch_sample_s sample; /* Read one sample */ @@ -132,9 +135,12 @@ static lv_indev_t * touchscreen_init(int fd) touchscreen->indev_drv = lv_indev_create(); touchscreen->indev_drv->type = LV_INDEV_TYPE_POINTER; touchscreen->indev_drv->read_cb = touchscreen_read; - touchscreen->indev_drv->user_data = touchscreen; + touchscreen->indev_drv->driver_data = touchscreen; + touchscreen->indev_drv->user_data = (void *)(uintptr_t)fd; return touchscreen->indev_drv; } #endif /*LV_USE_NUTTX_TOUCHSCREEN*/ + +#endif /* LV_USE_NUTTX*/ diff --git a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.h b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.h index 803853b2a..e0dd1f14f 100644 --- a/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.h +++ b/project/gui/lvgl/src/dev/nuttx/lv_nuttx_touchscreen.h @@ -18,7 +18,9 @@ extern "C" { * INCLUDES *********************/ -#include "lv_nuttx_entry.h" +#include "../../indev/lv_indev.h" + +#if LV_USE_NUTTX #if LV_USE_NUTTX_TOUCHSCREEN @@ -34,6 +36,10 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ +/** + * Initialize indev with specified input device. + * @param dev_path path of input device + */ lv_indev_t * lv_nuttx_touchscreen_create(const char * dev_path); /********************** @@ -42,6 +48,8 @@ lv_indev_t * lv_nuttx_touchscreen_create(const char * dev_path); #endif /* LV_USE_NUTTX_TOUCHSCREEN */ +#endif /* LV_USE_NUTTX*/ + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/project/gui/lvgl/src/display/lv_display.c b/project/gui/lvgl/src/display/lv_display.c index 603b81142..60a0e6f95 100644 --- a/project/gui/lvgl/src/display/lv_display.c +++ b/project/gui/lvgl/src/display/lv_display.c @@ -176,6 +176,10 @@ void lv_display_remove(lv_display_t * disp) _lv_ll_clear(&disp->sync_areas); _lv_ll_remove(disp_ll_p, disp); if(disp->refr_timer) lv_timer_delete(disp->refr_timer); + + if(disp->layer_deinit) disp->layer_deinit(disp, disp->layer_head); + lv_free(disp->layer_head); + lv_free(disp); if(was_default) lv_display_set_default(_lv_ll_get_head(disp_ll_p)); diff --git a/project/gui/lvgl/src/display/lv_display.h b/project/gui/lvgl/src/display/lv_display.h index fd7a8e4ef..55d863c83 100644 --- a/project/gui/lvgl/src/display/lv_display.h +++ b/project/gui/lvgl/src/display/lv_display.h @@ -34,6 +34,7 @@ struct _lv_obj_t; struct _lv_theme_t; struct _lv_display_t; typedef struct _lv_display_t lv_display_t; +typedef struct _lv_display_t lv_disp_drv_t; typedef enum { LV_DISPLAY_ROTATION_0 = 0, diff --git a/project/gui/lvgl/src/draw/lv_draw_arc.c b/project/gui/lvgl/src/draw/lv_draw_arc.c index 6db2816be..6dd0aeaab 100644 --- a/project/gui/lvgl/src/draw/lv_draw_arc.c +++ b/project/gui/lvgl/src/draw/lv_draw_arc.c @@ -66,13 +66,16 @@ void lv_draw_arc(lv_layer_t * layer, const lv_draw_arc_dsc_t * dsc) LV_PROFILER_END; } -void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, uint16_t start_angle, uint16_t end_angle, +void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, lv_value_precise_t start_angle, + lv_value_precise_t end_angle, lv_coord_t w, bool rounded, lv_area_t * area) { lv_coord_t rout = radius; + int32_t start_angle_int = (int32_t) start_angle; + int32_t end_angle_int = (int32_t) end_angle; /*Special case: full arc invalidation */ - if(end_angle == start_angle + 360) { + if(end_angle_int == start_angle_int + 360) { area->x1 = x - rout; area->y1 = y - rout; area->x2 = x + rout; @@ -80,75 +83,75 @@ void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, uint16_t return; } - if(start_angle > 360) start_angle -= 360; - if(end_angle > 360) end_angle -= 360; + if(start_angle_int > 360) start_angle_int -= 360; + if(end_angle_int > 360) end_angle_int -= 360; lv_coord_t rin = radius - w; lv_coord_t extra_area = rounded ? w / 2 + 1 : 0; - uint8_t start_quarter = start_angle / 90; - uint8_t end_quarter = end_angle / 90; + uint8_t start_quarter = start_angle_int / 90; + uint8_t end_quarter = end_angle_int / 90; /*360 deg still counts as quarter 3 (360 / 90 would be 4)*/ if(start_quarter == 4) start_quarter = 3; if(end_quarter == 4) end_quarter = 3; - if(start_quarter == end_quarter && start_angle <= end_angle) { + if(start_quarter == end_quarter && start_angle_int <= end_angle_int) { if(start_quarter == 0) { - area->y1 = y + ((lv_trigo_sin(start_angle) * rin) >> LV_TRIGO_SHIFT) - extra_area; - area->x2 = x + ((lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->y1 = y + ((lv_trigo_sin(start_angle_int) * rin) >> LV_TRIGO_SHIFT) - extra_area; + area->x2 = x + ((lv_trigo_sin(start_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; - area->y2 = y + ((lv_trigo_sin(end_angle) * rout) >> LV_TRIGO_SHIFT) + extra_area; - area->x1 = x + ((lv_trigo_sin(end_angle + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; + area->y2 = y + ((lv_trigo_sin(end_angle_int) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->x1 = x + ((lv_trigo_sin(end_angle_int + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; } else if(start_quarter == 1) { - area->y2 = y + ((lv_trigo_sin(start_angle) * rout) >> LV_TRIGO_SHIFT) + extra_area; - area->x2 = x + ((lv_trigo_sin(start_angle + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; + area->y2 = y + ((lv_trigo_sin(start_angle_int) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->x2 = x + ((lv_trigo_sin(start_angle_int + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; - area->y1 = y + ((lv_trigo_sin(end_angle) * rin) >> LV_TRIGO_SHIFT) - extra_area; - area->x1 = x + ((lv_trigo_sin(end_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->y1 = y + ((lv_trigo_sin(end_angle_int) * rin) >> LV_TRIGO_SHIFT) - extra_area; + area->x1 = x + ((lv_trigo_sin(end_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; } else if(start_quarter == 2) { - area->x1 = x + ((lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; - area->y2 = y + ((lv_trigo_sin(start_angle) * rin) >> LV_TRIGO_SHIFT) + extra_area; + area->x1 = x + ((lv_trigo_sin(start_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->y2 = y + ((lv_trigo_sin(start_angle_int) * rin) >> LV_TRIGO_SHIFT) + extra_area; - area->y1 = y + ((lv_trigo_sin(end_angle) * rout) >> LV_TRIGO_SHIFT) - extra_area; - area->x2 = x + ((lv_trigo_sin(end_angle + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; + area->y1 = y + ((lv_trigo_sin(end_angle_int) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->x2 = x + ((lv_trigo_sin(end_angle_int + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; } else if(start_quarter == 3) { - area->x1 = x + ((lv_trigo_sin(start_angle + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; - area->y1 = y + ((lv_trigo_sin(start_angle) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->x1 = x + ((lv_trigo_sin(start_angle_int + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; + area->y1 = y + ((lv_trigo_sin(start_angle_int) * rout) >> LV_TRIGO_SHIFT) - extra_area; - area->x2 = x + ((lv_trigo_sin(end_angle + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; - area->y2 = y + ((lv_trigo_sin(end_angle) * rin) >> LV_TRIGO_SHIFT) + extra_area; + area->x2 = x + ((lv_trigo_sin(end_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->y2 = y + ((lv_trigo_sin(end_angle_int) * rin) >> LV_TRIGO_SHIFT) + extra_area; } } else if(start_quarter == 0 && end_quarter == 1) { - area->x1 = x + ((lv_trigo_sin(end_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; - area->y1 = y + ((LV_MIN(lv_trigo_sin(end_angle), - lv_trigo_sin(start_angle)) * rin) >> LV_TRIGO_SHIFT) - extra_area; - area->x2 = x + ((lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->x1 = x + ((lv_trigo_sin(end_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->y1 = y + ((LV_MIN(lv_trigo_sin(end_angle_int), + lv_trigo_sin(start_angle_int)) * rin) >> LV_TRIGO_SHIFT) - extra_area; + area->x2 = x + ((lv_trigo_sin(start_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; area->y2 = y + rout + extra_area; } else if(start_quarter == 1 && end_quarter == 2) { area->x1 = x - rout - extra_area; - area->y1 = y + ((lv_trigo_sin(end_angle) * rout) >> LV_TRIGO_SHIFT) - extra_area; - area->x2 = x + ((LV_MAX(lv_trigo_sin(start_angle + 90), - lv_trigo_sin(end_angle + 90)) * rin) >> LV_TRIGO_SHIFT) + extra_area; - area->y2 = y + ((lv_trigo_sin(start_angle) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->y1 = y + ((lv_trigo_sin(end_angle_int) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->x2 = x + ((LV_MAX(lv_trigo_sin(start_angle_int + 90), + lv_trigo_sin(end_angle_int + 90)) * rin) >> LV_TRIGO_SHIFT) + extra_area; + area->y2 = y + ((lv_trigo_sin(start_angle_int) * rout) >> LV_TRIGO_SHIFT) + extra_area; } else if(start_quarter == 2 && end_quarter == 3) { - area->x1 = x + ((lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->x1 = x + ((lv_trigo_sin(start_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; area->y1 = y - rout - extra_area; - area->x2 = x + ((lv_trigo_sin(end_angle + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; - area->y2 = y + (LV_MAX(lv_trigo_sin(end_angle) * rin, - lv_trigo_sin(start_angle) * rin) >> LV_TRIGO_SHIFT) + extra_area; + area->x2 = x + ((lv_trigo_sin(end_angle_int + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->y2 = y + (LV_MAX(lv_trigo_sin(end_angle_int) * rin, + lv_trigo_sin(start_angle_int) * rin) >> LV_TRIGO_SHIFT) + extra_area; } else if(start_quarter == 3 && end_quarter == 0) { - area->x1 = x + ((LV_MIN(lv_trigo_sin(end_angle + 90), - lv_trigo_sin(start_angle + 90)) * rin) >> LV_TRIGO_SHIFT) - extra_area; - area->y1 = y + ((lv_trigo_sin(start_angle) * rout) >> LV_TRIGO_SHIFT) - extra_area; + area->x1 = x + ((LV_MIN(lv_trigo_sin(end_angle_int + 90), + lv_trigo_sin(start_angle_int + 90)) * rin) >> LV_TRIGO_SHIFT) - extra_area; + area->y1 = y + ((lv_trigo_sin(start_angle_int) * rout) >> LV_TRIGO_SHIFT) - extra_area; area->x2 = x + rout + extra_area; - area->y2 = y + ((lv_trigo_sin(end_angle) * rout) >> LV_TRIGO_SHIFT) + extra_area; + area->y2 = y + ((lv_trigo_sin(end_angle_int) * rout) >> LV_TRIGO_SHIFT) + extra_area; } else { diff --git a/project/gui/lvgl/src/draw/lv_draw_arc.h b/project/gui/lvgl/src/draw/lv_draw_arc.h index c7e77d0be..5b06a04cb 100644 --- a/project/gui/lvgl/src/draw/lv_draw_arc.h +++ b/project/gui/lvgl/src/draw/lv_draw_arc.h @@ -30,8 +30,8 @@ typedef struct { lv_color_t color; lv_coord_t width; - uint16_t start_angle; - uint16_t end_angle; + lv_value_precise_t start_angle; + lv_value_precise_t end_angle; lv_point_t center; uint16_t radius; const void * img_src; @@ -60,7 +60,8 @@ void lv_draw_arc(struct _lv_layer_t * layer, const lv_draw_arc_dsc_t * dsc); * @param rounded true: the arc is rounded * @param area store the area to invalidate here */ -void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, uint16_t start_angle, uint16_t end_angle, +void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, lv_value_precise_t start_angle, + lv_value_precise_t end_angle, lv_coord_t w, bool rounded, lv_area_t * area); /********************** diff --git a/project/gui/lvgl/src/draw/lv_draw_image.c b/project/gui/lvgl/src/draw/lv_draw_image.c index d7051ab5b..d02d48366 100644 --- a/project/gui/lvgl/src/draw/lv_draw_image.c +++ b/project/gui/lvgl/src/draw/lv_draw_image.c @@ -43,7 +43,8 @@ void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc) lv_memzero(dsc, sizeof(lv_draw_image_dsc_t)); dsc->recolor = lv_color_black(); dsc->opa = LV_OPA_COVER; - dsc->zoom = LV_SCALE_NONE; + dsc->zoom_x = LV_SCALE_NONE; + dsc->zoom_y = LV_SCALE_NONE; dsc->antialias = LV_COLOR_DEPTH > 8 ? 1 : 0; } diff --git a/project/gui/lvgl/src/draw/lv_draw_image.h b/project/gui/lvgl/src/draw/lv_draw_image.h index 07fca0942..552693b36 100644 --- a/project/gui/lvgl/src/draw/lv_draw_image.h +++ b/project/gui/lvgl/src/draw/lv_draw_image.h @@ -44,7 +44,8 @@ typedef struct _lv_draw_image_dsc_t { lv_coord_t rotation; - lv_coord_t zoom; + lv_coord_t zoom_x; + lv_coord_t zoom_y; lv_point_t pivot; lv_color_t recolor; @@ -68,14 +69,18 @@ void lv_draw_image_dsc_init(lv_draw_image_dsc_t * dsc); /** * Draw an image - * @param draw_ctx pointer to the current draw context + * @param layer pointer to a layer * @param dsc pointer to an initialized `lv_draw_image_dsc_t` variable * @param coords the coordinates of the image - * @param src pointer to a lv_color_t array which contains the pixels of the image */ void lv_draw_image(struct _lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords); - +/** + * Draw a layer on an other layer + * @param layer pointer to a layer + * @param dsc pointer to an initialized `lv_draw_image_dsc_t` variable + * @param coords the coordinates of the layer + */ void lv_draw_layer(struct _lv_layer_t * layer, const lv_draw_image_dsc_t * dsc, const lv_area_t * coords); /** diff --git a/project/gui/lvgl/src/draw/lv_draw_label.c b/project/gui/lvgl/src/draw/lv_draw_label.c index 032d9f769..2e2153d5d 100644 --- a/project/gui/lvgl/src/draw/lv_draw_label.c +++ b/project/gui/lvgl/src/draw/lv_draw_label.c @@ -128,9 +128,9 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_letter(lv_layer_t * layer, lv_draw_label_dsc_ lv_draw_label(layer, dsc, &a); } -void lv_draw_label_interate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc, - const lv_area_t * coords, - lv_draw_letter_cb_t cb) +void lv_draw_label_iterate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc, + const lv_area_t * coords, + lv_draw_letter_cb_t cb) { const lv_font_t * font = dsc->font; int32_t w; diff --git a/project/gui/lvgl/src/draw/lv_draw_label.h b/project/gui/lvgl/src/draw/lv_draw_label.h index e79130d33..08f71fb80 100644 --- a/project/gui/lvgl/src/draw/lv_draw_label.h +++ b/project/gui/lvgl/src/draw/lv_draw_label.h @@ -93,9 +93,9 @@ typedef struct { typedef void(*lv_draw_letter_cb_t)(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * dsc, lv_draw_fill_dsc_t * fill_dsc, const lv_area_t * fill_area); -void lv_draw_label_interate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc, - const lv_area_t * coords, - lv_draw_letter_cb_t cb); +void lv_draw_label_iterate_letters(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * dsc, + const lv_area_t * coords, + lv_draw_letter_cb_t cb); /********************** * GLOBAL PROTOTYPES @@ -107,16 +107,22 @@ void lv_draw_letter_dsc_init(lv_draw_glyph_dsc_t * dsc); /** * Write a text - * @param draw_ctx pointer to the current draw context + * @param layer pointer to a layer * @param dsc pointer to draw descriptor * @param coords coordinates of the label - * @param txt `\0` terminated text to write - * @param hint pointer to a `lv_draw_label_hint_t` variable. * It is managed by the draw to speed up the drawing of very long texts (thousands of lines). */ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords); +/** + * Write a text + * @param layer pointer to a layer + * @param dsc pointer to draw descriptor + * @param point position of the label + * @param unicode_letter the letter to draw + * It is managed by the draw to speed up the drawing of very long texts (thousands of lines). + */ LV_ATTRIBUTE_FAST_MEM void lv_draw_letter(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, const lv_point_t * point, uint32_t unicode_letter); diff --git a/project/gui/lvgl/src/draw/lv_draw_line.h b/project/gui/lvgl/src/draw/lv_draw_line.h index 467a710e1..2f5236d02 100644 --- a/project/gui/lvgl/src/draw/lv_draw_line.h +++ b/project/gui/lvgl/src/draw/lv_draw_line.h @@ -51,10 +51,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_line_dsc_init(lv_draw_line_dsc_t * dsc); /** * Draw a line - * @param draw_ctx pointer to the current draw context + * @param layer pointer to a layer * @param dsc pointer to an initialized `lv_draw_line_dsc_t` variable - * @param point1 first point of the line - * @param point2 second point of the line */ void lv_draw_line(struct _lv_layer_t * layer, const lv_draw_line_dsc_t * dsc); diff --git a/project/gui/lvgl/src/draw/lv_draw_rect.h b/project/gui/lvgl/src/draw/lv_draw_rect.h index 8e82c335f..97e02d204 100644 --- a/project/gui/lvgl/src/draw/lv_draw_rect.h +++ b/project/gui/lvgl/src/draw/lv_draw_rect.h @@ -136,7 +136,7 @@ void lv_draw_bg_image_dsc_init(lv_draw_bg_image_dsc_t * dsc); /** * Draw a rectangle - * @param draw_ctx pointer to the current draw context + * @param layer pointer to a layer * @param dsc pointer to an initialized `lv_draw_rect_dsc_t` variable * @param coords the coordinates of the rectangle */ diff --git a/project/gui/lvgl/src/draw/lv_image_buf.c b/project/gui/lvgl/src/draw/lv_image_buf.c index 1d66af93f..f060726bd 100644 --- a/project/gui/lvgl/src/draw/lv_image_buf.c +++ b/project/gui/lvgl/src/draw/lv_image_buf.c @@ -59,10 +59,11 @@ void lv_image_buf_free(lv_image_dsc_t * dsc) } } -void _lv_image_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom, +void _lv_image_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom_x, + uint16_t zoom_y, const lv_point_t * pivot) { - if(angle == 0 && zoom == LV_SCALE_NONE) { + if(angle == 0 && zoom_x == LV_SCALE_NONE && zoom_y == LV_SCALE_NONE) { res->x1 = 0; res->y1 = 0; res->x2 = w - 1; @@ -76,10 +77,10 @@ void _lv_image_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_ {0, h - 1}, {w - 1, h - 1}, }; - lv_point_transform(&p[0], angle, zoom, pivot); - lv_point_transform(&p[1], angle, zoom, pivot); - lv_point_transform(&p[2], angle, zoom, pivot); - lv_point_transform(&p[3], angle, zoom, pivot); + lv_point_transform(&p[0], angle, zoom_x, zoom_y, pivot, true); + lv_point_transform(&p[1], angle, zoom_x, zoom_y, pivot, true); + lv_point_transform(&p[2], angle, zoom_x, zoom_y, pivot, true); + lv_point_transform(&p[3], angle, zoom_x, zoom_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); res->y1 = LV_MIN4(p[0].y, p[1].y, p[2].y, p[3].y); diff --git a/project/gui/lvgl/src/draw/lv_image_buf.h b/project/gui/lvgl/src/draw/lv_image_buf.h index 392d2b79d..3032d2d24 100644 --- a/project/gui/lvgl/src/draw/lv_image_buf.h +++ b/project/gui/lvgl/src/draw/lv_image_buf.h @@ -20,14 +20,6 @@ extern "C" { /********************* * DEFINES *********************/ -/*If image pixels contains alpha we need to know how much byte is a pixel*/ -#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8 -#define LV_IMG_PX_SIZE_ALPHA_BYTE 2 -#elif LV_COLOR_DEPTH == 16 -#define LV_IMG_PX_SIZE_ALPHA_BYTE 3 -#elif LV_COLOR_DEPTH == 32 -#define LV_IMG_PX_SIZE_ALPHA_BYTE 4 -#endif #define LV_IMAGE_BUF_SIZE_TRUE_COLOR(w, h) ((LV_COLOR_DEPTH / 8) * (w) * (h)) #define LV_IMAGE_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h) ((LV_COLOR_DEPTH / 8) * (w) * (h)) @@ -120,10 +112,12 @@ void lv_image_buf_free(lv_image_dsc_t * dsc); * @param w width of the rectangle to transform * @param h height of the rectangle to transform * @param angle angle of rotation - * @param zoom zoom, (256 no zoom) + * @param zoom_x zoom in x direction, (256 no zoom) + * @param zoom_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, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom, +void _lv_image_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom_x, + uint16_t zoom_y, const lv_point_t * pivot); /********************** diff --git a/project/gui/lvgl/src/draw/lv_image_decoder.c b/project/gui/lvgl/src/draw/lv_image_decoder.c index a3b9cb92e..adffda251 100644 --- a/project/gui/lvgl/src/draw/lv_image_decoder.c +++ b/project/gui/lvgl/src/draw/lv_image_decoder.c @@ -110,6 +110,7 @@ lv_result_t lv_image_decoder_get_info(const void * src, lv_image_header_t * head lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src, lv_color_t color, int32_t frame_id) { + LV_UNUSED(color); lv_memzero(dsc, sizeof(lv_image_decoder_dsc_t)); if(src == NULL) return LV_RESULT_INVALID; @@ -119,7 +120,6 @@ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src if(img_dsc->data == NULL) return LV_RESULT_INVALID; } - dsc->color = color; dsc->src_type = src_type; dsc->frame_id = frame_id; @@ -160,6 +160,7 @@ lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src dsc->error_msg = NULL; dsc->img_data = NULL; + dsc->cache_entry = NULL; dsc->user_data = NULL; dsc->time_to_open = 0; } diff --git a/project/gui/lvgl/src/draw/lv_image_decoder.h b/project/gui/lvgl/src/draw/lv_image_decoder.h index ea3a1895f..9dab56b60 100644 --- a/project/gui/lvgl/src/draw/lv_image_decoder.h +++ b/project/gui/lvgl/src/draw/lv_image_decoder.h @@ -47,6 +47,7 @@ typedef uint8_t lv_image_src_t; /*Decoder function definitions*/ struct _lv_image_decoder_dsc_t; struct _lv_image_decoder_t; +struct _lv_cache_entry_t; /** * Get info from an image and store in the `header` @@ -105,9 +106,6 @@ typedef struct _lv_image_decoder_dsc_t { /**The image source. A file path like "S:my_img.png" or pointer to an `lv_image_dsc_t` variable*/ const void * src; - /**Color to draw the image. Used when the image has alpha channel only*/ - lv_color_t color; - /**Frame of the image, using with animated images*/ int32_t frame_id; @@ -132,6 +130,9 @@ typedef struct _lv_image_decoder_dsc_t { * Can be set in `open` function or set NULL.*/ const char * error_msg; + /**Point to cache entry information*/ + struct _lv_cache_entry_t * cache_entry; + /**Store any custom data here is required*/ void * user_data; } lv_image_decoder_dsc_t; diff --git a/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c b/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c index 12e09c2d7..4f45ce963 100644 --- a/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c +++ b/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_arc.c @@ -160,7 +160,7 @@ static void _rotate_point(int32_t angle, int32_t * x, int32_t * y) */ static void _set_full_arc(vg_arc * fullarc) { - /* the tangent lenght for the bezier circle approx */ + /* the tangent length for the bezier circle approx */ float tang = ((float)fullarc->rad) * BEZIER_OPTIM_CIRCLE; switch(fullarc->quarter) { case 0: diff --git a/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_label.c b/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_label.c index f19438518..73557b07d 100644 --- a/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_label.c +++ b/project/gui/lvgl/src/draw/nxp/vglite/lv_draw_vglite_label.c @@ -75,7 +75,7 @@ void lv_draw_vglite_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t { if(dsc->opa <= LV_OPA_MIN) return; - lv_draw_label_interate_letters(draw_unit, dsc, coords, _draw_vglite_letter); + lv_draw_label_iterate_letters(draw_unit, dsc, coords, _draw_vglite_letter); } /********************** diff --git a/project/gui/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c b/project/gui/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c index f788a2d55..439787272 100644 --- a/project/gui/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c +++ b/project/gui/lvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c @@ -309,19 +309,20 @@ LV_ATTRIBUTE_FAST_MEM static void rgb565_image_blend(_lv_draw_sw_blend_image_dsc LV_LOG_WARN("Not supported blend mode: %d", dsc->blend_mode); return; } - } - if(mask_buf == NULL) { - lv_color_16_16_mix(res, dest_buf_u16[x], opa); - } - else { - if(opa >= LV_OPA_MAX) dest_buf_u16[x] = lv_color_16_16_mix(res, dest_buf_u16[x], mask_buf[x]); - else dest_buf_u16[x] = lv_color_16_16_mix(res, dest_buf_u16[x], LV_OPA_MIX2(mask_buf[x], opa)); + if(mask_buf == NULL) { + lv_color_16_16_mix(res, dest_buf_u16[x], opa); + } + else { + if(opa >= LV_OPA_MAX) dest_buf_u16[x] = lv_color_16_16_mix(res, dest_buf_u16[x], mask_buf[x]); + else dest_buf_u16[x] = lv_color_16_16_mix(res, dest_buf_u16[x], LV_OPA_MIX2(mask_buf[x], opa)); + } } + + dest_buf_u16 += dest_stride; + src_buf_u16 += src_stride; + if(mask_buf) mask_buf += mask_stride; } - dest_buf_u16 += dest_stride; - src_buf_u16 += src_stride; - if(mask_buf) mask_buf += mask_stride; } } @@ -512,14 +513,15 @@ LV_ATTRIBUTE_FAST_MEM static void argb8888_image_blend(_lv_draw_sw_blend_image_d } if(mask_buf == NULL && opa >= LV_OPA_MAX) { - lv_color_16_16_mix(res, dest_buf_u16[dest_x], src_buf_u8[src_x]); + lv_color_16_16_mix(res, dest_buf_u16[dest_x], src_buf_u8[src_x + 3]); } else if(mask_buf == NULL && opa < LV_OPA_MAX) { - lv_color_16_16_mix(res, dest_buf_u16[dest_x], LV_OPA_MIX2(opa, src_buf_u8[src_x])); + lv_color_16_16_mix(res, dest_buf_u16[dest_x], LV_OPA_MIX2(opa, src_buf_u8[src_x + 3])); } else { if(opa >= LV_OPA_MAX) dest_buf_u16[dest_x] = lv_color_16_16_mix(res, dest_buf_u16[dest_x], mask_buf[dest_x]); - else dest_buf_u16[dest_x] = lv_color_16_16_mix(res, dest_buf_u16[dest_x], LV_OPA_MIX2(mask_buf[dest_x], opa)); + else dest_buf_u16[dest_x] = lv_color_16_16_mix(res, dest_buf_u16[dest_x], LV_OPA_MIX3(mask_buf[dest_x], opa, + src_buf_u8[src_x + 3])); } } diff --git a/project/gui/lvgl/src/draw/sw/lv_draw_sw_arc.c b/project/gui/lvgl/src/draw/sw/lv_draw_sw_arc.c index c1e6eaf93..5a54d27c6 100644 --- a/project/gui/lvgl/src/draw/sw/lv_draw_sw_arc.c +++ b/project/gui/lvgl/src/draw/sw/lv_draw_sw_arc.c @@ -68,7 +68,7 @@ void lv_draw_sw_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, c lv_draw_border_dsc_init(&cir_dsc); cir_dsc.opa = dsc->opa; cir_dsc.color = dsc->color; - cir_dsc.width = dsc->width; + cir_dsc.width = width; cir_dsc.radius = LV_RADIUS_CIRCLE; cir_dsc.side = LV_BORDER_SIDE_FULL; lv_draw_sw_border(draw_unit, &cir_dsc, &area_out); @@ -82,8 +82,8 @@ void lv_draw_sw_arc(lv_draw_unit_t * draw_unit, const lv_draw_arc_dsc_t * dsc, c area_in.x2 -= dsc->width; area_in.y2 -= dsc->width; - int32_t start_angle = dsc->start_angle; - int32_t end_angle = dsc->end_angle; + int32_t start_angle = (int32_t)dsc->start_angle; + int32_t end_angle = (int32_t)dsc->end_angle; while(start_angle >= 360) start_angle -= 360; while(end_angle >= 360) end_angle -= 360; diff --git a/project/gui/lvgl/src/draw/sw/lv_draw_sw_img.c b/project/gui/lvgl/src/draw/sw/lv_draw_sw_img.c index b28274f9f..01ae8954d 100644 --- a/project/gui/lvgl/src/draw/sw/lv_draw_sw_img.c +++ b/project/gui/lvgl/src/draw/sw/lv_draw_sw_img.c @@ -72,11 +72,12 @@ void lv_draw_sw_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * dr #if LV_USE_LAYER_DEBUG || LV_USE_PARALLEL_DRAW_DEBUG lv_area_t area_rot; lv_area_copy(&area_rot, coords); - if(draw_dsc->rotation || draw_dsc->zoom != LV_SCALE_NONE) { + if(draw_dsc->rotation || draw_dsc->zoom_x != LV_SCALE_NONE || draw_dsc->zoom_y != LV_SCALE_NONE) { int32_t w = lv_area_get_width(coords); int32_t h = lv_area_get_height(coords); - _lv_image_buf_get_transformed_area(&area_rot, w, h, draw_dsc->rotation, draw_dsc->zoom, &draw_dsc->pivot); + _lv_image_buf_get_transformed_area(&area_rot, w, h, draw_dsc->rotation, draw_dsc->zoom_x, draw_dsc->zoom_y, + &draw_dsc->pivot); area_rot.x1 += coords->x1; area_rot.y1 += coords->y1; @@ -151,11 +152,12 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_image(lv_draw_unit_t * draw_unit, const lv { lv_area_t transformed_area; lv_area_copy(&transformed_area, coords); - if(draw_dsc->rotation || draw_dsc->zoom != LV_SCALE_NONE) { + if(draw_dsc->rotation || draw_dsc->zoom_x != LV_SCALE_NONE || draw_dsc->zoom_y != LV_SCALE_NONE) { int32_t w = lv_area_get_width(coords); int32_t h = lv_area_get_height(coords); - _lv_image_buf_get_transformed_area(&transformed_area, w, h, draw_dsc->rotation, draw_dsc->zoom, &draw_dsc->pivot); + _lv_image_buf_get_transformed_area(&transformed_area, w, h, draw_dsc->rotation, draw_dsc->zoom_x, draw_dsc->zoom_y, + &draw_dsc->pivot); transformed_area.x1 += coords->x1; transformed_area.y1 += coords->y1; @@ -220,7 +222,8 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_image(lv_draw_unit_t * draw_unit, const lv static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * draw_area, const lv_image_decoder_dsc_t * src, lv_draw_image_sup_t * sup, const lv_area_t * img_coords) { - bool transformed = draw_dsc->rotation != 0 || draw_dsc->zoom != LV_SCALE_NONE ? true : false; + bool transformed = draw_dsc->rotation != 0 || draw_dsc->zoom_x != LV_SCALE_NONE || + draw_dsc->zoom_y != LV_SCALE_NONE ? true : false; lv_draw_sw_blend_dsc_t blend_dsc; const uint8_t * src_buf = src->img_data; @@ -341,8 +344,9 @@ static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t else if(draw_dsc->recolor_opa >= LV_OPA_MIN) { lv_coord_t h = lv_area_get_height(&relative_area); if(cf_final == LV_COLOR_FORMAT_RGB565A8) { - const uint8_t * rgb_src_buf = src_buf + blend_dsc.src_stride * relative_area.y1 + relative_area.x1 * 2; - const uint8_t * a_src_buf = src_buf + blend_dsc.src_stride * src_h + blend_dsc.src_stride / 2 * relative_area.y1 + + uint32_t stride_px = img_stride / 2; + const uint8_t * rgb_src_buf = src_buf + stride_px * 2 * relative_area.y1 + relative_area.x1 * 2; + const uint8_t * a_src_buf = src_buf + stride_px * 2 * src_h + stride_px * relative_area.y1 + relative_area.x1; uint8_t * rgb_dest_buf = tmp_buf_aligned; uint8_t * a_dest_buf = (uint8_t *)blend_dsc.mask_buf; @@ -350,20 +354,20 @@ static void img_draw_core(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t for(i = 0; i < h; i++) { lv_memcpy(rgb_dest_buf, rgb_src_buf, blend_w * 2); lv_memcpy(a_dest_buf, a_src_buf, blend_w); - rgb_src_buf += blend_dsc.src_stride; - a_src_buf += blend_dsc.src_stride / 2; + rgb_src_buf += stride_px * 2; + a_src_buf += stride_px; rgb_dest_buf += blend_w * 2; a_dest_buf += blend_w; } } else if(cf_final != LV_COLOR_FORMAT_A8) { - const uint8_t * src_buf_tmp = src_buf + blend_dsc.src_stride * relative_area.y1 + relative_area.x1 * px_size; + const uint8_t * src_buf_tmp = src_buf + img_stride * relative_area.y1 + relative_area.x1 * px_size; uint8_t * dest_buf_tmp = tmp_buf_aligned; lv_coord_t i; for(i = 0; i < h; i++) { lv_memcpy(dest_buf_tmp, src_buf_tmp, blend_w * px_size); dest_buf_tmp += blend_w * px_size; - src_buf_tmp += blend_dsc.src_stride; + src_buf_tmp += img_stride; } } } diff --git a/project/gui/lvgl/src/draw/sw/lv_draw_sw_letter.c b/project/gui/lvgl/src/draw/sw/lv_draw_sw_letter.c index 4f99ea222..d34a97af1 100644 --- a/project/gui/lvgl/src/draw/sw/lv_draw_sw_letter.c +++ b/project/gui/lvgl/src/draw/sw/lv_draw_sw_letter.c @@ -53,7 +53,7 @@ void lv_draw_sw_label(lv_draw_unit_t * draw_unit, const lv_draw_label_dsc_t * ds { if(dsc->opa <= LV_OPA_MIN) return; - lv_draw_label_interate_letters(draw_unit, dsc, coords, draw_letter_cb); + lv_draw_label_iterate_letters(draw_unit, dsc, coords, draw_letter_cb); } /********************** @@ -94,7 +94,8 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_cb(lv_draw_unit_t * draw_unit, lv_ lv_draw_image_dsc_t img_dsc; lv_draw_image_dsc_init(&img_dsc); img_dsc.rotation = 0; - img_dsc.zoom = LV_SCALE_NONE; + img_dsc.zoom_x = LV_SCALE_NONE; + img_dsc.zoom_y = LV_SCALE_NONE; img_dsc.opa = glyph_draw_dsc->opa; img_dsc.src = glyph_draw_dsc->bitmap; lv_draw_sw_image(draw_unit, &img_dsc, glyph_draw_dsc->letter_coords); diff --git a/project/gui/lvgl/src/draw/sw/lv_draw_sw_transform.c b/project/gui/lvgl/src/draw/sw/lv_draw_sw_transform.c index 8a9639099..c3ad2b08a 100644 --- a/project/gui/lvgl/src/draw/sw/lv_draw_sw_transform.c +++ b/project/gui/lvgl/src/draw/sw/lv_draw_sw_transform.c @@ -1,5 +1,5 @@ /** - * @file lv_draw_sw_tranform.c + * @file lv_draw_sw_transform.c * */ @@ -28,7 +28,8 @@ typedef struct { int32_t y_out; int32_t sinma; int32_t cosma; - int32_t zoom; + int32_t zoom_x; + int32_t zoom_y; int32_t angle; int32_t pivot_x_256; int32_t pivot_y_256; @@ -49,14 +50,14 @@ typedef struct { static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout, int32_t * yout); -static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, - int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, - int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size); +static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, + int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, + int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size); -static void tranform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, - int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, - int32_t x_end, uint8_t * dest_buf, bool aa); +static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, + int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, + int32_t x_end, uint8_t * dest_buf, bool aa); static void transform_rgb565a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, @@ -87,7 +88,8 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are point_transform_dsc_t tr_dsc; tr_dsc.angle = -draw_dsc->rotation; - tr_dsc.zoom = (256 * 256) / draw_dsc->zoom; + tr_dsc.zoom_x = (256 * 256) / draw_dsc->zoom_x; + tr_dsc.zoom_y = (256 * 256) / draw_dsc->zoom_y; tr_dsc.pivot = draw_dsc->pivot; int32_t angle_low = tr_dsc.angle / 10; @@ -159,18 +161,19 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are switch(src_cf) { case LV_COLOR_FORMAT_XRGB8888: - tranform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa, - 4); + transform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa, + 4); break; case LV_COLOR_FORMAT_RGB888: - tranform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa, - 3); + transform_rgb888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa, + 3); break; case LV_COLOR_FORMAT_A8: transform_a8(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa); break; case LV_COLOR_FORMAT_ARGB8888: - tranform_argb8888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, aa); + transform_argb8888(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, + aa); break; case LV_COLOR_FORMAT_RGB565: transform_rgb565a8(src_buf, src_w, src_h, src_stride_px, xs_ups, ys_ups, xs_step_256, ys_step_256, dest_w, dest_buf, @@ -194,9 +197,9 @@ void lv_draw_sw_transform(lv_draw_unit_t * draw_unit, const lv_area_t * dest_are * STATIC FUNCTIONS **********************/ -static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, - int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, - int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size) +static void transform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, + int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, + int32_t x_end, uint8_t * dest_buf, bool aa, uint32_t px_size) { int32_t xs_ups_start = xs_ups; int32_t ys_ups_start = ys_ups; @@ -295,9 +298,9 @@ static void tranform_rgb888(const uint8_t * src, lv_coord_t src_w, lv_coord_t sr #include "../../stdlib/lv_string.h" -static void tranform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, - int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, - int32_t x_end, uint8_t * dest_buf, bool aa) +static void transform_argb8888(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_coord_t src_stride, + int32_t xs_ups, int32_t ys_ups, int32_t xs_step, int32_t ys_step, + int32_t x_end, uint8_t * dest_buf, bool aa) { // lv_memzero(dest_buf, x_end * 4); int32_t xs_ups_start = xs_ups; @@ -581,7 +584,7 @@ static void transform_a8(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout, int32_t * yout) { - if(t->angle == 0 && t->zoom == LV_SCALE_NONE) { + if(t->angle == 0 && t->zoom_x == LV_SCALE_NONE && t->zoom_y == LV_SCALE_NONE) { *xout = xin * 256; *yout = yin * 256; return; @@ -591,16 +594,16 @@ static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int yin -= t->pivot.y; if(t->angle == 0) { - *xout = ((int32_t)(xin * t->zoom)) + (t->pivot_x_256); - *yout = ((int32_t)(yin * t->zoom)) + (t->pivot_y_256); + *xout = ((int32_t)(xin * t->zoom_x)) + (t->pivot_x_256); + *yout = ((int32_t)(yin * t->zoom_y)) + (t->pivot_y_256); } - else if(t->zoom == LV_SCALE_NONE) { + else if(t->zoom_x == LV_SCALE_NONE && t->zoom_y == LV_SCALE_NONE) { *xout = ((t->cosma * xin - t->sinma * yin) >> 2) + (t->pivot_x_256); *yout = ((t->sinma * xin + t->cosma * yin) >> 2) + (t->pivot_y_256); } else { - *xout = (((t->cosma * xin - t->sinma * yin) * t->zoom) >> 10) + (t->pivot_x_256); - *yout = (((t->sinma * xin + t->cosma * yin) * t->zoom) >> 10) + (t->pivot_y_256); + *xout = (((t->cosma * xin - t->sinma * yin) * t->zoom_x) >> 10) + (t->pivot_x_256); + *yout = (((t->sinma * xin + t->cosma * yin) * t->zoom_y) >> 10) + (t->pivot_y_256); } } diff --git a/project/gui/lvgl/src/draw/sw/lv_draw_sw_triangle.c b/project/gui/lvgl/src/draw/sw/lv_draw_sw_triangle.c index 1739eedf7..2550f76f2 100644 --- a/project/gui/lvgl/src/draw/sw/lv_draw_sw_triangle.c +++ b/project/gui/lvgl/src/draw/sw/lv_draw_sw_triangle.c @@ -28,6 +28,7 @@ /********************** * STATIC PROTOTYPES **********************/ +static void point_swap(lv_point_t * p1, lv_point_t * p2); /********************** * STATIC VARIABLES @@ -56,67 +57,57 @@ void lv_draw_sw_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_ if(!is_common) return; lv_point_t p[3]; - p[0] = dsc->p[0]; - p[1] = dsc->p[1]; - p[2] = dsc->p[2]; - - /*Order the points like this: - * [0]: left bottom - * [1]: top - * [2]: right bottom*/ - - - if(dsc->p[0].y <= dsc->p[1].y && dsc->p[0].y <= dsc->p[2].y) { - p[1] = dsc->p[0]; - if(dsc->p[1].x < dsc->p[2].x) { - p[0] = dsc->p[1]; - p[2] = dsc->p[2]; - } - else { - p[0] = dsc->p[2]; - p[2] = dsc->p[1]; - } - } - else if(dsc->p[1].y <= dsc->p[0].y && dsc->p[1].y <= dsc->p[2].y) { + /*If there is a vertical side use it as p[0] and p[1]*/ + if(dsc->p[0].x == dsc->p[1].x) { + p[0] = dsc->p[0]; p[1] = dsc->p[1]; - if(dsc->p[0].x < dsc->p[2].x) { - p[0] = dsc->p[0]; - p[2] = dsc->p[2]; - } - else { - p[0] = dsc->p[2]; - p[2] = dsc->p[0]; - } + p[2] = dsc->p[2]; } - else { + else if(dsc->p[0].x == dsc->p[2].x) { + p[0] = dsc->p[0]; p[1] = dsc->p[2]; - if(dsc->p[0].x < dsc->p[1].x) { - p[0] = dsc->p[0]; - p[2] = dsc->p[1]; - } - else { - p[0] = dsc->p[1]; - p[2] = dsc->p[0]; - } + p[2] = dsc->p[1]; + } + else if(dsc->p[1].x == dsc->p[2].x) { + p[0] = dsc->p[1]; + p[1] = dsc->p[2]; + p[2] = dsc->p[0]; } + else { + p[0] = dsc->p[0]; + p[1] = dsc->p[1]; + p[2] = dsc->p[2]; + + /*Set the smallest y as p[0]*/ + if(p[0].y > p[1].y) point_swap(&p[0], &p[1]); + if(p[0].y > p[2].y) point_swap(&p[0], &p[2]); + + /*Set the greatest y as p[1]*/ + if(p[1].y < p[2].y) point_swap(&p[1], &p[2]); + } + + /*Be sure p[0] is on the top*/ + if(p[0].y > p[1].y) point_swap(&p[0], &p[1]); + + /*If right == true p[2] is on the right side of the p[0] p[1] line*/ + bool right = ((p[1].x - p[0].x) * (p[2].y - p[0].y) - (p[1].y - p[0].y) * (p[2].x - p[0].x)) < 0; void * masks[4] = {0}; lv_draw_sw_mask_line_param_t mask_left; lv_draw_sw_mask_line_param_t mask_right; lv_draw_sw_mask_line_param_t mask_bottom; + lv_draw_sw_mask_line_points_init(&mask_left, p[0].x, p[0].y, + p[1].x, p[1].y, + right ? LV_DRAW_SW_MASK_LINE_SIDE_RIGHT : LV_DRAW_SW_MASK_LINE_SIDE_LEFT); - lv_draw_sw_mask_line_points_init(&mask_left, p[1].x, p[1].y, - p[0].x, p[0].y, - LV_DRAW_SW_MASK_LINE_SIDE_RIGHT); - - lv_draw_sw_mask_line_points_init(&mask_right, p[1].x, p[1].y, + lv_draw_sw_mask_line_points_init(&mask_right, p[0].x, p[0].y, p[2].x, p[2].y, - LV_DRAW_SW_MASK_LINE_SIDE_LEFT); + right ? LV_DRAW_SW_MASK_LINE_SIDE_LEFT : LV_DRAW_SW_MASK_LINE_SIDE_RIGHT); - lv_draw_sw_mask_line_points_init(&mask_bottom, p[0].x, p[0].y, + lv_draw_sw_mask_line_points_init(&mask_bottom, p[1].x, p[1].y, p[2].x, p[2].y, - LV_DRAW_SW_MASK_LINE_SIDE_TOP); + right ? LV_DRAW_SW_MASK_LINE_SIDE_LEFT : LV_DRAW_SW_MASK_LINE_SIDE_RIGHT); masks[0] = &mask_left; masks[1] = &mask_right; @@ -135,7 +126,6 @@ void lv_draw_sw_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_ blend_dsc.blend_mode = LV_BLEND_MODE_NORMAL; blend_dsc.src_buf = NULL; - lv_grad_dir_t grad_dir = dsc->bg_grad.dir; lv_grad_t * grad = lv_gradient_get(&dsc->bg_grad, lv_area_get_width(&tri_area), lv_area_get_height(&tri_area)); @@ -189,10 +179,8 @@ void lv_draw_sw_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_ } #else - LV_UNUSED(points); - LV_UNUSED(point_cnt); - LV_UNUSED(draw_ctx); - LV_UNUSED(draw_dsc); + LV_UNUSED(draw_unit); + LV_UNUSED(dsc); LV_LOG_WARN("Can't draw triangles with LV_DRAW_SW_COMPLEX == 0"); #endif /*LV_DRAW_SW_COMPLEX*/ } @@ -201,4 +189,12 @@ void lv_draw_sw_triangle(lv_draw_unit_t * draw_unit, const lv_draw_triangle_dsc_ * STATIC FUNCTIONS **********************/ +static void point_swap(lv_point_t * p1, lv_point_t * p2) +{ + lv_point_t tmp = *p1; + *p1 = *p2; + *p2 = tmp; +} + + #endif /*LV_USE_DRAW_SW*/ diff --git a/project/gui/lvgl/src/font/lv_font_fmt_txt.h b/project/gui/lvgl/src/font/lv_font_fmt_txt.h index b7c92e089..58905f449 100644 --- a/project/gui/lvgl/src/font/lv_font_fmt_txt.h +++ b/project/gui/lvgl/src/font/lv_font_fmt_txt.h @@ -122,8 +122,8 @@ typedef struct { /*To get a kern value of two code points: 1. Get the `glyph_id_left` and `glyph_id_right` from `lv_font_fmt_txt_cmap_t 2. for(i = 0; i < pair_cnt * 2; i += 2) - if(gylph_ids[i] == glyph_id_left && - gylph_ids[i+1] == glyph_id_right) + if(glyph_ids[i] == glyph_id_left && + glyph_ids[i+1] == glyph_id_right) return values[i / 2]; */ const void * glyph_ids; diff --git a/project/gui/lvgl/src/indev/lv_indev.c b/project/gui/lvgl/src/indev/lv_indev.c index 8c4bd4597..f7e2ed222 100644 --- a/project/gui/lvgl/src/indev/lv_indev.c +++ b/project/gui/lvgl/src/indev/lv_indev.c @@ -1166,21 +1166,25 @@ static void indev_proc_release(lv_indev_t * indev) /*Get the transformed vector with this object*/ if(scroll_obj) { int16_t angle = 0; - int16_t zoom = 256; + int16_t zoom_x = 256; + int16_t zoom_y = 256; lv_point_t pivot = { 0, 0 }; lv_obj_t * parent = scroll_obj; while(parent) { angle += lv_obj_get_style_transform_rotation(parent, 0); - int32_t zoom_act = lv_obj_get_style_transform_scale_safe(parent, 0); - zoom = (zoom * zoom_act) >> 8; + int32_t zoom_act_x = lv_obj_get_style_transform_scale_x_safe(parent, 0); + int32_t zoom_act_y = lv_obj_get_style_transform_scale_y_safe(parent, 0); + zoom_x = (zoom_x * zoom_act_x) >> 8; + zoom_y = (zoom_x * zoom_act_y) >> 8; parent = lv_obj_get_parent(parent); } - if(angle != 0 || zoom != LV_SCALE_NONE) { + if(angle != 0 || zoom_y != LV_SCALE_NONE || zoom_x != LV_SCALE_NONE) { angle = -angle; - zoom = (256 * 256) / zoom; - lv_point_transform(&indev->pointer.scroll_throw_vect, angle, zoom, &pivot); - lv_point_transform(&indev->pointer.scroll_throw_vect_ori, angle, zoom, &pivot); + zoom_x = (256 * 256) / zoom_x; + zoom_y = (256 * 256) / zoom_y; + lv_point_transform(&indev->pointer.scroll_throw_vect, angle, zoom_x, zoom_y, &pivot, false); + lv_point_transform(&indev->pointer.scroll_throw_vect_ori, angle, zoom_x, zoom_y, &pivot, false); } } diff --git a/project/gui/lvgl/src/indev/lv_indev.h b/project/gui/lvgl/src/indev/lv_indev.h index 54bf0f437..6782db4e5 100644 --- a/project/gui/lvgl/src/indev/lv_indev.h +++ b/project/gui/lvgl/src/indev/lv_indev.h @@ -30,6 +30,7 @@ struct _lv_group_t; struct _lv_indev_t; struct _lv_display_t; typedef struct _lv_indev_t lv_indev_t; +typedef struct _lv_indev_t lv_indev_drv_t; /** Possible input device types*/ typedef enum { diff --git a/project/gui/lvgl/src/indev/lv_indev_scroll.c b/project/gui/lvgl/src/indev/lv_indev_scroll.c index c1d7206b7..c4480a541 100644 --- a/project/gui/lvgl/src/indev/lv_indev_scroll.c +++ b/project/gui/lvgl/src/indev/lv_indev_scroll.c @@ -64,20 +64,24 @@ void _lv_indev_scroll_handler(lv_indev_t * indev) /*Set new position or scroll if the vector is not zero*/ int16_t angle = 0; - int16_t zoom = 256; + int16_t zoom_x = 256; + int16_t zoom_y = 256; lv_obj_t * parent = scroll_obj; while(parent) { angle += lv_obj_get_style_transform_rotation(parent, 0); - int32_t zoom_act = lv_obj_get_style_transform_scale_safe(parent, 0); - zoom = (zoom * zoom_act) >> 8; + int32_t zoom_act_x = lv_obj_get_style_transform_scale_x_safe(parent, 0); + int32_t zoom_act_y = lv_obj_get_style_transform_scale_y_safe(parent, 0); + zoom_x = (zoom_x * zoom_act_x) >> 8; + zoom_y = (zoom_y * zoom_act_y) >> 8; parent = lv_obj_get_parent(parent); } - if(angle != 0 || zoom != LV_SCALE_NONE) { + if(angle != 0 || zoom_x != LV_SCALE_NONE || zoom_y != LV_SCALE_NONE) { angle = -angle; - zoom = (256 * 256) / zoom; + zoom_x = (256 * 256) / zoom_x; + zoom_y = (256 * 256) / zoom_y; lv_point_t pivot = { 0, 0 }; - lv_point_transform(&indev->pointer.vect, angle, zoom, &pivot); + lv_point_transform(&indev->pointer.vect, angle, zoom_x, zoom_y, &pivot, false); } @@ -289,21 +293,25 @@ static lv_obj_t * find_scroll_obj(lv_indev_t * indev) while(obj_act) { /*Get the transformed scroll_sum with this object*/ int16_t angle = 0; - int32_t zoom = 256; + int32_t zoom_x = 256; + int32_t zoom_y = 256; lv_point_t pivot = { 0, 0 }; lv_obj_t * parent = obj_act; while(parent) { angle += lv_obj_get_style_transform_rotation(parent, 0); - int32_t zoom_act = lv_obj_get_style_transform_scale_safe(parent, 0); - zoom = (zoom * zoom_act) >> 8; + int32_t zoom_act_x = lv_obj_get_style_transform_scale_x_safe(parent, 0); + int32_t zoom_act_y = lv_obj_get_style_transform_scale_y_safe(parent, 0); + zoom_x = (zoom_x * zoom_act_x) >> 8; + zoom_y = (zoom_y * zoom_act_y) >> 8; parent = lv_obj_get_parent(parent); } lv_point_t obj_scroll_sum = indev->pointer.scroll_sum; - if(angle != 0 || zoom != LV_SCALE_NONE) { + if(angle != 0 || zoom_x != LV_SCALE_NONE || zoom_y != LV_SCALE_NONE) { angle = -angle; - zoom = (256 * 256) / zoom; - lv_point_transform(&obj_scroll_sum, angle, zoom, &pivot); + zoom_x = (256 * 256) / zoom_x; + zoom_y = (256 * 256) / zoom_y; + lv_point_transform(&obj_scroll_sum, angle, zoom_x, zoom_y, &pivot, false); } if(LV_ABS(obj_scroll_sum.x) > LV_ABS(obj_scroll_sum.y)) { diff --git a/project/gui/lvgl/src/libs/libjpeg_turbo/lv_libjpeg_turbo.c b/project/gui/lvgl/src/libs/libjpeg_turbo/lv_libjpeg_turbo.c index 330b06c99..c91386971 100644 --- a/project/gui/lvgl/src/libs/libjpeg_turbo/lv_libjpeg_turbo.c +++ b/project/gui/lvgl/src/libs/libjpeg_turbo/lv_libjpeg_turbo.c @@ -180,7 +180,7 @@ static lv_result_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_d } dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; + dsc->cache_entry = cache; lv_cache_unlock(); return LV_RESULT_OK; /*If not returned earlier then it failed*/ @@ -196,7 +196,7 @@ static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * { LV_UNUSED(decoder); /*Unused*/ lv_cache_lock(); - lv_cache_release(dsc->user_data); + lv_cache_release(dsc->cache_entry); lv_cache_unlock(); } @@ -209,7 +209,7 @@ static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc) lv_cache_entry_t * cache = lv_cache_find(fn, LV_CACHE_SRC_TYPE_STR, 0, 0); if(cache) { dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; /*Save the cache to release it in decoder_close*/ + dsc->cache_entry = cache; /*Save the cache to release it in decoder_close*/ lv_cache_unlock(); return LV_RESULT_OK; } diff --git a/project/gui/lvgl/src/libs/libpng/lv_libpng.c b/project/gui/lvgl/src/libs/libpng/lv_libpng.c index 2627b505e..a4ec558ff 100644 --- a/project/gui/lvgl/src/libs/libpng/lv_libpng.c +++ b/project/gui/lvgl/src/libs/libpng/lv_libpng.c @@ -155,7 +155,7 @@ static lv_result_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_d } dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; + dsc->cache_entry = cache; lv_cache_unlock(); return LV_RESULT_OK; /*The image is fully decoded. Return with its pointer*/ @@ -172,7 +172,7 @@ static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * LV_UNUSED(decoder); /*Unused*/ lv_cache_lock(); - lv_cache_release(dsc->user_data); + lv_cache_release(dsc->cache_entry); lv_cache_unlock(); } @@ -185,7 +185,7 @@ static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc) lv_cache_entry_t * cache = lv_cache_find(fn, LV_CACHE_SRC_TYPE_STR, 0, 0); if(cache) { dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; /*Save the cache to release it in decoder_close*/ + dsc->cache_entry = cache; /*Save the cache to release it in decoder_close*/ lv_cache_unlock(); return LV_RESULT_OK; } diff --git a/project/gui/lvgl/src/libs/lodepng/lv_lodepng.c b/project/gui/lvgl/src/libs/lodepng/lv_lodepng.c index 5be93d0ef..104e3e384 100644 --- a/project/gui/lvgl/src/libs/lodepng/lv_lodepng.c +++ b/project/gui/lvgl/src/libs/lodepng/lv_lodepng.c @@ -209,7 +209,7 @@ static lv_result_t decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_d } dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; + dsc->cache_entry = cache; lv_cache_unlock(); return LV_RESULT_OK; /*If not returned earlier then it failed*/ @@ -226,7 +226,7 @@ static void decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * LV_UNUSED(decoder); lv_cache_lock(); - lv_cache_release(dsc->user_data); + lv_cache_release(dsc->cache_entry); lv_cache_unlock(); } @@ -240,7 +240,7 @@ static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc) lv_cache_entry_t * cache = lv_cache_find(fn, LV_CACHE_SRC_TYPE_STR, 0, 0); if(cache) { dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; /*Save the cache to release it in decoder_close*/ + dsc->cache_entry = cache; /*Save the cache to release it in decoder_close*/ lv_cache_unlock(); return LV_RESULT_OK; } @@ -252,7 +252,7 @@ static lv_result_t try_cache(lv_image_decoder_dsc_t * dsc) lv_cache_entry_t * cache = lv_cache_find(img_dsc, LV_CACHE_SRC_TYPE_PTR, 0, 0); if(cache) { dsc->img_data = lv_cache_get_data(cache); - dsc->user_data = cache; /*Save the cache to release it in decoder_close*/ + dsc->cache_entry = cache; /*Save the cache to release it in decoder_close*/ lv_cache_unlock(); return LV_RESULT_OK; } diff --git a/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.c b/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.c index 4229135ab..8959b4608 100644 --- a/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.c +++ b/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.c @@ -174,12 +174,12 @@ static const uint8_t * ttf_get_glyph_bitmap_cb(const lv_font_t * font, uint32_t return buffer; /*Or NULL if not found*/ } -static lv_font_t * lv_tiny_ttf_create(const char * path, const void * data, size_t data_size, lv_coord_t line_height, +static lv_font_t * lv_tiny_ttf_create(const char * path, const void * data, size_t data_size, lv_coord_t font_size, size_t cache_size) { LV_UNUSED(data_size); LV_UNUSED(cache_size); - if((path == NULL && data == NULL) || 0 >= line_height) { + if((path == NULL && data == NULL) || 0 >= font_size) { LV_LOG_ERROR("tiny_ttf: invalid argument\n"); return NULL; } @@ -217,57 +217,51 @@ static lv_font_t * lv_tiny_ttf_create(const char * path, const void * data, size LV_LOG_ERROR("tiny_ttf: init failed\n"); return NULL; } - #endif - float scale = stbtt_ScaleForPixelHeight(&dsc->info, line_height); lv_font_t * out_font = (lv_font_t *)TTF_MALLOC(sizeof(lv_font_t)); if(out_font == NULL) { TTF_FREE(dsc); LV_LOG_ERROR("tiny_ttf: out of memory\n"); return NULL; } - out_font->line_height = line_height; - out_font->fallback = NULL; - out_font->dsc = dsc; - int line_gap; - stbtt_GetFontVMetrics(&dsc->info, &dsc->ascent, &dsc->descent, &line_gap); - dsc->scale = scale; - out_font->base_line = line_height - (lv_coord_t)(dsc->ascent * scale); - out_font->underline_position = (uint8_t)line_height - dsc->descent; - out_font->underline_thickness = 0; - out_font->subpx = 0; + lv_memzero(out_font, sizeof(lv_font_t)); out_font->get_glyph_dsc = ttf_get_glyph_dsc_cb; out_font->get_glyph_bitmap = ttf_get_glyph_bitmap_cb; + out_font->dsc = dsc; + lv_tiny_ttf_set_size(out_font, font_size); return out_font; } #if LV_TINY_TTF_FILE_SUPPORT != 0 -lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t line_height, size_t cache_size) +lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t font_size, size_t cache_size) { - return lv_tiny_ttf_create(path, NULL, 0, line_height, cache_size); + return lv_tiny_ttf_create(path, NULL, 0, font_size, cache_size); } -lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t line_height) +lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t font_size) { - return lv_tiny_ttf_create(path, NULL, 0, line_height, 0); + return lv_tiny_ttf_create(path, NULL, 0, font_size, 0); } #endif -lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t line_height, size_t cache_size) +lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t font_size, size_t cache_size) { - return lv_tiny_ttf_create(NULL, data, data_size, line_height, cache_size); + return lv_tiny_ttf_create(NULL, data, data_size, font_size, cache_size); } -lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t line_height) +lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t font_size) { - return lv_tiny_ttf_create(NULL, data, data_size, line_height, 0); + return lv_tiny_ttf_create(NULL, data, data_size, font_size, 0); } -void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t line_height) +void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t font_size) { - ttf_font_desc_t * dsc = (ttf_font_desc_t *)font->dsc; - if(line_height > 0) { - font->line_height = line_height; - dsc->scale = stbtt_ScaleForPixelHeight(&dsc->info, line_height); - font->base_line = line_height - (lv_coord_t)(dsc->ascent * dsc->scale); - font->underline_position = (uint8_t)line_height - dsc->descent; + if(font_size <= 0) { + LV_LOG_ERROR("invalid font size: %d", font_size); + return; } + ttf_font_desc_t * dsc = (ttf_font_desc_t *)font->dsc; + dsc->scale = stbtt_ScaleForMappingEmToPixels(&dsc->info, font_size); + int line_gap = 0; + stbtt_GetFontVMetrics(&dsc->info, &dsc->ascent, &dsc->descent, &line_gap); + font->line_height = (lv_coord_t)(dsc->scale * (dsc->ascent - dsc->descent + line_gap)); + font->base_line = (lv_coord_t)(dsc->scale * (line_gap - dsc->descent)); } void lv_tiny_ttf_destroy(lv_font_t * font) { diff --git a/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.h b/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.h index 42f32c073..3297e7379 100644 --- a/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.h +++ b/project/gui/lvgl/src/libs/tiny_ttf/lv_tiny_ttf.h @@ -29,23 +29,23 @@ extern "C" { * GLOBAL PROTOTYPES **********************/ #if LV_TINY_TTF_FILE_SUPPORT !=0 -// create a font from the specified file or path with the specified line height. -lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t line_height); +/* create a font from the specified file or path with the specified line height.*/ +lv_font_t * lv_tiny_ttf_create_file(const char * path, lv_coord_t font_size); -// create a font from the specified file or path with the specified line height with the specified cache size. -lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t line_height, size_t cache_size); +/* create a font from the specified file or path with the specified line height with the specified cache size.*/ +lv_font_t * lv_tiny_ttf_create_file_ex(const char * path, lv_coord_t font_size, size_t cache_size); #endif -// create a font from the specified data pointer with the specified line height. -lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t line_height); +/* create a font from the specified data pointer with the specified line height.*/ +lv_font_t * lv_tiny_ttf_create_data(const void * data, size_t data_size, lv_coord_t font_size); -// create a font from the specified data pointer with the specified line height and the specified cache size. -lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t line_height, size_t cache_size); +/* create a font from the specified data pointer with the specified line height and the specified cache size.*/ +lv_font_t * lv_tiny_ttf_create_data_ex(const void * data, size_t data_size, lv_coord_t font_size, size_t cache_size); -// set the size of the font to a new line_height -void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t line_height); +/* set the size of the font to a new font_size*/ +void lv_tiny_ttf_set_size(lv_font_t * font, lv_coord_t font_size); -// destroy a font previously created with lv_tiny_ttf_create_xxxx() +/* destroy a font previously created with lv_tiny_ttf_create_xxxx()*/ void lv_tiny_ttf_destroy(lv_font_t * font); /********************** diff --git a/project/gui/lvgl/src/lv_conf_internal.h b/project/gui/lvgl/src/lv_conf_internal.h index 04d93e3ae..85543a7ca 100644 --- a/project/gui/lvgl/src/lv_conf_internal.h +++ b/project/gui/lvgl/src/lv_conf_internal.h @@ -149,17 +149,6 @@ #endif #endif /*LV_USE_MALLOC == LV_STDLIB_BUILTIN*/ - -#if LV_USE_STDLIB_SPRINTF == LV_STDLIB_BUILTIN - #ifndef LV_SPRINTF_USE_FLOAT - #ifdef CONFIG_LV_SPRINTF_USE_FLOAT - #define LV_SPRINTF_USE_FLOAT CONFIG_LV_SPRINTF_USE_FLOAT - #else - #define LV_SPRINTF_USE_FLOAT 0 - #endif - #endif -#endif /*LV_USE_STDLIB_SPRINTF == LV_STDLIB_BUILTIN*/ - /*==================== HAL SETTINGS *====================*/ @@ -737,7 +726,7 @@ #ifdef CONFIG_LV_GRADIENT_MAX_STOPS #define LV_GRADIENT_MAX_STOPS CONFIG_LV_GRADIENT_MAX_STOPS #else - #define LV_GRADIENT_MAX_STOPS 2 + #define LV_GRADIENT_MAX_STOPS 2 #endif #endif @@ -747,17 +736,16 @@ #ifdef CONFIG_LV_COLOR_MIX_ROUND_OFS #define LV_COLOR_MIX_ROUND_OFS CONFIG_LV_COLOR_MIX_ROUND_OFS #else - #define LV_COLOR_MIX_ROUND_OFS 0 + #define LV_COLOR_MIX_ROUND_OFS 0 #endif #endif - /* Add 2 x 32 bit variables to each lv_obj_t to speed up getting style properties */ #ifndef LV_OBJ_STYLE_CACHE #ifdef CONFIG_LV_OBJ_STYLE_CACHE #define LV_OBJ_STYLE_CACHE CONFIG_LV_OBJ_STYLE_CACHE #else - #define LV_OBJ_STYLE_CACHE 0 + #define LV_OBJ_STYLE_CACHE 0 #endif #endif @@ -766,7 +754,7 @@ #ifdef CONFIG_LV_USE_OBJ_ID #define LV_USE_OBJ_ID CONFIG_LV_USE_OBJ_ID #else - #define LV_USE_OBJ_ID 0 + #define LV_USE_OBJ_ID 0 #endif #endif @@ -775,7 +763,16 @@ #ifdef CONFIG_LV_USE_OBJ_ID_BUILTIN #define LV_USE_OBJ_ID_BUILTIN CONFIG_LV_USE_OBJ_ID_BUILTIN #else - #define LV_USE_OBJ_ID_BUILTIN 0 + #define LV_USE_OBJ_ID_BUILTIN 0 + #endif +#endif + +/*Use obj property set/get API*/ +#ifndef LV_USE_OBJ_PROPERTY + #ifdef CONFIG_LV_USE_OBJ_PROPERTY + #define LV_USE_OBJ_PROPERTY CONFIG_LV_USE_OBJ_PROPERTY + #else + #define LV_USE_OBJ_PROPERTY 0 #endif #endif @@ -888,6 +885,15 @@ #endif #endif +/* Use `float` as `lv_value_precise_t` */ +#ifndef LV_USE_FLOAT + #ifdef CONFIG_LV_USE_FLOAT + #define LV_USE_FLOAT CONFIG_LV_USE_FLOAT + #else + #define LV_USE_FLOAT 0 + #endif +#endif + /*================== * FONT USAGE *===================*/ @@ -2227,7 +2233,7 @@ #ifdef CONFIG_LV_PROFILER_BEGIN #define LV_PROFILER_BEGIN CONFIG_LV_PROFILER_BEGIN #else - #define LV_PROFILER_BEGIN LV_PROFILER_BUILTIN_BEGIN + #define LV_PROFILER_BEGIN LV_PROFILER_BUILTIN_BEGIN #endif #endif @@ -2236,7 +2242,25 @@ #ifdef CONFIG_LV_PROFILER_END #define LV_PROFILER_END CONFIG_LV_PROFILER_END #else - #define LV_PROFILER_END LV_PROFILER_BUILTIN_END + #define LV_PROFILER_END LV_PROFILER_BUILTIN_END + #endif + #endif + + /*Profiler start point function with custom tag*/ + #ifndef LV_PROFILER_BEGIN_TAG + #ifdef CONFIG_LV_PROFILER_BEGIN_TAG + #define LV_PROFILER_BEGIN_TAG CONFIG_LV_PROFILER_BEGIN_TAG + #else + #define LV_PROFILER_BEGIN_TAG LV_PROFILER_BUILTIN_BEGIN_TAG + #endif + #endif + + /*Profiler end point function with custom tag*/ + #ifndef LV_PROFILER_END_TAG + #ifdef CONFIG_LV_PROFILER_END_TAG + #define LV_PROFILER_END_TAG CONFIG_LV_PROFILER_END_TAG + #else + #define LV_PROFILER_END_TAG LV_PROFILER_BUILTIN_END_TAG #endif #endif #endif @@ -2500,47 +2524,58 @@ #endif #endif -/*Use Nuttx custom init API to open window and handle touchscreen*/ -#ifndef LV_USE_NUTTX_CUSTOM_INIT - #ifdef CONFIG_LV_USE_NUTTX_CUSTOM_INIT - #define LV_USE_NUTTX_CUSTOM_INIT CONFIG_LV_USE_NUTTX_CUSTOM_INIT - #else - #define LV_USE_NUTTX_CUSTOM_INIT 0 +#if LV_USE_NUTTX + #ifndef LV_USE_NUTTX_LIBUV + #ifdef CONFIG_LV_USE_NUTTX_LIBUV + #define LV_USE_NUTTX_LIBUV CONFIG_LV_USE_NUTTX_LIBUV + #else + #define LV_USE_NUTTX_LIBUV 0 + #endif #endif -#endif -/*Driver for /dev/lcd*/ -#ifndef LV_USE_NUTTX_LCD - #ifdef CONFIG_LV_USE_NUTTX_LCD - #define LV_USE_NUTTX_LCD CONFIG_LV_USE_NUTTX_LCD - #else - #define LV_USE_NUTTX_LCD 0 - #endif -#endif -#if LV_USE_NUTTX_LCD - #ifndef LV_NUTTX_LCD_BUFFER_COUNT - #ifdef CONFIG_LV_NUTTX_LCD_BUFFER_COUNT - #define LV_NUTTX_LCD_BUFFER_COUNT CONFIG_LV_NUTTX_LCD_BUFFER_COUNT + /*Use Nuttx custom init API to open window and handle touchscreen*/ + #ifndef LV_USE_NUTTX_CUSTOM_INIT + #ifdef CONFIG_LV_USE_NUTTX_CUSTOM_INIT + #define LV_USE_NUTTX_CUSTOM_INIT CONFIG_LV_USE_NUTTX_CUSTOM_INIT #else - #define LV_NUTTX_LCD_BUFFER_COUNT 0 + #define LV_USE_NUTTX_CUSTOM_INIT 0 #endif #endif - #ifndef LV_NUTTX_LCD_BUFFER_SIZE - #ifdef CONFIG_LV_NUTTX_LCD_BUFFER_SIZE - #define LV_NUTTX_LCD_BUFFER_SIZE CONFIG_LV_NUTTX_LCD_BUFFER_SIZE + + /*Driver for /dev/lcd*/ + #ifndef LV_USE_NUTTX_LCD + #ifdef CONFIG_LV_USE_NUTTX_LCD + #define LV_USE_NUTTX_LCD CONFIG_LV_USE_NUTTX_LCD #else - #define LV_NUTTX_LCD_BUFFER_SIZE 60 + #define LV_USE_NUTTX_LCD 0 + #endif + #endif + #if LV_USE_NUTTX_LCD + #ifndef LV_NUTTX_LCD_BUFFER_COUNT + #ifdef CONFIG_LV_NUTTX_LCD_BUFFER_COUNT + #define LV_NUTTX_LCD_BUFFER_COUNT CONFIG_LV_NUTTX_LCD_BUFFER_COUNT + #else + #define LV_NUTTX_LCD_BUFFER_COUNT 0 + #endif + #endif + #ifndef LV_NUTTX_LCD_BUFFER_SIZE + #ifdef CONFIG_LV_NUTTX_LCD_BUFFER_SIZE + #define LV_NUTTX_LCD_BUFFER_SIZE CONFIG_LV_NUTTX_LCD_BUFFER_SIZE + #else + #define LV_NUTTX_LCD_BUFFER_SIZE 60 + #endif #endif #endif -#endif -/*Driver for /dev/input*/ -#ifndef LV_USE_NUTTX_TOUCHSCREEN - #ifdef CONFIG_LV_USE_NUTTX_TOUCHSCREEN - #define LV_USE_NUTTX_TOUCHSCREEN CONFIG_LV_USE_NUTTX_TOUCHSCREEN - #else - #define LV_USE_NUTTX_TOUCHSCREEN 0 + /*Driver for /dev/input*/ + #ifndef LV_USE_NUTTX_TOUCHSCREEN + #ifdef CONFIG_LV_USE_NUTTX_TOUCHSCREEN + #define LV_USE_NUTTX_TOUCHSCREEN CONFIG_LV_USE_NUTTX_TOUCHSCREEN + #else + #define LV_USE_NUTTX_TOUCHSCREEN 0 + #endif #endif + #endif /*Driver for /dev/dri/card*/ @@ -2561,23 +2596,19 @@ #endif #endif -/*================== -* EXAMPLES -*==================*/ - -/*Enable the examples to be built with the library*/ -#ifndef LV_BUILD_EXAMPLES - #ifdef _LV_KCONFIG_PRESENT - #ifdef CONFIG_LV_BUILD_EXAMPLES - #define LV_BUILD_EXAMPLES CONFIG_LV_BUILD_EXAMPLES - #else - #define LV_BUILD_EXAMPLES 0 - #endif +/*Driver for evdev input devices*/ +#ifndef LV_USE_EVDEV + #ifdef CONFIG_LV_USE_EVDEV + #define LV_USE_EVDEV CONFIG_LV_USE_EVDEV #else - #define LV_BUILD_EXAMPLES 1 + #define LV_USE_EVDEV 0 #endif #endif +/*================== +* EXAMPLES +*==================*/ + /*---------------------------------- * End of parsing lv_conf_template.h -----------------------------------*/ @@ -2586,6 +2617,11 @@ LV_EXPORT_CONST_INT(LV_DPI_DEF); #undef _LV_KCONFIG_PRESENT +#if LV_USE_FLOAT + typedef float lv_value_precise_t; +#else + typedef int32_t lv_value_precise_t; +#endif /*Set some defines if a dependency is disabled*/ #if LV_USE_LOG == 0 diff --git a/project/gui/lvgl/src/lv_init.c b/project/gui/lvgl/src/lv_init.c index 983a0057f..f4488c87d 100644 --- a/project/gui/lvgl/src/lv_init.c +++ b/project/gui/lvgl/src/lv_init.c @@ -178,9 +178,9 @@ void lv_init(void) LV_LOG_WARN("The strings have no UTF-8 encoding. Non-ASCII characters won't be displayed."); } - uint32_t endianess_test = 0x11223344; - uint8_t * endianess_test_p = (uint8_t *) &endianess_test; - bool big_endian = endianess_test_p[0] == 0x11; + uint32_t endianness_test = 0x11223344; + uint8_t * endianness_test_p = (uint8_t *) &endianness_test; + bool big_endian = endianness_test_p[0] == 0x11; if(big_endian) { LV_ASSERT_MSG(LV_BIG_ENDIAN_SYSTEM == 1, diff --git a/project/gui/lvgl/src/misc/lv_area.c b/project/gui/lvgl/src/misc/lv_area.c index fb715ba27..3cbd05eb3 100644 --- a/project/gui/lvgl/src/misc/lv_area.c +++ b/project/gui/lvgl/src/misc/lv_area.c @@ -531,9 +531,10 @@ void lv_area_align(const lv_area_t * base, lv_area_t * to_align, lv_align_t alig } #define _LV_TRANSFORM_TRIGO_SHIFT 10 -void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_point_t * pivot) +void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom_x, int32_t zoom_y, const lv_point_t * pivot, + bool zoom_first) { - if(angle == 0 && zoom == 256) { + if(angle == 0 && zoom_x == 256 && zoom_y == 256) { return; } @@ -541,8 +542,8 @@ void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_po p->y -= pivot->y; if(angle == 0) { - p->x = (((int32_t)(p->x) * zoom) >> 8) + pivot->x; - p->y = (((int32_t)(p->y) * zoom) >> 8) + pivot->y; + p->x = (((int32_t)(p->x) * zoom_x) >> 8) + pivot->x; + p->y = (((int32_t)(p->y) * zoom_y) >> 8) + pivot->y; return; } lv_area_transform_cache_t * cache = &trans_cache; @@ -569,13 +570,22 @@ void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_po } int32_t x = p->x; int32_t y = p->y; - if(zoom == 256) { + if(zoom_x == 256 && zoom_y == 256) { p->x = ((cache->cosma * x - cache->sinma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x; p->y = ((cache->sinma * x + cache->cosma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y; } else { - p->x = (((cache->cosma * x - cache->sinma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x; - p->y = (((cache->sinma * x + cache->cosma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y; + if(zoom_first) { + x *= zoom_x; + y *= zoom_y; + p->x = (((cache->cosma * x - cache->sinma * y)) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x; + p->y = (((cache->sinma * x + cache->cosma * y)) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y; + } + else { + p->x = (((cache->cosma * x - cache->sinma * y) * zoom_x) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x; + p->y = (((cache->sinma * x + cache->cosma * y) * zoom_y) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y; + } + } } diff --git a/project/gui/lvgl/src/misc/lv_area.h b/project/gui/lvgl/src/misc/lv_area.h index 0ed24cabc..0206fab33 100644 --- a/project/gui/lvgl/src/misc/lv_area.h +++ b/project/gui/lvgl/src/misc/lv_area.h @@ -264,7 +264,8 @@ bool _lv_area_is_equal(const lv_area_t * a, const lv_area_t * b); */ void lv_area_align(const lv_area_t * base, lv_area_t * to_align, lv_align_t align, lv_coord_t ofs_x, lv_coord_t ofs_y); -void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_point_t * pivot); +void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom_x, int32_t zoom_y, const lv_point_t * pivot, + bool zoom_first); /********************** * MACROS diff --git a/project/gui/lvgl/src/misc/lv_cache.h b/project/gui/lvgl/src/misc/lv_cache.h index f5b8dfc81..c3e259ee9 100644 --- a/project/gui/lvgl/src/misc/lv_cache.h +++ b/project/gui/lvgl/src/misc/lv_cache.h @@ -31,7 +31,7 @@ typedef enum { _LV_CACHE_SRC_TYPE_LAST, } lv_cache_src_type_t; -typedef struct { +typedef struct _lv_cache_entry_t { /**The image source or other source related to the cache content.*/ const void * src; @@ -41,6 +41,9 @@ typedef struct { uint32_t param1; uint32_t param2; + /** User processing tag*/ + uint32_t process_state; + /** The data to cache*/ const void * data; diff --git a/project/gui/lvgl/src/misc/lv_event.h b/project/gui/lvgl/src/misc/lv_event.h index 387e51994..b1a05dfa6 100644 --- a/project/gui/lvgl/src/misc/lv_event.h +++ b/project/gui/lvgl/src/misc/lv_event.h @@ -62,7 +62,7 @@ typedef enum { LV_EVENT_DEFOCUSED, /**< The object is defocused*/ LV_EVENT_LEAVE, /**< The object is defocused but still selected*/ LV_EVENT_HIT_TEST, /**< Perform advanced hit-testing*/ - LV_EVENT_INDEV_RESET, /**< Indev has been reseted*/ + LV_EVENT_INDEV_RESET, /**< Indev has been reset*/ /** Drawing events*/ LV_EVENT_COVER_CHECK, /**< Check if the object fully covers an area. The event parameter is `lv_cover_check_info_t *`.*/ @@ -97,10 +97,6 @@ typedef enum { LV_EVENT_GET_SELF_SIZE, /**< Get the internal size of a widget*/ /** Events of optional LVGL components*/ -#if LV_USE_MSG - LV_EVENT_MSG_RECEIVED, -#endif - LV_EVENT_INVALIDATE_AREA, LV_EVENT_RENDER_START, LV_EVENT_RENDER_READY, diff --git a/project/gui/lvgl/src/misc/lv_profiler.h b/project/gui/lvgl/src/misc/lv_profiler.h index 9537586e8..47d5bd243 100644 --- a/project/gui/lvgl/src/misc/lv_profiler.h +++ b/project/gui/lvgl/src/misc/lv_profiler.h @@ -40,6 +40,8 @@ extern "C" { #define LV_PROFILER_BEGIN #define LV_PROFILER_END +#define LV_PROFILER_BEGIN_TAG(tag) LV_UNUSED(tag) +#define LV_PROFILER_END_TAG(tag) LV_UNUSED(tag) #endif /*LV_USE_PROFILER*/ diff --git a/project/gui/lvgl/src/misc/lv_profiler_builtin.h b/project/gui/lvgl/src/misc/lv_profiler_builtin.h index 66fe3472d..d70d37d93 100644 --- a/project/gui/lvgl/src/misc/lv_profiler_builtin.h +++ b/project/gui/lvgl/src/misc/lv_profiler_builtin.h @@ -26,8 +26,10 @@ extern "C" { * DEFINES *********************/ -#define LV_PROFILER_BUILTIN_BEGIN lv_profiler_builtin_write(__func__, 'B') -#define LV_PROFILER_BUILTIN_END lv_profiler_builtin_write(__func__, 'E') +#define LV_PROFILER_BUILTIN_BEGIN_TAG(tag) lv_profiler_builtin_write((tag), 'B') +#define LV_PROFILER_BUILTIN_END_TAG(tag) lv_profiler_builtin_write((tag), 'E') +#define LV_PROFILER_BUILTIN_BEGIN LV_PROFILER_BUILTIN_BEGIN_TAG(__func__) +#define LV_PROFILER_BUILTIN_END LV_PROFILER_BUILTIN_END_TAG(__func__) /********************** * TYPEDEFS diff --git a/project/gui/lvgl/src/misc/lv_style.c b/project/gui/lvgl/src/misc/lv_style.c index 2041fb763..2b04d51f0 100644 --- a/project/gui/lvgl/src/misc/lv_style.c +++ b/project/gui/lvgl/src/misc/lv_style.c @@ -48,7 +48,8 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR [LV_STYLE_TRANSFORM_HEIGHT] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE | LV_STYLE_PROP_FLAG_TRANSFORM, [LV_STYLE_TRANSLATE_X] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE | LV_STYLE_PROP_FLAG_PARENT_LAYOUT_UPDATE, [LV_STYLE_TRANSLATE_Y] = LV_STYLE_PROP_FLAG_LAYOUT_UPDATE | LV_STYLE_PROP_FLAG_PARENT_LAYOUT_UPDATE, - [LV_STYLE_TRANSFORM_SCALE] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE | LV_STYLE_PROP_FLAG_LAYER_UPDATE | LV_STYLE_PROP_FLAG_TRANSFORM, + [LV_STYLE_TRANSFORM_SCALE_X] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE | LV_STYLE_PROP_FLAG_LAYER_UPDATE | LV_STYLE_PROP_FLAG_TRANSFORM, + [LV_STYLE_TRANSFORM_SCALE_Y] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE | LV_STYLE_PROP_FLAG_LAYER_UPDATE | LV_STYLE_PROP_FLAG_TRANSFORM, [LV_STYLE_TRANSFORM_ROTATION] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE | LV_STYLE_PROP_FLAG_LAYER_UPDATE | LV_STYLE_PROP_FLAG_TRANSFORM, [LV_STYLE_PAD_TOP] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE | LV_STYLE_PROP_FLAG_LAYOUT_UPDATE, @@ -68,8 +69,9 @@ const uint8_t _lv_style_builtin_prop_flag_lookup_table[_LV_STYLE_NUM_BUILT_IN_PR [LV_STYLE_BG_GRAD_DIR] = 0, [LV_STYLE_BG_MAIN_STOP] = 0, [LV_STYLE_BG_GRAD_STOP] = 0, + [LV_STYLE_BG_MAIN_OPA] = 0, + [LV_STYLE_BG_GRAD_OPA] = 0, [LV_STYLE_BG_GRAD] = 0, - [LV_STYLE_BG_DITHER_MODE] = 0, [LV_STYLE_BG_IMAGE_SRC] = LV_STYLE_PROP_FLAG_EXT_DRAW_UPDATE, [LV_STYLE_BG_IMAGE_OPA] = 0, @@ -345,7 +347,8 @@ lv_style_value_t lv_style_prop_get_default(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: + case LV_STYLE_TRANSFORM_SCALE_X: + case LV_STYLE_TRANSFORM_SCALE_Y: return (lv_style_value_t) { .num = LV_SCALE_NONE }; @@ -369,6 +372,8 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) 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: diff --git a/project/gui/lvgl/src/misc/lv_style.h b/project/gui/lvgl/src/misc/lv_style.h index 840c895da..8b9166ccc 100644 --- a/project/gui/lvgl/src/misc/lv_style.h +++ b/project/gui/lvgl/src/misc/lv_style.h @@ -146,22 +146,6 @@ typedef uint8_t lv_grad_dir_t; #endif /*DOXYGEN*/ -/** - * The dithering algorithm for the gradient - */ -enum _lv_dither_mode_t { - LV_DITHER_NONE, /**< No dithering, colors are just quantized to the output resolution*/ - LV_DITHER_ORDERED, /**< Ordered dithering. Faster to compute and use less memory but lower quality*/ - LV_DITHER_ERR_DIFF, /**< Error diffusion mode. Slower to compute and use more memory but give highest dither quality*/ -}; - -#ifdef DOXYGEN -typedef _lv_dither_mode_t lv_dither_mode_t; -#else -typedef uint8_t lv_dither_mode_t; -#endif /*DOXYGEN*/ - - /** A gradient stop definition. * This matches a color and a position in a virtual 0-255 scale. */ @@ -177,8 +161,6 @@ typedef struct { uint8_t stops_count; /**< The number of used stops in the array */ lv_grad_dir_t dir : 3; /**< The gradient direction. * Any of LV_GRAD_DIR_HOR, LV_GRAD_DIR_VER, LV_GRAD_DIR_NONE */ - lv_dither_mode_t dither : 3; /**< Whether to dither the gradient or not. - * Any of LV_DITHER_NONE, LV_DITHER_ORDERED, LV_DITHER_ERR_DIFF */ } lv_grad_dsc_t; /** @@ -235,13 +217,14 @@ enum _lv_style_prop_t { LV_STYLE_BG_GRAD_DIR = 32, - LV_STYLE_BG_GRAD_COLOR = 33, - LV_STYLE_BG_MAIN_STOP = 34, - LV_STYLE_BG_GRAD_STOP = 35, + LV_STYLE_BG_MAIN_STOP = 33, + LV_STYLE_BG_GRAD_STOP = 34, + LV_STYLE_BG_GRAD_COLOR = 35, - LV_STYLE_BG_GRAD = 36, - LV_STYLE_BG_DITHER_MODE = 37, - LV_STYLE_BASE_DIR = 38, + LV_STYLE_BG_MAIN_OPA = 36, + LV_STYLE_BG_GRAD_OPA = 37, + LV_STYLE_BG_GRAD = 38, + LV_STYLE_BASE_DIR = 39, LV_STYLE_BG_IMAGE_SRC = 40, LV_STYLE_BG_IMAGE_OPA = 41, @@ -296,25 +279,26 @@ enum _lv_style_prop_t { LV_STYLE_TEXT_OPA = 89, LV_STYLE_TEXT_FONT = 90, - LV_STYLE_TEXT_LETTER_SPACE = 92, - LV_STYLE_TEXT_LINE_SPACE = 93, - LV_STYLE_TEXT_DECOR = 94, - LV_STYLE_TEXT_ALIGN = 95, - - LV_STYLE_OPA = 96, - LV_STYLE_OPA_LAYERED = 97, - LV_STYLE_COLOR_FILTER_DSC = 98, - LV_STYLE_COLOR_FILTER_OPA = 99, - LV_STYLE_ANIM = 100, - LV_STYLE_ANIM_TIME = 101, - LV_STYLE_ANIM_SPEED = 102, - LV_STYLE_TRANSITION = 103, - LV_STYLE_BLEND_MODE = 104, - LV_STYLE_TRANSFORM_WIDTH = 105, - LV_STYLE_TRANSFORM_HEIGHT = 106, - LV_STYLE_TRANSLATE_X = 107, - LV_STYLE_TRANSLATE_Y = 108, - LV_STYLE_TRANSFORM_SCALE = 109, + LV_STYLE_TEXT_LETTER_SPACE = 91, + LV_STYLE_TEXT_LINE_SPACE = 92, + LV_STYLE_TEXT_DECOR = 93, + LV_STYLE_TEXT_ALIGN = 94, + + LV_STYLE_OPA = 95, + LV_STYLE_OPA_LAYERED = 96, + LV_STYLE_COLOR_FILTER_DSC = 97, + LV_STYLE_COLOR_FILTER_OPA = 98, + LV_STYLE_ANIM = 99, + LV_STYLE_ANIM_TIME = 100, + LV_STYLE_ANIM_SPEED = 101, + LV_STYLE_TRANSITION = 102, + LV_STYLE_BLEND_MODE = 103, + LV_STYLE_TRANSFORM_WIDTH = 104, + LV_STYLE_TRANSFORM_HEIGHT = 105, + LV_STYLE_TRANSLATE_X = 106, + LV_STYLE_TRANSLATE_Y = 107, + LV_STYLE_TRANSFORM_SCALE_X = 108, + LV_STYLE_TRANSFORM_SCALE_Y = 109, LV_STYLE_TRANSFORM_ROTATION = 110, LV_STYLE_TRANSFORM_PIVOT_X = 111, LV_STYLE_TRANSFORM_PIVOT_Y = 112, @@ -605,6 +589,12 @@ static inline void lv_style_set_pad_gap(lv_style_t * style, lv_coord_t value) lv_style_set_pad_column(style, value); } +static inline void lv_style_set_transform_scale(lv_style_t * style, lv_coord_t value) +{ + lv_style_set_transform_scale_x(style, value); + lv_style_set_transform_scale_y(style, value); +} + /** * @brief Check if the style property has a specified behavioral flag. * diff --git a/project/gui/lvgl/src/misc/lv_style_gen.c b/project/gui/lvgl/src/misc/lv_style_gen.c index 6cd1c1e3b..56b5fffb2 100644 --- a/project/gui/lvgl/src/misc/lv_style_gen.c +++ b/project/gui/lvgl/src/misc/lv_style_gen.c @@ -140,15 +140,25 @@ void lv_style_set_translate_y(lv_style_t * style, lv_coord_t value) const lv_style_prop_t _lv_style_const_prop_id_TRANSLATE_Y = LV_STYLE_TRANSLATE_Y; -void lv_style_set_transform_scale(lv_style_t * style, lv_coord_t value) +void lv_style_set_transform_scale_x(lv_style_t * style, lv_coord_t value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_TRANSFORM_SCALE, v); + lv_style_set_prop(style, LV_STYLE_TRANSFORM_SCALE_X, v); } -const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_SCALE = LV_STYLE_TRANSFORM_SCALE; +const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_SCALE_X = LV_STYLE_TRANSFORM_SCALE_X; + +void lv_style_set_transform_scale_y(lv_style_t * style, lv_coord_t value) +{ + lv_style_value_t v = { + .num = (int32_t)value + }; + lv_style_set_prop(style, LV_STYLE_TRANSFORM_SCALE_Y, v); +} + +const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_SCALE_Y = LV_STYLE_TRANSFORM_SCALE_Y; void lv_style_set_transform_rotation(lv_style_t * style, lv_coord_t value) { @@ -340,25 +350,35 @@ void lv_style_set_bg_grad_stop(lv_style_t * style, lv_coord_t value) const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD_STOP = LV_STYLE_BG_GRAD_STOP; -void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value) +void lv_style_set_bg_main_opa(lv_style_t * style, lv_opa_t value) { lv_style_value_t v = { - .ptr = value + .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_BG_GRAD, v); + lv_style_set_prop(style, LV_STYLE_BG_MAIN_OPA, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD = LV_STYLE_BG_GRAD; +const lv_style_prop_t _lv_style_const_prop_id_BG_MAIN_OPA = LV_STYLE_BG_MAIN_OPA; -void lv_style_set_bg_dither_mode(lv_style_t * style, lv_dither_mode_t value) +void lv_style_set_bg_grad_opa(lv_style_t * style, lv_opa_t value) { lv_style_value_t v = { .num = (int32_t)value }; - lv_style_set_prop(style, LV_STYLE_BG_DITHER_MODE, v); + lv_style_set_prop(style, LV_STYLE_BG_GRAD_OPA, v); } -const lv_style_prop_t _lv_style_const_prop_id_BG_DITHER_MODE = LV_STYLE_BG_DITHER_MODE; +const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD_OPA = LV_STYLE_BG_GRAD_OPA; + +void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value) +{ + lv_style_value_t v = { + .ptr = value + }; + lv_style_set_prop(style, LV_STYLE_BG_GRAD, v); +} + +const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD = LV_STYLE_BG_GRAD; void lv_style_set_bg_image_src(lv_style_t * style, const void * value) { diff --git a/project/gui/lvgl/src/misc/lv_style_gen.h b/project/gui/lvgl/src/misc/lv_style_gen.h index 0bbe4b30a..4d0221d4b 100644 --- a/project/gui/lvgl/src/misc/lv_style_gen.h +++ b/project/gui/lvgl/src/misc/lv_style_gen.h @@ -36,8 +36,10 @@ void lv_style_set_translate_x(lv_style_t * style, lv_coord_t value); extern const lv_style_prop_t _lv_style_const_prop_id_TRANSLATE_X; void lv_style_set_translate_y(lv_style_t * style, lv_coord_t value); extern const lv_style_prop_t _lv_style_const_prop_id_TRANSLATE_Y; -void lv_style_set_transform_scale(lv_style_t * style, lv_coord_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_SCALE; +void lv_style_set_transform_scale_x(lv_style_t * style, lv_coord_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_SCALE_X; +void lv_style_set_transform_scale_y(lv_style_t * style, lv_coord_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_SCALE_Y; void lv_style_set_transform_rotation(lv_style_t * style, lv_coord_t value); extern const lv_style_prop_t _lv_style_const_prop_id_TRANSFORM_ROTATION; void lv_style_set_transform_pivot_x(lv_style_t * style, lv_coord_t value); @@ -76,10 +78,12 @@ void lv_style_set_bg_main_stop(lv_style_t * style, lv_coord_t value); extern const lv_style_prop_t _lv_style_const_prop_id_BG_MAIN_STOP; void lv_style_set_bg_grad_stop(lv_style_t * style, lv_coord_t value); extern const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD_STOP; +void lv_style_set_bg_main_opa(lv_style_t * style, lv_opa_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_MAIN_OPA; +void lv_style_set_bg_grad_opa(lv_style_t * style, lv_opa_t value); +extern const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD_OPA; void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value); extern const lv_style_prop_t _lv_style_const_prop_id_BG_GRAD; -void lv_style_set_bg_dither_mode(lv_style_t * style, lv_dither_mode_t value); -extern const lv_style_prop_t _lv_style_const_prop_id_BG_DITHER_MODE; void lv_style_set_bg_image_src(lv_style_t * style, const void * value); extern const lv_style_prop_t _lv_style_const_prop_id_BG_IMAGE_SRC; void lv_style_set_bg_image_opa(lv_style_t * style, lv_opa_t value); @@ -284,9 +288,14 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN; .prop_ptr = &_lv_style_const_prop_id_TRANSLATE_Y, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_TRANSFORM_SCALE(val) \ +#define LV_STYLE_CONST_TRANSFORM_SCALE_X(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_TRANSFORM_SCALE, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_TRANSFORM_SCALE_X, .value = { .num = (int32_t)val } \ + } + +#define LV_STYLE_CONST_TRANSFORM_SCALE_Y(val) \ + { \ + .prop_ptr = &_lv_style_const_prop_id_TRANSFORM_SCALE_Y, .value = { .num = (int32_t)val } \ } #define LV_STYLE_CONST_TRANSFORM_ROTATION(val) \ @@ -384,14 +393,19 @@ extern const lv_style_prop_t _lv_style_const_prop_id_GRID_CELL_ROW_SPAN; .prop_ptr = &_lv_style_const_prop_id_BG_GRAD_STOP, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_BG_GRAD(val) \ +#define LV_STYLE_CONST_BG_MAIN_OPA(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_GRAD, .value = { .ptr = val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_MAIN_OPA, .value = { .num = (int32_t)val } \ } -#define LV_STYLE_CONST_BG_DITHER_MODE(val) \ +#define LV_STYLE_CONST_BG_GRAD_OPA(val) \ { \ - .prop_ptr = &_lv_style_const_prop_id_BG_DITHER_MODE, .value = { .num = (int32_t)val } \ + .prop_ptr = &_lv_style_const_prop_id_BG_GRAD_OPA, .value = { .num = (int32_t)val } \ + } + +#define LV_STYLE_CONST_BG_GRAD(val) \ + { \ + .prop_ptr = &_lv_style_const_prop_id_BG_GRAD, .value = { .ptr = val } \ } #define LV_STYLE_CONST_BG_IMAGE_SRC(val) \ diff --git a/project/gui/lvgl/src/misc/lv_text_ap.c b/project/gui/lvgl/src/misc/lv_text_ap.c index c38e03734..8fbfef665 100644 --- a/project/gui/lvgl/src/misc/lv_text_ap.c +++ b/project/gui/lvgl/src/misc/lv_text_ap.c @@ -23,7 +23,7 @@ typedef struct { uint8_t char_offset; uint16_t char_end_form; - int8_t char_begining_form_offset; + int8_t char_beginning_form_offset; int8_t char_middle_form_offset; int8_t char_isolated_form_offset; struct { @@ -205,7 +205,7 @@ void _lv_text_ap_proc(const char * txt, char * txt_out) if(conjunction_to_previuse && conjunction_to_next) ch_fin[j] = ap_chars_map[index_current].char_end_form + ap_chars_map[index_current].char_middle_form_offset; else if(!conjunction_to_previuse && conjunction_to_next) - ch_fin[j] = ap_chars_map[index_current].char_end_form + ap_chars_map[index_current].char_begining_form_offset; + ch_fin[j] = ap_chars_map[index_current].char_end_form + ap_chars_map[index_current].char_beginning_form_offset; else if(conjunction_to_previuse && !conjunction_to_next) ch_fin[j] = ap_chars_map[index_current].char_end_form; else @@ -259,7 +259,7 @@ static uint32_t lv_ap_get_char_index(uint16_t c) if(c == (ap_chars_map[i].char_offset + LV_AP_ALPHABET_BASE_CODE)) return i; else if(c == ap_chars_map[i].char_end_form //is it an End form - || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_begining_form_offset) //is it a Beginning form + || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_beginning_form_offset) //is it a Beginning form || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_middle_form_offset) //is it a middle form || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_isolated_form_offset)) { //is it an isolated form return i; diff --git a/project/gui/lvgl/src/misc/lv_timer.c b/project/gui/lvgl/src/misc/lv_timer.c index 32b27b00a..29ccbbdf9 100644 --- a/project/gui/lvgl/src/misc/lv_timer.c +++ b/project/gui/lvgl/src/misc/lv_timer.c @@ -52,9 +52,6 @@ static void lv_timer_handler_resume(void); * GLOBAL FUNCTIONS **********************/ -/** - * Init the lv_timer module - */ void _lv_timer_core_init(void) { _lv_ll_init(timer_ll_p, sizeof(lv_timer_t)); @@ -63,10 +60,6 @@ void _lv_timer_core_init(void) lv_timer_enable(true); } -/** - * Call it periodically to handle lv_timers. - * @return the time after which it must be called again - */ LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_timer_handler(void) { LV_TRACE_TIMER("begin"); @@ -160,25 +153,11 @@ LV_ATTRIBUTE_TIMER_HANDLER void lv_timer_periodic_handler(void) } } -/** - * Create an "empty" timer. It needs to be initialized with at least - * `lv_timer_set_cb` and `lv_timer_set_period` - * @return pointer to the created timer - */ lv_timer_t * lv_timer_create_basic(void) { return lv_timer_create(NULL, DEF_PERIOD, NULL); } -/** - * Create a new lv_timer - * @param timer_xcb a callback which is the timer itself. It will be called periodically. - * (the 'x' in the argument name indicates that it's not a fully generic function because it not follows - * the `func_name(object, callback, ...)` convention) - * @param period call period in ms unit - * @param user_data custom parameter - * @return pointer to the new timer - */ lv_timer_t * lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void * user_data) { lv_timer_t * new_timer = NULL; @@ -193,6 +172,7 @@ lv_timer_t * lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void * us new_timer->paused = 0; new_timer->last_run = lv_tick_get(); new_timer->user_data = user_data; + new_timer->auto_delete = true; state.timer_created = true; @@ -201,20 +181,11 @@ lv_timer_t * lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void * us return new_timer; } -/** - * Set the callback to the timer (the function to call periodically) - * @param timer pointer to a timer - * @param timer_cb the function to call periodically - */ void lv_timer_set_cb(lv_timer_t * timer, lv_timer_cb_t timer_cb) { timer->timer_cb = timer_cb; } -/** - * Delete a lv_timer - * @param timer pointer to timer created by timer - */ void lv_timer_delete(lv_timer_t * timer) { _lv_ll_remove(timer_ll_p, timer); @@ -223,10 +194,6 @@ void lv_timer_delete(lv_timer_t * timer) lv_free(timer); } -/** - * Pause/resume a timer. - * @param timer pointer to an lv_timer - */ void lv_timer_pause(lv_timer_t * timer) { timer->paused = true; @@ -238,89 +205,53 @@ void lv_timer_resume(lv_timer_t * timer) lv_timer_handler_resume(); } -/** - * Set new period for a lv_timer - * @param timer pointer to a lv_timer - * @param period the new period - */ void lv_timer_set_period(lv_timer_t * timer, uint32_t period) { timer->period = period; } -/** - * Make a lv_timer ready. It will not wait its period. - * @param timer pointer to a lv_timer. - */ void lv_timer_ready(lv_timer_t * timer) { timer->last_run = lv_tick_get() - timer->period - 1; } -/** - * Set the number of times a timer will repeat. - * @param timer pointer to a lv_timer. - * @param repeat_count -1 : infinity; 0 : stop ; n >0: residual times - */ void lv_timer_set_repeat_count(lv_timer_t * timer, int32_t repeat_count) { timer->repeat_count = repeat_count; } -/** - * Set custom parameter to the lv_timer. - * @param timer pointer to a lv_timer. - * @param user_data custom parameter - */ +void lv_timer_set_auto_delete(lv_timer_t * timer, bool auto_delete) +{ + timer->auto_delete = auto_delete; +} + void lv_timer_set_user_data(lv_timer_t * timer, void * user_data) { timer->user_data = user_data; } -/** - * Reset a lv_timer. - * It will be called the previously set period milliseconds later. - * @param timer pointer to a lv_timer. - */ void lv_timer_reset(lv_timer_t * timer) { timer->last_run = lv_tick_get(); lv_timer_handler_resume(); } -/** - * Enable or disable the whole lv_timer handling - * @param en true: lv_timer handling is running, false: lv_timer handling is suspended - */ void lv_timer_enable(bool en) { state.lv_timer_run = en; if(en) lv_timer_handler_resume(); } -/** - * Get idle percentage - * @return the lv_timer idle in percentage - */ uint8_t lv_timer_get_idle(void) { return state.idle_last; } -/** - * Get idle period start tick - * @return the lv_timer idle period start tick - */ uint32_t lv_timer_get_time_until_next(void) { return state.timer_time_until_next; } -/** - * Iterate through the timers - * @param timer NULL to start iteration or the previous return value to get the next timer - * @return the next timer or NULL if there is no more timer - */ lv_timer_t * lv_timer_get_next(lv_timer_t * timer) { if(timer == NULL) return _lv_ll_get_head(timer_ll_p); @@ -365,8 +296,14 @@ static bool lv_timer_exec(lv_timer_t * timer) if(state.timer_deleted == false) { /*The timer might be deleted by itself as well*/ if(timer->repeat_count == 0) { /*The repeat count is over, delete the timer*/ - LV_TRACE_TIMER("deleting timer with %p callback because the repeat count is over", *((void **)&timer->timer_cb)); - lv_timer_delete(timer); + if(timer->auto_delete) { + LV_TRACE_TIMER("deleting timer with %p callback because the repeat count is over", *((void **)&timer->timer_cb)); + lv_timer_delete(timer); + } + else { + LV_TRACE_TIMER("pausing timer with %p callback because the repeat count is over", *((void **)&timer->timer_cb)); + lv_timer_pause(timer); + } } } @@ -394,4 +331,13 @@ static void lv_timer_handler_resume(void) { /*If there is a timer which is ready to run then resume the timer loop*/ state.timer_time_until_next = 0; + if(state.resume_cb) { + state.resume_cb(state.resume_data); + } +} + +void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void * data) +{ + state.resume_cb = cb; + state.resume_data = data; } diff --git a/project/gui/lvgl/src/misc/lv_timer.h b/project/gui/lvgl/src/misc/lv_timer.h index 85dd8b10f..9fd0a8cc7 100644 --- a/project/gui/lvgl/src/misc/lv_timer.h +++ b/project/gui/lvgl/src/misc/lv_timer.h @@ -39,6 +39,11 @@ struct _lv_timer_t; */ typedef void (*lv_timer_cb_t)(struct _lv_timer_t *); +/** + * Timer handler resume this type of function. + */ +typedef void (*lv_timer_handler_resume_cb_t)(void * data); + /** * Descriptor of a lv_timer */ @@ -49,6 +54,7 @@ typedef struct _lv_timer_t { void * user_data; /**< Custom user data*/ int32_t repeat_count; /**< 1: One time; -1 : infinity; n>0: residual times*/ uint32_t paused : 1; + uint32_t auto_delete : 1; } lv_timer_t; typedef struct { @@ -65,6 +71,9 @@ typedef struct { uint32_t busy_time; uint32_t idle_period_start; uint32_t run_cnt; + + lv_timer_handler_resume_cb_t resume_cb; + void * resume_data; } lv_timer_state_t; /********************** @@ -110,6 +119,13 @@ static inline LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_timer_handler_run_in_period */ LV_ATTRIBUTE_TIMER_HANDLER void lv_timer_periodic_handler(void); +/** + * Set the resume callback to the timer handler + * @param cb the function to call when timer handler is resumed + * @param data pointer to a resume data + */ +void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void * data); + /** * Create an "empty" timer. It needs to be initialized with at least * `lv_timer_set_cb` and `lv_timer_set_period` @@ -135,11 +151,15 @@ lv_timer_t * lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void * us void lv_timer_delete(lv_timer_t * timer); /** - * Pause/resume a timer. + * Pause a timer. * @param timer pointer to an lv_timer */ void lv_timer_pause(lv_timer_t * timer); +/** + * Resume a timer. + * @param timer pointer to an lv_timer + */ void lv_timer_resume(lv_timer_t * timer); /** @@ -169,6 +189,13 @@ void lv_timer_ready(lv_timer_t * timer); */ void lv_timer_set_repeat_count(lv_timer_t * timer, int32_t repeat_count); +/** + * Set whether a lv_timer will be deleted automatically when it is called `repeat_count` times. + * @param timer pointer to a lv_timer. + * @param auto_delete true: auto delete; false: timer will be paused when it is called `repeat_count` times. + */ +void lv_timer_set_auto_delete(lv_timer_t * timer, bool auto_delete); + /** * Set custom parameter to the lv_timer. * @param timer pointer to a lv_timer. @@ -218,6 +245,16 @@ static inline void * lv_timer_get_user_data(lv_timer_t * timer) return timer->user_data; } +/** + * Get the pause state of a timer + * @param timer pointer to a lv_timer + * @return true: timer is paused; false: timer is running + */ +static inline bool lv_timer_get_paused(lv_timer_t * timer) +{ + return timer->paused; +} + /********************** * MACROS **********************/ diff --git a/project/gui/lvgl/src/misc/lv_types.h b/project/gui/lvgl/src/misc/lv_types.h index b6f57aefe..ee263c4f0 100644 --- a/project/gui/lvgl/src/misc/lv_types.h +++ b/project/gui/lvgl/src/misc/lv_types.h @@ -38,7 +38,6 @@ extern "C" { #define LV_OS_CMSIS_RTOS2 3 #define LV_OS_CUSTOM 255 - #define LV_STDLIB_BUILTIN 0 #define LV_STDLIB_CLIB 1 #define LV_STDLIB_MICROPYTHON 2 diff --git a/project/gui/lvgl/src/others/ime/lv_ime_pinyin.c b/project/gui/lvgl/src/others/ime/lv_ime_pinyin.c index 53f313782..ce54bda53 100644 --- a/project/gui/lvgl/src/others/ime/lv_ime_pinyin.c +++ b/project/gui/lvgl/src/others/ime/lv_ime_pinyin.c @@ -833,7 +833,7 @@ static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir) { lv_ime_pinyin_t * pinyin_ime = (lv_ime_pinyin_t *)obj; uint16_t page_num = pinyin_ime->cand_num / LV_IME_PINYIN_CAND_TEXT_NUM; - uint16_t sur = pinyin_ime->cand_num % LV_IME_PINYIN_CAND_TEXT_NUM; + uint16_t remainder = pinyin_ime->cand_num % LV_IME_PINYIN_CAND_TEXT_NUM; if(dir == 0) { if(pinyin_ime->py_page) { @@ -841,7 +841,7 @@ static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir) } } else { - if(sur == 0) { + if(remainder == 0) { page_num -= 1; } if(pinyin_ime->py_page < page_num) { @@ -858,8 +858,8 @@ static void pinyin_page_proc(lv_obj_t * obj, uint16_t dir) // fill buf uint16_t offset = pinyin_ime->py_page * (3 * LV_IME_PINYIN_CAND_TEXT_NUM); for(uint8_t i = 0; (i < pinyin_ime->cand_num && i < LV_IME_PINYIN_CAND_TEXT_NUM); i++) { - if((sur > 0) && (pinyin_ime->py_page == page_num)) { - if(i > sur) + if((remainder > 0) && (pinyin_ime->py_page == page_num)) { + if(i > remainder) break; } for(uint8_t j = 0; j < 3; j++) { diff --git a/project/gui/lvgl/src/others/sysmon/lv_sysmon.c b/project/gui/lvgl/src/others/sysmon/lv_sysmon.c index 357038c9b..de9404865 100644 --- a/project/gui/lvgl/src/others/sysmon/lv_sysmon.c +++ b/project/gui/lvgl/src/others/sysmon/lv_sysmon.c @@ -12,6 +12,9 @@ #if LV_USE_SYSMON #include "../../core/lv_global.h" +#include "../../misc/lv_async.h" +#include "../../stdlib/lv_string.h" +#include "../../widgets/label/lv_label.h" /********************* * DEFINES @@ -20,54 +23,38 @@ #define SYSMON_REFR_PERIOD_DEF 300 /* ms */ -#define perf_info LV_GLOBAL_DEFAULT()->sysmon_perf_info +#if LV_USE_PERF_MONITOR + #define sysmon_perf LV_GLOBAL_DEFAULT()->sysmon_perf +#endif + +#if LV_USE_MEM_MONITOR + #define sysmon_mem LV_GLOBAL_DEFAULT()->sysmon_mem +#endif + /********************** * TYPEDEFS **********************/ -typedef struct { - uint32_t refr_start; - uint32_t refr_interval_sum; - uint32_t refr_elaps_sum; - uint32_t refr_cnt; - uint32_t render_start; - uint32_t render_elaps_sum; - uint32_t render_cnt; - uint32_t flush_start; - uint32_t flush_elaps_sum; - uint32_t flush_cnt; -} perf_info_t; - /********************** * STATIC PROTOTYPES **********************/ -static void lv_sysmon_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); -static void lv_sysmon_event(const lv_obj_class_t * class_p, lv_event_t * e); -static void lv_sysmon_timer_cb(lv_timer_t * timer); -static void sysmon_async_cb(void * user_data); + +static void sysmon_backend_init_async_cb(void * user_data); #if LV_USE_PERF_MONITOR - static void perf_monitor_init(void); + static void perf_update_timer_cb(lv_timer_t * t); + static void perf_observer_cb(lv_subject_t * subject, lv_observer_t * observer); #endif -#if LV_USE_MEM_MONITOR && LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN - static void mem_monitor_init(void); +#if LV_USE_MEM_MONITOR + static void mem_update_timer_cb(lv_timer_t * t); + static void mem_observer_cb(lv_subject_t * subject, lv_observer_t * observer); #endif /********************** * STATIC VARIABLES **********************/ -const lv_obj_class_t lv_sysmon_class = { - .base_class = &lv_label_class, - .constructor_cb = lv_sysmon_constructor, - .width_def = LV_SIZE_CONTENT, - .height_def = LV_SIZE_CONTENT, - .event_cb = lv_sysmon_event, - .instance_size = sizeof(lv_sysmon_t), - .name = "sysmon", -}; - /********************** * MACROS **********************/ @@ -76,200 +63,184 @@ const lv_obj_class_t lv_sysmon_class = { * GLOBAL FUNCTIONS **********************/ -lv_obj_t * lv_sysmon_create(lv_obj_t * parent) +void _lv_sysmon_builtin_init(void) { - LV_LOG_INFO("begin"); - lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent); - lv_obj_class_init_obj(obj); - return obj; -} +#if LV_USE_PERF_MONITOR + static lv_sysmon_perf_info_t perf_info; + lv_subject_init_pointer(&sysmon_perf.subject, &perf_info); + sysmon_perf.timer = lv_timer_create(perf_update_timer_cb, SYSMON_REFR_PERIOD_DEF, &perf_info); +#endif -void lv_sysmon_set_refr_period(lv_obj_t * obj, uint32_t period) -{ - LV_ASSERT_OBJ(obj, MY_CLASS); - lv_sysmon_t * sysmon = (lv_sysmon_t *)obj; - lv_timer_set_period(sysmon->timer, period); -} +#if LV_USE_MEM_MONITOR + static lv_mem_monitor_t mem_info; + lv_subject_init_pointer(&sysmon_mem.subject, &mem_info); + sysmon_perf.timer = lv_timer_create(mem_update_timer_cb, SYSMON_REFR_PERIOD_DEF, &mem_info); +#endif -void _lv_sysmon_builtin_init(void) -{ - lv_async_call(sysmon_async_cb, NULL); + lv_async_call(sysmon_backend_init_async_cb, NULL); } void _lv_sysmon_builtin_deinit(void) { - lv_async_call_cancel(sysmon_async_cb, NULL); + lv_async_call_cancel(sysmon_backend_init_async_cb, NULL); #if LV_USE_PERF_MONITOR - if(perf_info) { - lv_free(perf_info); - } + // lv_subject_deinit(&sysmon_perf->subject); + lv_timer_delete(sysmon_perf.timer); #endif } -/********************** - * STATIC FUNCTIONS - **********************/ -static void lv_sysmon_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) -{ - LV_UNUSED(class_p); - lv_sysmon_t * sysmon = (lv_sysmon_t *)obj; - sysmon->timer = lv_timer_create(lv_sysmon_timer_cb, SYSMON_REFR_PERIOD_DEF, obj); - lv_obj_set_style_bg_opa(obj, LV_OPA_50, 0); - lv_obj_set_style_bg_color(obj, lv_color_black(), 0); - lv_obj_set_style_text_color(obj, lv_color_white(), 0); - lv_obj_set_style_pad_all(obj, 3, 0); - lv_label_set_text(obj, "?"); -} -static void lv_sysmon_timer_cb(lv_timer_t * timer) +lv_obj_t * lv_sysmon_create(lv_obj_t * parent) { - lv_obj_t * obj = lv_timer_get_user_data(timer); - lv_obj_send_event(obj, LV_EVENT_REFRESH, NULL); + LV_LOG_INFO("begin"); + lv_obj_t * label = lv_label_create(parent); + lv_obj_set_style_bg_opa(label, LV_OPA_50, 0); + lv_obj_set_style_bg_color(label, lv_color_black(), 0); + lv_obj_set_style_text_color(label, lv_color_white(), 0); + lv_obj_set_style_pad_all(label, 3, 0); + lv_label_set_text(label, "?"); + return label; } -static void lv_sysmon_event(const lv_obj_class_t * class_p, lv_event_t * e) -{ - LV_UNUSED(class_p); - lv_obj_event_base(MY_CLASS, e); -} + + +/********************** + * STATIC FUNCTIONS + **********************/ + #if LV_USE_PERF_MONITOR static void perf_monitor_disp_event_cb(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); - lv_obj_t * sysmon = lv_event_get_user_data(e); - perf_info_t * info = lv_obj_get_user_data(sysmon); + lv_sysmon_perf_info_t * info = (lv_sysmon_perf_info_t *)lv_subject_get_pointer(&sysmon_perf.subject); + switch(code) { case LV_EVENT_REFR_START: - info->refr_interval_sum += lv_tick_elaps(info->refr_start); - info->refr_start = lv_tick_get(); + info->measured.refr_interval_sum += lv_tick_elaps(info->measured.refr_start); + info->measured.refr_start = lv_tick_get(); break; case LV_EVENT_REFR_FINISH: - info->refr_elaps_sum += lv_tick_elaps(info->refr_start); - info->refr_cnt++; + info->measured.refr_elaps_sum += lv_tick_elaps(info->measured.refr_start); + info->measured.refr_cnt++; break; case LV_EVENT_RENDER_START: - info->render_start = lv_tick_get(); + info->measured.render_start = lv_tick_get(); break; case LV_EVENT_RENDER_READY: - info->render_elaps_sum += lv_tick_elaps(info->render_start); - info->render_cnt++; + info->measured.render_elaps_sum += lv_tick_elaps(info->measured.render_start); + info->measured.render_cnt++; break; case LV_EVENT_FLUSH_START: - info->flush_start = lv_tick_get(); + info->measured.flush_start = lv_tick_get(); break; case LV_EVENT_FLUSH_FINISH: - info->flush_elaps_sum += lv_tick_elaps(info->flush_start); - info->flush_cnt++; + info->measured.flush_elaps_sum += lv_tick_elaps(info->measured.flush_start); + info->measured.flush_cnt++; break; default: break; } } -static void perf_monitor_event_cb(lv_event_t * e) +static void perf_update_timer_cb(lv_timer_t * t) { - lv_obj_t * sysmon = lv_event_get_current_target_obj(e); - perf_info_t * info = lv_obj_get_user_data(sysmon); + lv_sysmon_perf_info_t * info = lv_timer_get_user_data(t); + + info->calculated.fps = info->measured.refr_interval_sum ? (1000 * info->measured.refr_cnt / + info->measured.refr_interval_sum) : 0; + info->calculated.cpu = 100 - lv_timer_get_idle(); + info->calculated.refr_avg_time = info->measured.refr_cnt ? (info->measured.refr_elaps_sum / info->measured.refr_cnt) : + 0; + info->calculated.render_avg_time = info->measured.render_cnt ? (info->measured.render_elaps_sum / + info->measured.render_cnt) : 0; + info->calculated.flush_avg_time = info->measured.flush_cnt ? (info->measured.flush_elaps_sum / info->measured.flush_cnt) + : 0; + info->calculated.render_real_avg_time = info->calculated.render_avg_time - info->calculated.flush_avg_time; + + lv_subject_set_pointer(&sysmon_perf.subject, info); + + uint32_t refr_start = info->measured.refr_start; + lv_memzero(info, sizeof(lv_sysmon_perf_info_t)); + info->measured.refr_start = refr_start; - uint32_t fps = info->refr_interval_sum ? (1000 * info->refr_cnt / info->refr_interval_sum) : 0; - uint32_t cpu = 100 - lv_timer_get_idle(); - uint32_t refr_avg_time = info->refr_cnt ? (info->refr_elaps_sum / info->refr_cnt) : 0; - uint32_t render_avg_time = info->render_cnt ? (info->render_elaps_sum / info->render_cnt) : 0; - uint32_t flush_avg_time = info->flush_cnt ? (info->flush_elaps_sum / info->flush_cnt) : 0; - uint32_t render_real_avg_time = render_avg_time - flush_avg_time; +} + +static void perf_observer_cb(lv_subject_t * subject, lv_observer_t * observer) +{ + lv_obj_t * label = lv_observer_get_target(observer); + const lv_sysmon_perf_info_t * perf = lv_subject_get_pointer(subject); #if LV_USE_PERF_MONITOR_LOG_MODE - /*Avoid warning*/ - LV_UNUSED(fps); - LV_UNUSED(cpu); - LV_UNUSED(refr_avg_time); - LV_UNUSED(render_real_avg_time); - LV_UNUSED(flush_avg_time); LV_LOG("sysmon: " "%" LV_PRIu32 " FPS (refr_cnt: %" LV_PRIu32 " | redraw_cnt: %" LV_PRIu32 " | flush_cnt: %" LV_PRIu32 "), " "refr %" LV_PRIu32 "ms (render %" LV_PRIu32 "ms | flush %" LV_PRIu32 "ms), " "CPU %" LV_PRIu32 "%%\n", - fps, info->refr_cnt, info->render_cnt, info->flush_cnt, - refr_avg_time, render_real_avg_time, flush_avg_time, - cpu); + perf->calculated.fps, perf->measured.refr_cnt, perf->measured.render_cnt, perf->measured.flush_cnt, + perf->calculated.refr_avg_time, perf->calculated.render_real_avg_time, perf->calculated.flush_avg_time, + perf->calculated.cpu); #else lv_label_set_text_fmt( - sysmon, + label, "%" LV_PRIu32" FPS, %" LV_PRIu32 "%% CPU\n" "%" LV_PRIu32" ms (%" LV_PRIu32" | %" LV_PRIu32")", - fps, cpu, - refr_avg_time, render_real_avg_time, flush_avg_time + perf->calculated.fps, perf->calculated.cpu, + perf->calculated.refr_avg_time, perf->calculated.render_real_avg_time, perf->calculated.flush_avg_time ); #endif /*LV_USE_PERF_MONITOR_LOG_MODE*/ - - /*Save the refresh start time of the next period*/ - uint32_t refr_start = info->refr_start; - - /*Reset the counters*/ - lv_memzero(info, sizeof(perf_info_t)); - - /*Restore the refresh start time*/ - info->refr_start = refr_start; } -static void perf_monitor_init(void) -{ - lv_display_t * disp = lv_display_get_default(); - - lv_obj_t * sysmon = lv_sysmon_create(lv_layer_sys()); - lv_obj_align(sysmon, LV_USE_PERF_MONITOR_POS, 0, 0); - lv_obj_set_style_text_align(sysmon, LV_TEXT_ALIGN_RIGHT, 0); - - perf_info_t * info = perf_info = lv_malloc(sizeof(perf_info_t)); - LV_ASSERT_MALLOC(info); +#endif - lv_obj_set_user_data(sysmon, info); - lv_obj_add_event(sysmon, perf_monitor_event_cb, LV_EVENT_REFRESH, NULL); - lv_display_add_event(disp, perf_monitor_disp_event_cb, LV_EVENT_ALL, sysmon); +#if LV_USE_MEM_MONITOR -#if LV_USE_PERF_MONITOR_LOG_MODE - /*Reduce rendering performance consumption*/ - lv_obj_add_flag(sysmon, LV_OBJ_FLAG_HIDDEN); -#endif +static void mem_update_timer_cb(lv_timer_t * t) +{ + lv_mem_monitor_t * mem_mon = lv_timer_get_user_data(t); + lv_mem_monitor(mem_mon); + lv_subject_set_pointer(&sysmon_mem.subject, mem_mon); } -#endif -#if LV_USE_MEM_MONITOR && LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN -static void mem_monitor_event_cb(lv_event_t * e) +static void mem_observer_cb(lv_subject_t * subject, lv_observer_t * observer) { - lv_obj_t * sysmon = lv_event_get_current_target_obj(e); - lv_mem_monitor_t mon; - lv_mem_monitor(&mon); - uint32_t used_size = mon.total_size - mon.free_size;; + lv_obj_t * label = lv_observer_get_target(observer); + const lv_mem_monitor_t * mon = lv_subject_get_pointer(subject); + + uint32_t used_size = mon->total_size - mon->free_size;; uint32_t used_kb = used_size / 1024; uint32_t used_kb_tenth = (used_size - (used_kb * 1024)) / 102; - lv_label_set_text_fmt(sysmon, + lv_label_set_text_fmt(label, "%"LV_PRIu32 ".%"LV_PRIu32 " kB, %d%%\n" "%d%% frag.", - used_kb, used_kb_tenth, mon.used_pct, - mon.frag_pct); + used_kb, used_kb_tenth, mon->used_pct, + mon->frag_pct); } -static void mem_monitor_init(void) -{ - lv_obj_t * sysmon = lv_sysmon_create(lv_layer_sys()); - lv_obj_add_event(sysmon, mem_monitor_event_cb, LV_EVENT_REFRESH, NULL); - lv_obj_align(sysmon, LV_USE_MEM_MONITOR_POS, 0, 0); -} #endif -static void sysmon_async_cb(void * user_data) +static void sysmon_backend_init_async_cb(void * user_data) { LV_UNUSED(user_data); + #if LV_USE_PERF_MONITOR - perf_monitor_init(); + lv_display_add_event(lv_display_get_default(), perf_monitor_disp_event_cb, LV_EVENT_ALL, NULL); + +#if !LV_USE_PERF_MONITOR_LOG_MODE + lv_obj_t * obj1 = lv_sysmon_create(lv_layer_sys()); + lv_obj_align(obj1, LV_USE_PERF_MONITOR_POS, 0, 0); + lv_subject_add_observer_obj(&sysmon_perf.subject, perf_observer_cb, obj1, NULL); #endif -#if LV_USE_MEM_MONITOR && LV_USE_STDLIB_MALLOC == LV_STDLIB_BUILTIN - mem_monitor_init(); + +#endif + +#if LV_USE_MEM_MONITOR + lv_obj_t * obj2 = lv_sysmon_create(lv_layer_sys()); + lv_obj_align(obj2, LV_USE_MEM_MONITOR_POS, 0, 0); + lv_subject_add_observer_obj(&sysmon_mem.subject, mem_observer_cb, obj2, NULL); #endif } + #endif /*LV_USE_SYSMON*/ diff --git a/project/gui/lvgl/src/others/sysmon/lv_sysmon.h b/project/gui/lvgl/src/others/sysmon/lv_sysmon.h index 8ba0df79c..0420f8e64 100644 --- a/project/gui/lvgl/src/others/sysmon/lv_sysmon.h +++ b/project/gui/lvgl/src/others/sysmon/lv_sysmon.h @@ -14,7 +14,8 @@ extern "C" { * INCLUDES *********************/ -#include "../../../lvgl.h" +#include "../../misc/lv_timer.h" +#include "../../others/observer/lv_observer.h" #if LV_USE_SYSMON @@ -29,12 +30,38 @@ extern "C" { /********************** * TYPEDEFS **********************/ + typedef struct { - lv_label_t label; + lv_subject_t subject; lv_timer_t * timer; -} lv_sysmon_t; +} lv_sysmon_backend_data_t; -extern const lv_obj_class_t lv_sysmon_class; +#if LV_USE_PERF_MONITOR +typedef struct { + struct { + uint32_t refr_start; + uint32_t refr_interval_sum; + uint32_t refr_elaps_sum; + uint32_t refr_cnt; + uint32_t render_start; + uint32_t render_elaps_sum; + uint32_t render_cnt; + uint32_t flush_start; + uint32_t flush_elaps_sum; + uint32_t flush_cnt; + } measured; + + struct { + uint32_t fps; + uint32_t cpu; + uint32_t refr_avg_time; + uint32_t render_avg_time; + uint32_t flush_avg_time; + uint32_t render_real_avg_time; + } calculated; + +} lv_sysmon_perf_info_t; +#endif /********************** * GLOBAL PROTOTYPES diff --git a/project/gui/lvgl/src/stdlib/builtin/lv_sprintf_builtin.c b/project/gui/lvgl/src/stdlib/builtin/lv_sprintf_builtin.c index e2059a162..97b99ee3f 100644 --- a/project/gui/lvgl/src/stdlib/builtin/lv_sprintf_builtin.c +++ b/project/gui/lvgl/src/stdlib/builtin/lv_sprintf_builtin.c @@ -38,7 +38,7 @@ #include "../lv_sprintf.h" #include "../../misc/lv_types.h" -#define PRINTF_DISABLE_SUPPORT_FLOAT (!LV_SPRINTF_USE_FLOAT) +#define PRINTF_DISABLE_SUPPORT_FLOAT (!LV_USE_FLOAT) // 'ntoa' conversion buffer size, this must be big enough to hold one converted // numeric number including padded zeros (dynamically created on stack) diff --git a/project/gui/lvgl/src/themes/default/lv_theme_default.c b/project/gui/lvgl/src/themes/default/lv_theme_default.c index 338c09200..816a52b2e 100644 --- a/project/gui/lvgl/src/themes/default/lv_theme_default.c +++ b/project/gui/lvgl/src/themes/default/lv_theme_default.c @@ -219,7 +219,8 @@ static void style_init(struct _my_theme_t * theme) LV_STYLE_BG_OPA, LV_STYLE_BG_COLOR, LV_STYLE_TRANSFORM_WIDTH, LV_STYLE_TRANSFORM_HEIGHT, LV_STYLE_TRANSLATE_Y, LV_STYLE_TRANSLATE_X, - LV_STYLE_TRANSFORM_SCALE, LV_STYLE_TRANSFORM_ROTATION, + LV_STYLE_TRANSFORM_ROTATION, + LV_STYLE_TRANSFORM_SCALE_X, LV_STYLE_TRANSFORM_SCALE_Y, LV_STYLE_COLOR_FILTER_OPA, LV_STYLE_COLOR_FILTER_DSC, 0 }; diff --git a/project/gui/lvgl/src/widgets/arc/lv_arc.c b/project/gui/lvgl/src/widgets/arc/lv_arc.c index 1132f8417..5169e50fe 100644 --- a/project/gui/lvgl/src/widgets/arc/lv_arc.c +++ b/project/gui/lvgl/src/widgets/arc/lv_arc.c @@ -37,14 +37,15 @@ static void lv_arc_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj); static void lv_arc_draw(lv_event_t * e); static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e); -static void inv_arc_area(lv_obj_t * arc, uint32_t start_angle, uint32_t end_angle, lv_part_t part); +static void inv_arc_area(lv_obj_t * arc, lv_value_precise_t start_angle, lv_value_precise_t end_angle, lv_part_t part); static void inv_knob_area(lv_obj_t * obj); static void get_center(const lv_obj_t * obj, lv_point_t * center, lv_coord_t * arc_r); -static lv_coord_t get_angle(const lv_obj_t * obj); +static lv_value_precise_t get_angle(const lv_obj_t * obj); static void get_knob_area(lv_obj_t * arc, const lv_point_t * center, lv_coord_t r, lv_area_t * knob_area); static void value_update(lv_obj_t * arc); static lv_coord_t knob_get_extra_size(lv_obj_t * obj); -static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, const uint32_t tolerance_deg); +static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const lv_value_precise_t angle, + const lv_value_precise_t tolerance_deg); /********************** * STATIC VARIABLES @@ -86,15 +87,15 @@ lv_obj_t * lv_arc_create(lv_obj_t * parent) * Setter functions *====================*/ -void lv_arc_set_start_angle(lv_obj_t * obj, uint32_t start) +void lv_arc_set_start_angle(lv_obj_t * obj, lv_value_precise_t start) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_arc_t * arc = (lv_arc_t *)obj; if(start > 360) start -= 360; - int16_t old_delta = arc->indic_angle_end - arc->indic_angle_start; - int16_t new_delta = arc->indic_angle_end - start; + lv_value_precise_t old_delta = arc->indic_angle_end - arc->indic_angle_start; + lv_value_precise_t new_delta = arc->indic_angle_end - start; if(old_delta < 0) old_delta = 360 + old_delta; if(new_delta < 0) new_delta = 360 + new_delta; @@ -110,14 +111,14 @@ void lv_arc_set_start_angle(lv_obj_t * obj, uint32_t start) inv_knob_area(obj); } -void lv_arc_set_end_angle(lv_obj_t * obj, uint32_t end) +void lv_arc_set_end_angle(lv_obj_t * obj, lv_value_precise_t end) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_arc_t * arc = (lv_arc_t *)obj; if(end > 360) end -= 360; - int32_t old_delta = arc->indic_angle_end - arc->indic_angle_start; - int32_t new_delta = end - arc->indic_angle_start; + lv_value_precise_t old_delta = arc->indic_angle_end - arc->indic_angle_start; + lv_value_precise_t new_delta = end - arc->indic_angle_start; if(old_delta < 0) old_delta = 360 + old_delta; if(new_delta < 0) new_delta = 360 + new_delta; @@ -133,21 +134,21 @@ void lv_arc_set_end_angle(lv_obj_t * obj, uint32_t end) inv_knob_area(obj); } -void lv_arc_set_angles(lv_obj_t * obj, uint32_t start, uint32_t end) +void lv_arc_set_angles(lv_obj_t * obj, lv_value_precise_t start, lv_value_precise_t end) { lv_arc_set_end_angle(obj, end); lv_arc_set_start_angle(obj, start); } -void lv_arc_set_bg_start_angle(lv_obj_t * obj, uint32_t start) +void lv_arc_set_bg_start_angle(lv_obj_t * obj, lv_value_precise_t start) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_arc_t * arc = (lv_arc_t *)obj; if(start > 360) start -= 360; - int32_t old_delta = arc->bg_angle_end - arc->bg_angle_start; - int32_t new_delta = arc->bg_angle_end - start; + lv_value_precise_t old_delta = arc->bg_angle_end - arc->bg_angle_start; + lv_value_precise_t new_delta = arc->bg_angle_end - start; if(old_delta < 0) old_delta = 360 + old_delta; if(new_delta < 0) new_delta = 360 + new_delta; @@ -161,15 +162,15 @@ void lv_arc_set_bg_start_angle(lv_obj_t * obj, uint32_t start) value_update(obj); } -void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint32_t end) +void lv_arc_set_bg_end_angle(lv_obj_t * obj, lv_value_precise_t end) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_arc_t * arc = (lv_arc_t *)obj; if(end > 360) end -= 360; - int32_t old_delta = arc->bg_angle_end - arc->bg_angle_start; - int32_t new_delta = end - arc->bg_angle_start; + lv_value_precise_t old_delta = arc->bg_angle_end - arc->bg_angle_start; + lv_value_precise_t new_delta = end - arc->bg_angle_start; if(old_delta < 0) old_delta = 360 + old_delta; if(new_delta < 0) new_delta = 360 + new_delta; @@ -183,7 +184,7 @@ void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint32_t end) value_update(obj); } -void lv_arc_set_bg_angles(lv_obj_t * obj, uint32_t start, uint32_t end) +void lv_arc_set_bg_angles(lv_obj_t * obj, lv_value_precise_t start, lv_value_precise_t end) { lv_arc_set_bg_end_angle(obj, end); lv_arc_set_bg_start_angle(obj, start); @@ -209,7 +210,7 @@ void lv_arc_set_mode(lv_obj_t * obj, lv_arc_mode_t type) arc->type = type; arc->value = -1; /** Force set_value handling*/ - int16_t bg_midpoint, bg_end = arc->bg_angle_end; + lv_value_precise_t bg_midpoint, bg_end = arc->bg_angle_end; if(arc->bg_angle_end < arc->bg_angle_start) bg_end = arc->bg_angle_end + 360; switch(arc->type) { @@ -285,25 +286,25 @@ void lv_arc_set_knob_offset(lv_obj_t * obj, int32_t offset) * Getter functions *====================*/ -uint32_t lv_arc_get_angle_start(lv_obj_t * obj) +lv_value_precise_t lv_arc_get_angle_start(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); return ((lv_arc_t *) obj)->indic_angle_start; } -uint32_t lv_arc_get_angle_end(lv_obj_t * obj) +lv_value_precise_t lv_arc_get_angle_end(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); return ((lv_arc_t *) obj)->indic_angle_end; } -uint32_t lv_arc_get_bg_angle_start(lv_obj_t * obj) +lv_value_precise_t lv_arc_get_bg_angle_start(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); return ((lv_arc_t *) obj)->bg_angle_start; } -uint32_t lv_arc_get_bg_angle_end(lv_obj_t * obj) +lv_value_precise_t lv_arc_get_bg_angle_end(lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); return ((lv_arc_t *) obj)->bg_angle_end; @@ -365,7 +366,7 @@ void lv_arc_align_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_align, lv arc_r -= indic_width_half; arc_r += r_offset; - uint32_t angle = get_angle(obj); + int32_t angle = (int32_t)get_angle(obj); lv_coord_t knob_x = (arc_r * lv_trigo_sin(angle + 90)) >> LV_TRIGO_SHIFT; lv_coord_t knob_y = (arc_r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT; lv_obj_align_to(obj_to_align, obj, LV_ALIGN_CENTER, knob_x, knob_y); @@ -390,7 +391,7 @@ void lv_arc_rotate_obj_to_angle(const lv_obj_t * obj, lv_obj_t * obj_to_rotate, lv_obj_update_layout(obj); - uint32_t angle = get_angle(obj); + int32_t angle = (int32_t)get_angle(obj); lv_coord_t pivot_x = obj_to_rotate->coords.x1 - center.x; lv_coord_t pivot_y = obj_to_rotate->coords.y1 - center.y; lv_obj_set_style_transform_pivot_x(obj_to_rotate, -pivot_x, 0); @@ -495,8 +496,8 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e) if(p.x == 0 && p.y == 0) return; /*Calculate the angle of the pressed point*/ - int16_t angle; - int16_t bg_end = arc->bg_angle_end; + lv_value_precise_t angle; + lv_value_precise_t bg_end = arc->bg_angle_end; if(arc->bg_angle_end < arc->bg_angle_start) { bg_end = arc->bg_angle_end + 360; } @@ -509,17 +510,17 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e) if(angle < 0) angle += 360; const uint32_t circumference = (uint32_t)((2U * r * 314U) / 100U); /* Equivalent to: 2r * 3.14, avoiding floats */ - const uint32_t tolerance_deg = (360U * lv_dpx(50U)) / circumference; + const lv_value_precise_t tolerance_deg = (360 * lv_dpx(50U)) / circumference; const uint32_t min_close_prev = (uint32_t) arc->min_close; - const bool is_angle_within_bg_bounds = lv_arc_angle_within_bg_bounds(obj, (uint32_t) angle, tolerance_deg); + const bool is_angle_within_bg_bounds = lv_arc_angle_within_bg_bounds(obj, angle, tolerance_deg); if(!is_angle_within_bg_bounds) { return; } - int16_t deg_range = bg_end - arc->bg_angle_start; - int16_t last_angle_rel = arc->last_angle - arc->bg_angle_start; - int16_t delta_angle = angle - last_angle_rel; + lv_value_precise_t deg_range = bg_end - arc->bg_angle_start; + lv_value_precise_t last_angle_rel = arc->last_angle - arc->bg_angle_start; + lv_value_precise_t delta_angle = angle - last_angle_rel; /*Do not allow big jumps (jumps bigger than 280°). *It's mainly to avoid jumping to the opposite end if the "dead" range between min. and max. is crossed. @@ -552,7 +553,7 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e) uint32_t delta_tick = lv_tick_elaps(arc->last_tick); /* delta_angle_max can never be signed. delta_tick is always signed, same for ch_rate */ - const uint16_t delta_angle_max = (arc->chg_rate * delta_tick) / 1000; + const lv_value_precise_t delta_angle_max = (arc->chg_rate * delta_tick) / 1000; if(delta_angle > delta_angle_max) { delta_angle = delta_angle_max; @@ -565,15 +566,16 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e) angle = last_angle_rel + delta_angle; /*Apply the limited angle change*/ /*Rounding for symmetry*/ - int32_t round = ((bg_end - arc->bg_angle_start) * 8) / (arc->max_value - arc->min_value); - round = (round + 4) >> 4; + lv_value_precise_t round = ((bg_end - arc->bg_angle_start) * 8) / (arc->max_value - arc->min_value); + round = (round + 4) / 16; angle += round; angle += arc->bg_angle_start; /*Make the angle absolute again*/ /*Set the new value*/ - int16_t old_value = arc->value; - int16_t new_value = lv_map(angle, arc->bg_angle_start, bg_end, arc->min_value, arc->max_value); + int32_t old_value = arc->value; + int32_t new_value = lv_map((int32_t)angle, (int32_t)arc->bg_angle_start, (int32_t)bg_end, arc->min_value, + arc->max_value); if(arc->type == LV_ARC_MODE_REVERSE) { new_value = arc->max_value - new_value + arc->min_value; } @@ -720,7 +722,7 @@ static void lv_arc_draw(lv_event_t * e) lv_draw_rect(layer, &knob_rect_dsc, &knob_area); } -static void inv_arc_area(lv_obj_t * obj, uint32_t start_angle, uint32_t end_angle, lv_part_t part) +static void inv_arc_area(lv_obj_t * obj, lv_value_precise_t start_angle, lv_value_precise_t end_angle, lv_part_t part) { LV_ASSERT_OBJ(obj, MY_CLASS); @@ -787,10 +789,10 @@ static void get_center(const lv_obj_t * obj, lv_point_t * center, lv_coord_t * a if(arc_r) *arc_r = r; } -static lv_coord_t get_angle(const lv_obj_t * obj) +static lv_value_precise_t get_angle(const lv_obj_t * obj) { lv_arc_t * arc = (lv_arc_t *)obj; - uint32_t angle = arc->rotation; + lv_value_precise_t angle = arc->rotation; if(arc->type == LV_ARC_MODE_NORMAL) { angle += arc->indic_angle_end; } @@ -798,13 +800,13 @@ static lv_coord_t get_angle(const lv_obj_t * obj) angle += arc->indic_angle_start; } else if(arc->type == LV_ARC_MODE_SYMMETRICAL) { - int16_t bg_end = arc->bg_angle_end; + lv_value_precise_t bg_end = arc->bg_angle_end; if(arc->bg_angle_end < arc->bg_angle_start) bg_end = arc->bg_angle_end + 360; - int16_t indic_end = arc->indic_angle_end; + lv_value_precise_t indic_end = arc->indic_angle_end; if(arc->indic_angle_end < arc->indic_angle_start) indic_end = arc->indic_angle_end + 360; - int32_t angle_midpoint = (int32_t)(arc->bg_angle_start + bg_end) / 2; - if((int32_t)arc->indic_angle_start < angle_midpoint) angle += arc->indic_angle_start; + lv_value_precise_t angle_midpoint = (int32_t)(arc->bg_angle_start + bg_end) / 2; + if(arc->indic_angle_start < angle_midpoint) angle += arc->indic_angle_start; else if(indic_end > angle_midpoint) angle += arc->indic_angle_end; else angle += angle_midpoint; } @@ -819,7 +821,7 @@ static void get_knob_area(lv_obj_t * obj, const lv_point_t * center, lv_coord_t lv_coord_t indic_width_half = indic_width / 2; r -= indic_width_half; - lv_coord_t angle = get_angle(obj); + int32_t angle = (int32_t)get_angle(obj); lv_coord_t knob_offset = lv_arc_get_knob_offset(obj); lv_coord_t knob_x = (r * lv_trigo_sin(knob_offset + angle + 90)) >> LV_TRIGO_SHIFT; lv_coord_t knob_y = (r * lv_trigo_sin(knob_offset + angle)) >> LV_TRIGO_SHIFT; @@ -847,32 +849,33 @@ static void value_update(lv_obj_t * obj) /*If the value is still not set to any value do not update*/ if(arc->value == VALUE_UNSET) return; - int16_t bg_midpoint, range_midpoint, bg_end = arc->bg_angle_end; + lv_value_precise_t bg_midpoint, bg_end = arc->bg_angle_end; + int32_t range_midpoint; if(arc->bg_angle_end < arc->bg_angle_start) bg_end = arc->bg_angle_end + 360; - int16_t angle; + int32_t angle; switch(arc->type) { case LV_ARC_MODE_SYMMETRICAL: bg_midpoint = (arc->bg_angle_start + bg_end) / 2; range_midpoint = (int32_t)(arc->min_value + arc->max_value) / 2; if(arc->value < range_midpoint) { - angle = lv_map(arc->value, arc->min_value, range_midpoint, arc->bg_angle_start, bg_midpoint); + angle = lv_map(arc->value, arc->min_value, range_midpoint, (int32_t)arc->bg_angle_start, (int32_t)bg_midpoint); lv_arc_set_start_angle(obj, angle); lv_arc_set_end_angle(obj, bg_midpoint); } else { - angle = lv_map(arc->value, range_midpoint, arc->max_value, bg_midpoint, bg_end); + angle = lv_map(arc->value, range_midpoint, arc->max_value, (int32_t)bg_midpoint, (int32_t)bg_end); lv_arc_set_start_angle(obj, bg_midpoint); lv_arc_set_end_angle(obj, angle); } break; case LV_ARC_MODE_REVERSE: - angle = lv_map(arc->value, arc->min_value, arc->max_value, bg_end, arc->bg_angle_start); + angle = lv_map(arc->value, arc->min_value, arc->max_value, (int32_t)bg_end, (int32_t)arc->bg_angle_start); lv_arc_set_angles(obj, angle, arc->bg_angle_end); break; case LV_ARC_MODE_NORMAL: - angle = lv_map(arc->value, arc->min_value, arc->max_value, arc->bg_angle_start, bg_end); + angle = lv_map(arc->value, arc->min_value, arc->max_value, (int32_t)arc->bg_angle_start, (int32_t)bg_end); lv_arc_set_angles(obj, arc->bg_angle_start, angle); break; @@ -920,13 +923,14 @@ static lv_coord_t knob_get_extra_size(lv_obj_t * obj) * * @return true if angle is within arc background bounds, false otherwise */ -static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, const uint32_t tolerance_deg) +static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const lv_value_precise_t angle, + const lv_value_precise_t tolerance_deg) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_arc_t * arc = (lv_arc_t *)obj; - uint32_t smaller_angle = 0; - uint32_t bigger_angle = 0; + lv_value_precise_t smaller_angle = 0; + lv_value_precise_t bigger_angle = 0; /* Determine which background angle is smaller and bigger */ if(arc->bg_angle_start < arc->bg_angle_end) { @@ -934,14 +938,14 @@ static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, smaller_angle = arc->bg_angle_start; } else { - bigger_angle = 360U - arc->bg_angle_end; - smaller_angle = arc->bg_angle_start; + bigger_angle = (360 - arc->bg_angle_start) + arc->bg_angle_end; + smaller_angle = 0; } /* Angle is between both background angles */ if((smaller_angle <= angle) && (angle <= bigger_angle)) { - if(((bigger_angle - smaller_angle) / 2U) >= angle) { + if(((bigger_angle - smaller_angle) / 2) >= angle) { arc->min_close = 1; } else { @@ -954,8 +958,8 @@ static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, } /* Distance between background start and end angles is less than tolerance, * consider the click inside the arc */ - else if(((smaller_angle - tolerance_deg) <= 0U) && - (360U - (bigger_angle + (smaller_angle - tolerance_deg)))) { + else if(((smaller_angle - tolerance_deg) <= 0) && + (360 - (bigger_angle + (smaller_angle - tolerance_deg)))) { arc->min_close = 1; arc->in_out = CLICK_INSIDE_BG_ANGLES; @@ -974,7 +978,7 @@ static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, * Start angle is bigger or equal to tolerance */ if((smaller_angle >= tolerance_deg) /* (360° - T) --- A --- 360° */ - && ((angle >= (360U - tolerance_deg)) && (angle <= 360U))) { + && ((angle >= (360 - tolerance_deg)) && (angle <= 360))) { arc->min_close = 1; arc->in_out = CLICK_OUTSIDE_BG_ANGLES; @@ -983,14 +987,14 @@ static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, /* Tolerance is bigger than bg start angle */ else if((smaller_angle < tolerance_deg) /* (360° - (T - S)) --- A --- 360° */ - && (((360U - (tolerance_deg - smaller_angle)) <= angle)) && (angle <= 360U)) { + && (((360 - (tolerance_deg - smaller_angle)) <= angle)) && (angle <= 360)) { arc->min_close = 1; arc->in_out = CLICK_OUTSIDE_BG_ANGLES; return true; } /* 360° is bigger than background end angle + tolerance */ - else if((360U >= (bigger_angle + tolerance_deg)) + else if((360 >= (bigger_angle + tolerance_deg)) /* E --- A --- (E + T) */ && ((bigger_angle <= (angle + smaller_angle)) && ((angle + smaller_angle) <= (bigger_angle + tolerance_deg)))) { @@ -1001,8 +1005,8 @@ static bool lv_arc_angle_within_bg_bounds(lv_obj_t * obj, const uint32_t angle, } /* Background end angle + tolerance is bigger than 360° and bg_start_angle + tolerance is not near 0° + ((bg_end_angle + tolerance) - 360°) * Here we can assume background is not near 0° because of the first two initial checks */ - else if((360U < (bigger_angle + tolerance_deg)) - && (angle <= 0U + ((bigger_angle + tolerance_deg) - 360U)) && (angle > bigger_angle)) { + else if((360 < (bigger_angle + tolerance_deg)) + && (angle <= 0 + ((bigger_angle + tolerance_deg) - 360)) && (angle > bigger_angle)) { arc->min_close = 0; arc->in_out = CLICK_OUTSIDE_BG_ANGLES; diff --git a/project/gui/lvgl/src/widgets/arc/lv_arc.h b/project/gui/lvgl/src/widgets/arc/lv_arc.h index 1d71319f4..c63bb0e10 100644 --- a/project/gui/lvgl/src/widgets/arc/lv_arc.h +++ b/project/gui/lvgl/src/widgets/arc/lv_arc.h @@ -42,20 +42,20 @@ typedef uint8_t lv_arc_mode_t; typedef struct { lv_obj_t obj; uint32_t rotation; - uint32_t indic_angle_start; - uint32_t indic_angle_end; - uint32_t bg_angle_start; - uint32_t bg_angle_end; - int16_t value; /*Current value of the arc*/ - int16_t min_value; /*Minimum value of the arc*/ - int16_t max_value; /*Maximum value of the arc*/ + lv_value_precise_t indic_angle_start; + lv_value_precise_t indic_angle_end; + lv_value_precise_t bg_angle_start; + lv_value_precise_t bg_angle_end; + int32_t value; /*Current value of the arc*/ + int32_t min_value; /*Minimum value of the arc*/ + int32_t max_value; /*Maximum value of the arc*/ uint32_t dragging : 1; uint32_t type : 2; uint32_t min_close : 1; /*1: the last pressed angle was closer to minimum end*/ uint32_t in_out : 1; /* 1: The click was within the background arc angles. 0: Click outside */ uint32_t chg_rate; /*Drag angle rate of change of the arc (degrees/sec)*/ uint32_t last_tick; /*Last dragging event timestamp of the arc*/ - int16_t last_angle; /*Last dragging angle of the arc*/ + lv_value_precise_t last_angle; /*Last dragging angle of the arc*/ int16_t knob_offset; /*knob offset from the main arc*/ } lv_arc_t; @@ -85,14 +85,14 @@ lv_obj_t * lv_arc_create(lv_obj_t * parent); * @param obj pointer to an arc object * @param start the start angle */ -void lv_arc_set_start_angle(lv_obj_t * obj, uint32_t start); +void lv_arc_set_start_angle(lv_obj_t * obj, lv_value_precise_t start); /** * Set the end angle of an arc. 0 deg: right, 90 bottom, etc. * @param obj pointer to an arc object * @param end the end angle */ -void lv_arc_set_end_angle(lv_obj_t * obj, uint32_t end); +void lv_arc_set_end_angle(lv_obj_t * obj, lv_value_precise_t end); /** * Set the start and end angles @@ -100,21 +100,21 @@ void lv_arc_set_end_angle(lv_obj_t * obj, uint32_t end); * @param start the start angle * @param end the end angle */ -void lv_arc_set_angles(lv_obj_t * obj, uint32_t start, uint32_t end); +void lv_arc_set_angles(lv_obj_t * obj, lv_value_precise_t start, lv_value_precise_t end); /** * Set the start angle of an arc background. 0 deg: right, 90 bottom, etc. * @param obj pointer to an arc object * @param start the start angle */ -void lv_arc_set_bg_start_angle(lv_obj_t * obj, uint32_t start); +void lv_arc_set_bg_start_angle(lv_obj_t * obj, lv_value_precise_t start); /** * Set the start angle of an arc background. 0 deg: right, 90 bottom etc. * @param obj pointer to an arc object * @param end the end angle */ -void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint32_t end); +void lv_arc_set_bg_end_angle(lv_obj_t * obj, lv_value_precise_t end); /** * Set the start and end angles of the arc background @@ -122,7 +122,7 @@ void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint32_t end); * @param start the start angle * @param end the end angle */ -void lv_arc_set_bg_angles(lv_obj_t * obj, uint32_t start, uint32_t end); +void lv_arc_set_bg_angles(lv_obj_t * obj, lv_value_precise_t start, lv_value_precise_t end); /** * Set the rotation for the whole arc @@ -176,28 +176,28 @@ void lv_arc_set_knob_offset(lv_obj_t * arc, int32_t offset); * @param obj pointer to an arc object * @return the start angle [0..360] */ -uint32_t lv_arc_get_angle_start(lv_obj_t * obj); +lv_value_precise_t lv_arc_get_angle_start(lv_obj_t * obj); /** * Get the end angle of an arc. * @param obj pointer to an arc object * @return the end angle [0..360] */ -uint32_t lv_arc_get_angle_end(lv_obj_t * obj); +lv_value_precise_t lv_arc_get_angle_end(lv_obj_t * obj); /** * Get the start angle of an arc background. * @param obj pointer to an arc object * @return the start angle [0..360] */ -uint32_t lv_arc_get_bg_angle_start(lv_obj_t * obj); +lv_value_precise_t lv_arc_get_bg_angle_start(lv_obj_t * obj); /** * Get the end angle of an arc background. * @param obj pointer to an arc object * @return the end angle [0..360] */ -uint32_t lv_arc_get_bg_angle_end(lv_obj_t * obj); +lv_value_precise_t lv_arc_get_bg_angle_end(lv_obj_t * obj); /** * Get the value of an arc diff --git a/project/gui/lvgl/src/widgets/bar/lv_bar.c b/project/gui/lvgl/src/widgets/bar/lv_bar.c index 0c987d941..7157113ab 100644 --- a/project/gui/lvgl/src/widgets/bar/lv_bar.c +++ b/project/gui/lvgl/src/widgets/bar/lv_bar.c @@ -99,6 +99,7 @@ void lv_bar_set_value(lv_obj_t * obj, int32_t value, lv_anim_enable_t anim) value = value < bar->start_value ? bar->start_value : value; /*Can't be smaller than the left value*/ if(bar->cur_value == value) return; + lv_bar_set_value_with_anim(obj, value, &bar->cur_value, &bar->cur_value_anim, anim); } @@ -116,6 +117,7 @@ void lv_bar_set_start_value(lv_obj_t * obj, int32_t value, lv_anim_enable_t anim value = value > bar->cur_value ? bar->cur_value : value; /*Can't be greater than the right value*/ if(bar->start_value == value) return; + lv_bar_set_value_with_anim(obj, value, &bar->start_value, &bar->start_value_anim, anim); } @@ -125,27 +127,27 @@ void lv_bar_set_range(lv_obj_t * obj, int32_t min, int32_t max) lv_bar_t * bar = (lv_bar_t *)obj; - if(max < min) { - LV_LOG_WARN("error range: min = %" LV_PRId32 ", max = %" LV_PRId32, min, max); - return; - } + bar->val_reversed = min > max; - if(bar->min_value == min && bar->max_value == max) return; + int32_t real_min = bar->val_reversed ? max : min; + int32_t real_max = bar->val_reversed ? min : max; + if(bar->min_value == real_min && bar->max_value == real_max) return; - bar->max_value = max; - bar->min_value = min; + bar->max_value = real_max; + bar->min_value = real_min; if(lv_bar_get_mode(obj) != LV_BAR_MODE_RANGE) - bar->start_value = min; + bar->start_value = real_min; - if(bar->cur_value > max) { - bar->cur_value = max; + if(bar->cur_value > real_max) { + bar->cur_value = real_max; lv_bar_set_value(obj, bar->cur_value, LV_ANIM_OFF); } - if(bar->cur_value < min) { - bar->cur_value = min; + if(bar->cur_value < real_min) { + bar->cur_value = real_min; lv_bar_set_value(obj, bar->cur_value, LV_ANIM_OFF); } + lv_obj_invalidate(obj); } @@ -188,7 +190,7 @@ int32_t lv_bar_get_min_value(const lv_obj_t * obj) { LV_ASSERT_OBJ(obj, MY_CLASS); lv_bar_t * bar = (lv_bar_t *)obj; - return bar->min_value; + return bar->val_reversed ? bar->max_value : bar->min_value; } int32_t lv_bar_get_max_value(const lv_obj_t * obj) @@ -196,7 +198,7 @@ int32_t lv_bar_get_max_value(const lv_obj_t * obj) LV_ASSERT_OBJ(obj, MY_CLASS); lv_bar_t * bar = (lv_bar_t *)obj; - return bar->max_value; + return bar->val_reversed ? bar->min_value : bar->max_value; } lv_bar_mode_t lv_bar_get_mode(lv_obj_t * obj) @@ -207,6 +209,15 @@ lv_bar_mode_t lv_bar_get_mode(lv_obj_t * obj) return bar->mode; } +bool lv_bar_is_symmetrical(lv_obj_t * obj) +{ + LV_ASSERT_OBJ(obj, MY_CLASS); + lv_bar_t * bar = (lv_bar_t *)obj; + + return bar->mode == LV_BAR_MODE_SYMMETRICAL && bar->min_value < 0 && bar->max_value > 0 && + bar->start_value == bar->min_value; +} + /********************** * STATIC FUNCTIONS **********************/ @@ -226,6 +237,7 @@ static void lv_bar_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) bar->indic_area.y1 = 0; bar->indic_area.y2 = 0; bar->mode = LV_BAR_MODE_NORMAL; + bar->val_reversed = false; lv_bar_init_anim(obj, &bar->cur_value_anim); lv_bar_init_anim(obj, &bar->start_value_anim); @@ -269,9 +281,7 @@ static void draw_indic(lv_event_t * e) } bool hor = barw >= barh; - bool sym = false; - if(bar->mode == LV_BAR_MODE_SYMMETRICAL && bar->min_value < 0 && bar->max_value > 0 && - bar->start_value == bar->min_value) sym = true; + bool sym = lv_bar_is_symmetrical(obj); /*Calculate the indicator area*/ lv_coord_t bg_left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN); @@ -345,8 +355,15 @@ static void draw_indic(lv_event_t * e) anim_cur_value_x = (int32_t)((int32_t)anim_length * (bar->cur_value - bar->min_value)) / range; } + /** + * The drawing drection of the bar can be reversed only when one of the two conditions(value inversion + * or horizontal direction base dir is LV_BASE_DIR_RTL) is met. + */ lv_base_dir_t base_dir = lv_obj_get_style_base_dir(obj, LV_PART_MAIN); - if(base_dir == LV_BASE_DIR_RTL) { + bool hor_need_reversed = hor && base_dir == LV_BASE_DIR_RTL; + bool reversed = bar->val_reversed ^ hor_need_reversed; + + if(reversed) { /*Swap axes*/ lv_coord_t * tmp; tmp = axis1; @@ -365,31 +382,43 @@ static void draw_indic(lv_event_t * e) *axis1 = *axis2 - anim_cur_value_x + 1; *axis2 -= anim_start_value_x; } + if(sym) { lv_coord_t zero, shift; shift = (-bar->min_value * anim_length) / range; + if(hor) { - zero = *axis1 + shift; - if(*axis2 > zero) - *axis1 = zero; + lv_coord_t * left = reversed ? axis2 : axis1; + lv_coord_t * right = reversed ? axis1 : axis2; + if(reversed) + zero = *axis1 - shift + 1; + else + zero = *axis1 + shift; + + if(*axis2 > zero) { + *right = *axis2; + *left = zero; + } else { - *axis1 = *axis2; - *axis2 = zero; + *left = *axis2; + *right = zero; } } else { - zero = *axis2 - shift + 1; - if(*axis1 > zero) - *axis2 = zero; - else { - *axis2 = *axis1; - *axis1 = zero; + lv_coord_t * top = reversed ? axis2 : axis1; + lv_coord_t * bottom = reversed ? axis1 : axis2; + if(reversed) + zero = *axis2 + shift; + else + zero = *axis2 - shift + 1; + + if(*axis1 > zero) { + *bottom = *axis1; + *top = zero; } - if(*axis2 < *axis1) { - /*swap*/ - zero = *axis1; - *axis1 = *axis2; - *axis2 = zero; + else { + *top = *axis1; + *bottom = zero; } } } diff --git a/project/gui/lvgl/src/widgets/bar/lv_bar.h b/project/gui/lvgl/src/widgets/bar/lv_bar.h index a7d404cf4..d40437303 100644 --- a/project/gui/lvgl/src/widgets/bar/lv_bar.h +++ b/project/gui/lvgl/src/widgets/bar/lv_bar.h @@ -55,6 +55,7 @@ typedef struct { int32_t max_value; /**< Maximum value of the bar*/ int32_t start_value; /**< Start value of the bar*/ lv_area_t indic_area; /**< Save the indicator area. Might be used by derived types*/ + bool val_reversed; /**< Whether value been reversed */ _lv_bar_anim_t cur_value_anim; _lv_bar_anim_t start_value_anim; lv_bar_mode_t mode : 2; /**< Type of bar*/ @@ -99,6 +100,7 @@ void lv_bar_set_start_value(lv_obj_t * obj, int32_t start_value, lv_anim_enable_ * @param obj pointer to the bar object * @param min minimum value * @param max maximum value + * @note If min is greater than max, the drawing direction becomes to the oppsite direction. */ void lv_bar_set_range(lv_obj_t * obj, int32_t min, int32_t max); @@ -148,6 +150,13 @@ int32_t lv_bar_get_max_value(const lv_obj_t * obj); */ lv_bar_mode_t lv_bar_get_mode(lv_obj_t * obj); +/** + * Give the bar is in symmetrical mode or not + * @param obj pointer to bar object + * @return true: in symmetrical mode false : not in +*/ +bool lv_bar_is_symmetrical(lv_obj_t * obj); + /********************** * MACROS **********************/ diff --git a/project/gui/lvgl/src/widgets/image/lv_image.c b/project/gui/lvgl/src/widgets/image/lv_image.c index d24b3203f..6affb1d0c 100644 --- a/project/gui/lvgl/src/widgets/image/lv_image.c +++ b/project/gui/lvgl/src/widgets/image/lv_image.c @@ -27,6 +27,52 @@ static void lv_image_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) static void lv_image_destructor(const lv_obj_class_t * class_p, lv_obj_t * obj); static void lv_image_event(const lv_obj_class_t * class_p, lv_event_t * e); static void draw_image(lv_event_t * e); +static void scale_update(lv_obj_t * obj, int32_t zoom_x, int32_t zoom_y); + +#if LV_USE_OBJ_PROPERTY +static const lv_property_ops_t properties[] = { + { + .id = LV_PROPERTY_IMAGE_SRC, + .setter = lv_image_set_src, + .getter = lv_image_get_src, + }, + { + .id = LV_PROPERTY_IMAGE_OFFSET_X, + .setter = lv_image_set_offset_x, + .getter = lv_image_get_offset_x, + }, + { + .id = LV_PROPERTY_IMAGE_OFFSET_Y, + .setter = lv_image_set_offset_y, + .getter = lv_image_get_offset_y, + }, + { + .id = LV_PROPERTY_IMAGE_ROTATION, + .setter = lv_image_set_rotation, + .getter = lv_image_get_rotation, + }, + { + .id = LV_PROPERTY_IMAGE_PIVOT, + .setter = _lv_image_set_pivot, + .getter = lv_image_get_pivot, + }, + { + .id = LV_PROPERTY_IMAGE_SCALE, + .setter = lv_image_set_scale, + .getter = lv_image_get_scale, + }, + { + .id = LV_PROPERTY_IMAGE_ANTIALIAS, + .setter = lv_image_set_antialias, + .getter = lv_image_get_antialias, + }, + { + .id = LV_PROPERTY_IMAGE_SIZE_MODE, + .setter = lv_image_set_size_mode, + .getter = lv_image_get_size_mode, + }, +}; +#endif /********************** * STATIC VARIABLES @@ -40,6 +86,12 @@ const lv_obj_class_t lv_image_class = { .instance_size = sizeof(lv_image_t), .base_class = &lv_obj_class, .name = "image", +#if LV_USE_OBJ_PROPERTY + .prop_index_start = LV_PROPERTY_IMAGE_START, + .prop_index_end = LV_PROPERTY_IMAGE_END, + .properties = properties, + .properties_count = sizeof(properties) / sizeof(properties[0]), +#endif }; /********************** @@ -147,7 +199,7 @@ void lv_image_set_src(lv_obj_t * obj, const void * src) lv_obj_refresh_self_size(obj); /*Provide enough room for the rotated corners*/ - if(img->rotation || img->zoom != LV_SCALE_NONE) lv_obj_refresh_ext_draw_size(obj); + if(img->rotation || img->zoom_x != LV_SCALE_NONE || img->zoom_y != LV_SCALE_NONE) lv_obj_refresh_ext_draw_size(obj); lv_obj_invalidate(obj); } @@ -192,7 +244,7 @@ void lv_image_set_rotation(lv_obj_t * obj, int32_t angle) lv_area_t a; lv_point_t pivot_px; lv_image_get_pivot(obj, &pivot_px); - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -208,7 +260,7 @@ void lv_image_set_rotation(lv_obj_t * obj, int32_t angle) lv_obj_refresh_ext_draw_size(obj); lv_display_enable_invalidation(disp, true); - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -234,7 +286,7 @@ void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) lv_area_t a; lv_point_t pivot_px; lv_image_get_pivot(obj, &pivot_px); - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -252,7 +304,7 @@ void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) lv_display_enable_invalidation(disp, true); lv_image_get_pivot(obj, &pivot_px); - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -263,44 +315,31 @@ void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) void lv_image_set_scale(lv_obj_t * obj, uint32_t zoom) { lv_image_t * img = (lv_image_t *)obj; - if(zoom == img->zoom) return; + if(zoom == img->zoom_x && zoom == img->zoom_y) return; if(zoom == 0) zoom = 1; - if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { - img->zoom = zoom; - lv_obj_invalidate_area(obj, &obj->coords); - return; - } + scale_update(obj, zoom, zoom); +} - lv_obj_update_layout(obj); /*Be sure the object's size is calculated*/ - lv_coord_t w = lv_obj_get_width(obj); - lv_coord_t h = lv_obj_get_height(obj); - lv_area_t a; - lv_point_t pivot_px; - lv_image_get_pivot(obj, &pivot_px); - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); - a.x1 += obj->coords.x1 - 1; - a.y1 += obj->coords.y1 - 1; - a.x2 += obj->coords.x1 + 1; - a.y2 += obj->coords.y1 + 1; - lv_obj_invalidate_area(obj, &a); +void lv_image_set_scale_x(lv_obj_t * obj, uint32_t zoom) +{ + lv_image_t * img = (lv_image_t *)obj; + if(zoom == img->zoom_x) return; - img->zoom = zoom; + if(zoom == 0) zoom = 1; - /* Disable invalidations because lv_obj_refresh_ext_draw_size would invalidate - * the whole ext draw area */ - lv_display_t * disp = lv_obj_get_disp(obj); - lv_display_enable_invalidation(disp, false); - lv_obj_refresh_ext_draw_size(obj); - lv_display_enable_invalidation(disp, true); + scale_update(obj, zoom, img->zoom_y); +} - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); - a.x1 += obj->coords.x1 - 1; - a.y1 += obj->coords.y1 - 1; - a.x2 += obj->coords.x1 + 1; - a.y2 += obj->coords.y1 + 1; - lv_obj_invalidate_area(obj, &a); +void lv_image_set_scale_y(lv_obj_t * obj, uint32_t zoom) +{ + lv_image_t * img = (lv_image_t *)obj; + if(zoom == img->zoom_y) return; + + if(zoom == 0) zoom = 1; + + scale_update(obj, img->zoom_y, zoom); } void lv_image_set_antialias(lv_obj_t * obj, bool antialias) @@ -378,7 +417,25 @@ lv_coord_t lv_image_get_scale(lv_obj_t * obj) lv_image_t * img = (lv_image_t *)obj; - return img->zoom; + return img->zoom_x; +} + +lv_coord_t lv_image_get_scale_x(lv_obj_t * obj) +{ + LV_ASSERT_OBJ(obj, MY_CLASS); + + lv_image_t * img = (lv_image_t *)obj; + + return img->zoom_x; +} + +lv_coord_t lv_image_get_scale_y(lv_obj_t * obj) +{ + LV_ASSERT_OBJ(obj, MY_CLASS); + + lv_image_t * img = (lv_image_t *)obj; + + return img->zoom_y; } bool lv_image_get_antialias(lv_obj_t * obj) @@ -414,7 +471,8 @@ static void lv_image_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj) img->w = lv_obj_get_width(obj); img->h = lv_obj_get_height(obj); img->rotation = 0; - img->zoom = LV_SCALE_NONE; + img->zoom_x = LV_SCALE_NONE; + img->zoom_y = LV_SCALE_NONE; img->antialias = LV_COLOR_DEPTH > 8 ? 1 : 0; img->offset.x = 0; img->offset.y = 0; @@ -449,7 +507,7 @@ static lv_point_t lv_image_get_transformed_size(lv_obj_t * obj) lv_point_t pivot_px; lv_image_get_pivot(obj, &pivot_px); _lv_image_buf_get_transformed_area(&area_transform, img->w, img->h, - img->rotation, img->zoom, &pivot_px); + img->rotation, img->zoom_x, img->zoom_y, &pivot_px); return (lv_point_t) { lv_area_get_width(&area_transform), lv_area_get_height(&area_transform) @@ -489,11 +547,11 @@ static void lv_image_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_coord_t * s = lv_event_get_param(e); /*If the image has angle provide enough room for the rotated corners*/ - if(img->rotation || img->zoom != LV_SCALE_NONE) { + if(img->rotation || img->zoom_x != LV_SCALE_NONE || img->zoom_y != LV_SCALE_NONE) { lv_area_t a; lv_coord_t w = lv_obj_get_width(obj); lv_coord_t h = lv_obj_get_height(obj); - _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); *s = LV_MAX(*s, -a.x1); *s = LV_MAX(*s, -a.y1); *s = LV_MAX(*s, a.x2 - w); @@ -506,12 +564,13 @@ static void lv_image_event(const lv_obj_class_t * class_p, lv_event_t * e) /*If the object is exactly image sized (not cropped, not mosaic) and transformed *perform hit test on its transformed area*/ if(img->w == lv_obj_get_width(obj) && img->h == lv_obj_get_height(obj) && - (img->zoom != LV_SCALE_NONE || img->rotation != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) { + (img->zoom_x != LV_SCALE_NONE || img->zoom_y != LV_SCALE_NONE || + img->rotation != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) { lv_coord_t w = lv_obj_get_width(obj); lv_coord_t h = lv_obj_get_height(obj); lv_area_t coords; - _lv_image_buf_get_transformed_area(&coords, w, h, img->rotation, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&coords, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); coords.x1 += obj->coords.x1; coords.y1 += obj->coords.y1; coords.x2 += obj->coords.x1; @@ -571,7 +630,7 @@ static void draw_image(lv_event_t * e) } const lv_area_t * clip_area = lv_event_get_param(e); - if(img->zoom == LV_SCALE_NONE) { + if(img->zoom_x == LV_SCALE_NONE && img->zoom_y == LV_SCALE_NONE) { if(_lv_area_is_in(clip_area, &obj->coords, 0) == false) { info->res = LV_COVER_RES_NOT_COVER; return; @@ -581,7 +640,8 @@ static void draw_image(lv_event_t * e) lv_area_t a; lv_point_t pivot_px; lv_image_get_pivot(obj, &pivot_px); - _lv_image_buf_get_transformed_area(&a, lv_obj_get_width(obj), lv_obj_get_height(obj), 0, img->zoom, &pivot_px); + _lv_image_buf_get_transformed_area(&a, lv_obj_get_width(obj), lv_obj_get_height(obj), 0, img->zoom_x, img->zoom_y, + &pivot_px); a.x1 += obj->coords.x1; a.y1 += obj->coords.y1; a.x2 += obj->coords.x1; @@ -618,7 +678,7 @@ static void draw_image(lv_event_t * e) } else { _lv_image_buf_get_transformed_area(&bg_coords, obj_w, obj_h, - img->rotation, img->zoom, &bg_pivot); + img->rotation, img->zoom_x, img->zoom_y, &bg_pivot); /*Modify the coordinates to draw the background for the rotated and scaled coordinates*/ bg_coords.x1 += obj->coords.x1; @@ -638,7 +698,7 @@ static void draw_image(lv_event_t * e) if(code == LV_EVENT_DRAW_MAIN) { if(img->h == 0 || img->w == 0) return; - if(img->zoom == 0) return; + if(img->zoom_x == 0 || img->zoom_y == 0) return; lv_layer_t * layer = lv_event_get_layer(e); @@ -668,7 +728,8 @@ static void draw_image(lv_event_t * e) lv_draw_image_dsc_init(&img_dsc); lv_obj_init_draw_image_dsc(obj, LV_PART_MAIN, &img_dsc); - img_dsc.zoom = img->zoom; + img_dsc.zoom_x = img->zoom_x; + img_dsc.zoom_y = img->zoom_y; img_dsc.rotation = img->rotation; img_dsc.pivot.x = pivot_px.x; img_dsc.pivot.y = pivot_px.y; @@ -722,4 +783,47 @@ static void draw_image(lv_event_t * e) } } +static void scale_update(lv_obj_t * obj, int32_t zoom_x, int32_t zoom_y) +{ + lv_image_t * img = (lv_image_t *)obj; + + if(img->obj_size_mode == LV_IMAGE_SIZE_MODE_REAL) { + img->zoom_x = zoom_x; + img->zoom_y = zoom_y; + lv_obj_invalidate_area(obj, &obj->coords); + return; + } + + lv_obj_update_layout(obj); /*Be sure the object's size is calculated*/ + lv_coord_t w = lv_obj_get_width(obj); + lv_coord_t h = lv_obj_get_height(obj); + lv_area_t a; + lv_point_t pivot_px; + lv_image_get_pivot(obj, &pivot_px); + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); + a.x1 += obj->coords.x1 - 1; + a.y1 += obj->coords.y1 - 1; + a.x2 += obj->coords.x1 + 1; + a.y2 += obj->coords.y1 + 1; + lv_obj_invalidate_area(obj, &a); + + img->zoom_x = zoom_x; + img->zoom_y = zoom_y; + + /* Disable invalidations because lv_obj_refresh_ext_draw_size would invalidate + * the whole ext draw area */ + lv_display_t * disp = lv_obj_get_disp(obj); + lv_display_enable_invalidation(disp, false); + lv_obj_refresh_ext_draw_size(obj); + lv_display_enable_invalidation(disp, true); + + _lv_image_buf_get_transformed_area(&a, w, h, img->rotation, img->zoom_x, img->zoom_y, &pivot_px); + a.x1 += obj->coords.x1 - 1; + a.y1 += obj->coords.y1 - 1; + a.x2 += obj->coords.x1 + 1; + a.y2 += obj->coords.y1 + 1; + lv_obj_invalidate_area(obj, &a); + +} + #endif diff --git a/project/gui/lvgl/src/widgets/image/lv_image.h b/project/gui/lvgl/src/widgets/image/lv_image.h index 26c8fdedd..957d43371 100644 --- a/project/gui/lvgl/src/widgets/image/lv_image.h +++ b/project/gui/lvgl/src/widgets/image/lv_image.h @@ -44,7 +44,8 @@ typedef struct { lv_coord_t w; /*Width of the image (Handled by the library)*/ lv_coord_t h; /*Height of the image (Handled by the library)*/ uint32_t rotation; /*rotation angle of the image*/ - uint32_t zoom; /*256 means no zoom, 512 double size, 128 half size*/ + uint32_t zoom_x; /*256 means no zoom, 512 double size, 128 half size*/ + uint32_t zoom_y; /*256 means no zoom, 512 double size, 128 half size*/ lv_point_t pivot; /*rotation center of the image*/ uint8_t src_type : 2; /*See: lv_image_src_t*/ uint8_t cf : 5; /*Color format from `lv_color_format_t`*/ @@ -75,6 +76,20 @@ typedef _lv_image_size_mode_t lv_image_size_mode_t; typedef uint8_t lv_image_size_mode_t; #endif /*DOXYGEN*/ +#if LV_USE_OBJ_PROPERTY +enum { + LV_PROPERTY_ID(IMAGE, SRC, LV_PROPERTY_TYPE_POINTER, 0), + LV_PROPERTY_ID(IMAGE, OFFSET_X, LV_PROPERTY_TYPE_INT, 1), + LV_PROPERTY_ID(IMAGE, OFFSET_Y, LV_PROPERTY_TYPE_INT, 2), + LV_PROPERTY_ID(IMAGE, ROTATION, LV_PROPERTY_TYPE_INT, 3), + LV_PROPERTY_ID(IMAGE, PIVOT, LV_PROPERTY_TYPE_POINTER, 4), + LV_PROPERTY_ID(IMAGE, SCALE, LV_PROPERTY_TYPE_INT, 5), + LV_PROPERTY_ID(IMAGE, ANTIALIAS, LV_PROPERTY_TYPE_INT, 6), + LV_PROPERTY_ID(IMAGE, SIZE_MODE, LV_PROPERTY_TYPE_INT, 7), + LV_PROPERTY_IMAGE_END, +}; +#endif + /********************** * GLOBAL PROTOTYPES **********************/ @@ -134,6 +149,14 @@ void lv_image_set_rotation(lv_obj_t * obj, int32_t angle); */ void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); +/** + * Set pivot similar to get_pivot + */ +static inline void _lv_image_set_pivot(lv_obj_t * obj, lv_point_t * pivot) +{ + lv_image_set_pivot(obj, pivot->x, pivot->y); +} + /** * Set the zoom factor of the image. @@ -148,6 +171,33 @@ void lv_image_set_pivot(lv_obj_t * obj, lv_coord_t x, lv_coord_t y); */ void lv_image_set_scale(lv_obj_t * obj, uint32_t zoom); +/** + * Set the horizontal zoom factor of the image. + * Note that indexed and alpha only images can't be transformed. + * @param img pointer to an image object + * @param zoom the zoom factor. + * @example 256 or LV_ZOOM_IMAGE_NONE for no zoom + * @example <256: scale down + * @example >256 scale up + * @example 128 half size + * @example 512 double size + */ +void lv_image_set_scale_x(lv_obj_t * obj, uint32_t zoom); + +/** + * Set the vertical zoom factor of the image. + * Note that indexed and alpha only images can't be transformed. + * @param img pointer to an image object + * @param zoom the zoom factor. + * @example 256 or LV_ZOOM_IMAGE_NONE for no zoom + * @example <256: scale down + * @example >256 scale up + * @example 128 half size + * @example 512 double size + */ +void lv_image_set_scale_y(lv_obj_t * obj, uint32_t zoom); + + /** * Enable/disable anti-aliasing for the transformations (rotate, zoom) or not. * The quality is better with anti-aliasing looks better but slower. @@ -210,6 +260,20 @@ void lv_image_get_pivot(lv_obj_t * obj, lv_point_t * pivot); */ lv_coord_t lv_image_get_scale(lv_obj_t * obj); +/** + * Get the horizontal zoom factor of the image. + * @param obj pointer to an image object + * @return zoom factor (256: no zoom) + */ +lv_coord_t lv_image_get_scale_x(lv_obj_t * obj); + +/** + * Get the vertical zoom factor of the image. + * @param obj pointer to an image object + * @return zoom factor (256: no zoom) + */ +lv_coord_t lv_image_get_scale_y(lv_obj_t * obj); + /** * Get whether the transformations (rotate, zoom) are anti-aliased or not * @param obj pointer to an image object diff --git a/project/gui/lvgl/src/widgets/roller/lv_roller.c b/project/gui/lvgl/src/widgets/roller/lv_roller.c index a0fd60082..0e67710ce 100644 --- a/project/gui/lvgl/src/widgets/roller/lv_roller.c +++ b/project/gui/lvgl/src/widgets/roller/lv_roller.c @@ -823,17 +823,22 @@ static void set_y_anim(void * obj, int32_t v) static void transform_vect_recursive(lv_obj_t * roller, lv_point_t * vect) { int16_t angle = 0; - int32_t zoom = 256; + int32_t zoom_x = 256; + int32_t zoom_y = 256; lv_obj_t * parent = roller; while(parent) { angle += lv_obj_get_style_transform_rotation(parent, 0); - int32_t zoom_act = lv_obj_get_style_transform_scale_safe(parent, 0); - zoom = (zoom * zoom_act) >> 8; + int32_t zoom_act_x = lv_obj_get_style_transform_scale_x_safe(parent, 0); + int32_t zoom_act_y = lv_obj_get_style_transform_scale_y_safe(parent, 0); + zoom_x = (zoom_y * zoom_act_x) >> 8; + zoom_y = (zoom_y * zoom_act_y) >> 8; parent = lv_obj_get_parent(parent); } lv_point_t pivot = { 0, 0 }; - lv_point_transform(vect, -angle, 256 * 256 / zoom, &pivot); + zoom_x = 256 * 256 / zoom_x; + zoom_y = 256 * 256 / zoom_y; + lv_point_transform(vect, -angle, zoom_x, zoom_y, &pivot, false); } #endif diff --git a/project/gui/lvgl/src/widgets/scale/lv_scale.c b/project/gui/lvgl/src/widgets/scale/lv_scale.c index 5e861853f..60cf64bb7 100644 --- a/project/gui/lvgl/src/widgets/scale/lv_scale.c +++ b/project/gui/lvgl/src/widgets/scale/lv_scale.c @@ -543,7 +543,7 @@ static void scale_draw_indicator(lv_obj_t * obj, lv_event_t * event) lv_point_t point; point.x = center_point.x + radius_text; point.y = center_point.y; - lv_point_transform(&point, angle_upscale, LV_SCALE_NONE, ¢er_point); + lv_point_transform(&point, angle_upscale, LV_SCALE_NONE, LV_SCALE_NONE, ¢er_point, false); scale_get_label_coords(obj, &label_dsc, &point, &label_coords); lv_draw_label(layer, &label_dsc, &label_coords); @@ -907,11 +907,11 @@ static void scale_get_tick_points(lv_obj_t * obj, const uint32_t tick_idx, bool tick_point_a->x = center_point.x + point_closer_to_arc; tick_point_a->y = center_point.y; - lv_point_transform(tick_point_a, angle_upscale, LV_SCALE_NONE, ¢er_point); + lv_point_transform(tick_point_a, angle_upscale, LV_SCALE_NONE, LV_SCALE_NONE, ¢er_point, false); tick_point_b->x = center_point.x + adjusted_radio_with_tick_len; tick_point_b->y = center_point.y; - lv_point_transform(tick_point_b, angle_upscale, LV_SCALE_NONE, ¢er_point); + lv_point_transform(tick_point_b, angle_upscale, LV_SCALE_NONE, LV_SCALE_NONE, ¢er_point, false); } else { /* Nothing to do */ } } diff --git a/project/gui/lvgl/src/widgets/scale/lv_scale.h b/project/gui/lvgl/src/widgets/scale/lv_scale.h index 9e54d2315..6c72753a5 100644 --- a/project/gui/lvgl/src/widgets/scale/lv_scale.h +++ b/project/gui/lvgl/src/widgets/scale/lv_scale.h @@ -179,7 +179,7 @@ void lv_scale_set_text_src(lv_obj_t * obj, const char * txt_src[]); /** * Draw the scale after all the children are drawn * @param obj pointer to a scale object - * @param en true: eanble post draw + * @param en true: enable post draw */ void lv_scale_set_post_draw(lv_obj_t * obj, bool en); diff --git a/project/gui/lvgl/src/widgets/slider/lv_slider.c b/project/gui/lvgl/src/widgets/slider/lv_slider.c index d2ac584d9..3ac007807 100644 --- a/project/gui/lvgl/src/widgets/slider/lv_slider.c +++ b/project/gui/lvgl/src/widgets/slider/lv_slider.c @@ -24,7 +24,8 @@ *********************/ #define MY_CLASS &lv_slider_class -#define LV_SLIDER_KNOB_COORD(is_rtl, area) (is_rtl ? area.x1 : area.x2) +#define LV_SLIDER_KNOB_COORD(is_reversed, area) (is_reversed ? area.x1 : area.x2) +#define LV_SLIDER_KNOB_COORD_VERTICAL(is_reversed, area) (is_reversed ? area.y2 : area.y1) /********************** * TYPEDEFS @@ -193,11 +194,9 @@ static void lv_slider_event(const lv_obj_class_t * class_p, lv_event_t * e) lv_coord_t knob_bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_KNOB); /*The smaller size is the knob diameter*/ - lv_coord_t zoom = lv_obj_get_style_transform_scale(obj, LV_PART_KNOB); lv_coord_t trans_w = lv_obj_get_style_transform_width(obj, LV_PART_KNOB); lv_coord_t trans_h = lv_obj_get_style_transform_height(obj, LV_PART_KNOB); lv_coord_t knob_size = LV_MIN(lv_obj_get_width(obj) + 2 * trans_w, lv_obj_get_height(obj) + 2 * trans_h) >> 1; - knob_size = (knob_size * zoom) >> 8; knob_size += LV_MAX(LV_MAX(knob_left, knob_right), LV_MAX(knob_bottom, knob_top)); knob_size += 2; /*For rounding error*/ knob_size += lv_obj_calculate_ext_draw_size(obj, LV_PART_KNOB); @@ -238,24 +237,24 @@ static void draw_knob(lv_event_t * e) const bool is_rtl = LV_BASE_DIR_RTL == lv_obj_get_style_base_dir(obj, LV_PART_MAIN); const bool is_horizontal = is_slider_horizontal(obj); + const bool is_reversed = slider->bar.val_reversed ^ (is_rtl && is_horizontal); lv_area_t knob_area; lv_coord_t knob_size; - bool is_symmetrical = false; - if(slider->bar.mode == LV_BAR_MODE_SYMMETRICAL && slider->bar.min_value < 0 && - slider->bar.max_value > 0) is_symmetrical = true; + bool is_symmetrical = lv_slider_is_symmetrical(obj); if(is_horizontal) { knob_size = lv_obj_get_height(obj); - if(is_symmetrical && slider->bar.cur_value < 0) knob_area.x1 = slider->bar.indic_area.x1; - else knob_area.x1 = LV_SLIDER_KNOB_COORD(is_rtl, slider->bar.indic_area); + if(is_symmetrical && + slider->bar.cur_value < 0) knob_area.x1 = LV_SLIDER_KNOB_COORD(!is_reversed, slider->bar.indic_area); + else knob_area.x1 = LV_SLIDER_KNOB_COORD(is_reversed, slider->bar.indic_area); } else { knob_size = lv_obj_get_width(obj); - if(is_symmetrical && slider->bar.cur_value < 0) knob_area.y1 = slider->bar.indic_area.y2; - else knob_area.y1 = slider->bar.indic_area.y1; + if(is_symmetrical && + slider->bar.cur_value < 0) knob_area.y1 = LV_SLIDER_KNOB_COORD_VERTICAL(!is_reversed, slider->bar.indic_area); + else knob_area.y1 = LV_SLIDER_KNOB_COORD_VERTICAL(is_reversed, slider->bar.indic_area); } - lv_draw_rect_dsc_t knob_rect_dsc; lv_draw_rect_dsc_init(&knob_rect_dsc); lv_obj_init_draw_rect_dsc(obj, LV_PART_KNOB, &knob_rect_dsc); @@ -276,11 +275,11 @@ static void draw_knob(lv_event_t * e) /*Calculate the second knob area*/ if(is_horizontal) { - /*use !is_rtl to get the other knob*/ - knob_area.x1 = LV_SLIDER_KNOB_COORD(!is_rtl, slider->bar.indic_area); + /*use !is_reversed to get the other knob*/ + knob_area.x1 = LV_SLIDER_KNOB_COORD(!is_reversed, slider->bar.indic_area); } else { - knob_area.y1 = slider->bar.indic_area.y2; + knob_area.y1 = LV_SLIDER_KNOB_COORD_VERTICAL(!is_reversed, slider->bar.indic_area); } position_knob(obj, &knob_area, knob_size, is_horizontal); lv_area_copy(&slider->left_knob_area, &knob_area); @@ -338,24 +337,21 @@ static void drag_start(lv_obj_t * obj) else if(mode == LV_SLIDER_MODE_RANGE) { lv_indev_get_point(lv_indev_get_act(), &p); lv_obj_transform_point(obj, &p, true, true); - bool hor = is_slider_horizontal(obj); - lv_base_dir_t base_dir = lv_obj_get_style_base_dir(obj, LV_PART_MAIN); - + const bool is_rtl = LV_BASE_DIR_RTL == lv_obj_get_style_base_dir(obj, LV_PART_MAIN); + const bool is_horizontal = is_slider_horizontal(obj); + const bool is_reversed = slider->bar.val_reversed ^ (is_rtl && is_horizontal); lv_coord_t dist_left, dist_right; - if(hor) { - if((base_dir != LV_BASE_DIR_RTL && p.x > slider->right_knob_area.x2) || (base_dir == LV_BASE_DIR_RTL && - p.x < slider->right_knob_area.x1)) { + if(is_horizontal) { + if((!is_reversed && p.x > slider->right_knob_area.x2) || (is_reversed && p.x < slider->right_knob_area.x1)) { slider->value_to_set = &slider->bar.cur_value; } - else if((base_dir != LV_BASE_DIR_RTL && p.x < slider->left_knob_area.x1) || (base_dir == LV_BASE_DIR_RTL && - p.x > slider->left_knob_area.x2)) { + else if((!is_reversed && p.x < slider->left_knob_area.x1) || (is_reversed && p.x > slider->left_knob_area.x2)) { slider->value_to_set = &slider->bar.start_value; } else { /*Calculate the distance from each knob*/ dist_left = LV_ABS((slider->left_knob_area.x1 + (slider->left_knob_area.x2 - slider->left_knob_area.x1) / 2) - p.x); dist_right = LV_ABS((slider->right_knob_area.x1 + (slider->right_knob_area.x2 - slider->right_knob_area.x1) / 2) - p.x); - /*Use whichever one is closer*/ if(dist_right < dist_left) { slider->value_to_set = &slider->bar.cur_value; @@ -368,10 +364,10 @@ static void drag_start(lv_obj_t * obj) } } else { - if(p.y < slider->right_knob_area.y1) { + if((!is_reversed && p.y < slider->right_knob_area.y1) || (is_reversed && p.y > slider->right_knob_area.y2)) { slider->value_to_set = &slider->bar.cur_value; } - else if(p.y > slider->left_knob_area.y2) { + else if((!is_reversed && p.y > slider->left_knob_area.y2) || (is_reversed && p.y < slider->left_knob_area.y1)) { slider->value_to_set = &slider->bar.start_value; } else { @@ -424,13 +420,17 @@ static void update_knob_pos(lv_obj_t * obj, bool check_drag) int32_t new_value = 0; const int32_t range = slider->bar.max_value - slider->bar.min_value; + const bool is_rtl = LV_BASE_DIR_RTL == lv_obj_get_style_base_dir(obj, LV_PART_MAIN); + const bool is_horizontal = is_slider_horizontal(obj); + const bool is_reversed = slider->bar.val_reversed ^ (is_rtl && is_horizontal); + if(is_hor) { const lv_coord_t bg_left = lv_obj_get_style_pad_left(obj, LV_PART_MAIN); const lv_coord_t bg_right = lv_obj_get_style_pad_right(obj, LV_PART_MAIN); const lv_coord_t w = lv_obj_get_width(obj); const lv_coord_t indic_w = w - bg_left - bg_right; - if(lv_obj_get_style_base_dir(obj, LV_PART_MAIN) == LV_BASE_DIR_RTL) { + if(is_reversed) { /*Make the point relative to the indicator*/ new_value = (obj->coords.x2 - bg_right) - p.x; } @@ -449,9 +449,16 @@ static void update_knob_pos(lv_obj_t * obj, bool check_drag) const lv_coord_t h = lv_obj_get_height(obj); const lv_coord_t indic_h = h - bg_bottom - bg_top; - /*Make the point relative to the indicator*/ - new_value = p.y - (obj->coords.y2 + bg_bottom); - new_value = (-new_value * range + indic_h / 2) / indic_h; + if(is_reversed) { + /*Make the point relative to the indicator*/ + new_value = p.y - (obj->coords.y1 + bg_top); + } + else { + /*Make the point relative to the indicator*/ + new_value = p.y - (obj->coords.y2 + bg_bottom); + new_value = -new_value; + } + new_value = (new_value * range + indic_h / 2) / indic_h; new_value += slider->bar.min_value; } diff --git a/project/gui/lvgl/src/widgets/slider/lv_slider.h b/project/gui/lvgl/src/widgets/slider/lv_slider.h index d3779a5a1..1a41c3608 100644 --- a/project/gui/lvgl/src/widgets/slider/lv_slider.h +++ b/project/gui/lvgl/src/widgets/slider/lv_slider.h @@ -166,7 +166,7 @@ bool lv_slider_is_dragged(const lv_obj_t * obj); /** * Get the mode of the slider. - * @param slider pointer to a bar object + * @param slider pointer to a slider object * @return see ::lv_slider_mode_t */ static inline lv_slider_mode_t lv_slider_get_mode(lv_obj_t * slider) @@ -177,6 +177,16 @@ static inline lv_slider_mode_t lv_slider_get_mode(lv_obj_t * slider) else return LV_SLIDER_MODE_NORMAL; } +/** + * Give the slider is in symmetrical mode or not + * @param obj pointer to slider object + * @return true: in symmetrical mode false : not in +*/ +static inline bool lv_slider_is_symmetrical(lv_obj_t * obj) +{ + return lv_bar_is_symmetrical(obj); +} + /********************** * MACROS **********************/