refactor(btn, img): rename btn to button and img to image
This commit is contained in:
@@ -21,11 +21,11 @@
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_ALPHA256
|
||||
#define LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_ALPHA256
|
||||
#ifndef LV_ATTRIBUTE_IMAGE_IMG_BENCHMARK_COGWHEEL_ALPHA256
|
||||
#define LV_ATTRIBUTE_IMAGE_IMG_BENCHMARK_COGWHEEL_ALPHA256
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IMG_BENCHMARK_COGWHEEL_ALPHA256 uint8_t
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMAGE_IMG_BENCHMARK_COGWHEEL_ALPHA256 uint8_t
|
||||
img_benchmark_cogwheel_alpha256_map[] = {
|
||||
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, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 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,
|
||||
@@ -129,7 +129,7 @@ img_benchmark_cogwheel_alpha256_map[] = {
|
||||
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, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x0c, 0x0c, 0x0b, 0x10, 0x18, 0x12, 0x0b, 0x00, 0x00, 0x01, 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,
|
||||
};
|
||||
|
||||
const lv_img_dsc_t img_benchmark_cogwheel_alpha256 = {
|
||||
const lv_image_dsc_t img_benchmark_cogwheel_alpha256 = {
|
||||
.header.cf = LV_COLOR_FORMAT_A8,
|
||||
.header.always_zero = 0,
|
||||
.header.w = 100,
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB
|
||||
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB
|
||||
#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB
|
||||
#define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB uint8_t img_benchmark_cogwheel_argb_map[] = {
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_ARGB uint8_t img_benchmark_cogwheel_argb_map[] = {
|
||||
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||
/*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
|
||||
0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x08, 0x97, 0xff, 0x72, 0xff, 0x72, 0xff, 0x72, 0xff, 0x72, 0xff, 0x72, 0xff, 0x92, 0xff, 0xdb, 0x6c, 0xff, 0x03, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00,
|
||||
@@ -421,7 +421,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_ARGB uint8_t img_benc
|
||||
#endif
|
||||
};
|
||||
|
||||
const lv_img_dsc_t img_benchmark_cogwheel_argb = {
|
||||
const lv_image_dsc_t img_benchmark_cogwheel_argb = {
|
||||
.header.always_zero = 0,
|
||||
.header.w = 100,
|
||||
.header.h = 100,
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16
|
||||
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16
|
||||
#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16
|
||||
#define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img_benchmark_cogwheel_indexed16_map[] = {
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_INDEXED16 uint8_t img_benchmark_cogwheel_indexed16_map[] =
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, /*Color of index 0*/
|
||||
0x6c, 0x5e, 0x4a, 0xff, /*Color of index 1*/
|
||||
0x72, 0x64, 0x50, 0xff, /*Color of index 2*/
|
||||
@@ -130,7 +131,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_INDEXED16 uint8_t img
|
||||
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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
const lv_img_dsc_t img_benchmark_cogwheel_indexed16 = {
|
||||
const lv_image_dsc_t img_benchmark_cogwheel_indexed16 = {
|
||||
.header.always_zero = 0,
|
||||
.header.w = 100,
|
||||
.header.h = 100,
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
#define LV_ATTRIBUTE_MEM_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB
|
||||
#define LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB
|
||||
#ifndef LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB
|
||||
#define LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB
|
||||
#endif
|
||||
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_benchmark_cogwheel_rgb_map[] = {
|
||||
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMAGE_IMG_COGWHEEL_RGB uint8_t img_benchmark_cogwheel_rgb_map[] = {
|
||||
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
|
||||
/*Pixel format: Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x97, 0x72, 0x72, 0x72, 0x72, 0x72, 0x92, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
@@ -322,7 +322,7 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_IMG_IMG_COGWHEEL_RGB uint8_t img_bench
|
||||
#endif
|
||||
};
|
||||
|
||||
const lv_img_dsc_t img_benchmark_cogwheel_rgb = {
|
||||
const lv_image_dsc_t img_benchmark_cogwheel_rgb = {
|
||||
.header.always_zero = 0,
|
||||
.header.w = 100,
|
||||
.header.h = 100,
|
||||
|
||||
@@ -79,14 +79,14 @@ static uint32_t disp_ori_timer_period;
|
||||
static uint32_t anim_ori_timer_period;
|
||||
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
LV_IMG_DECLARE(img_benchmark_cogwheel_rgb565a8);
|
||||
LV_IMAGE_DECLARE(img_benchmark_cogwheel_rgb565a8);
|
||||
#else
|
||||
LV_IMG_DECLARE(img_benchmark_cogwheel_argb);
|
||||
LV_IMAGE_DECLARE(img_benchmark_cogwheel_argb);
|
||||
#endif
|
||||
LV_IMG_DECLARE(img_benchmark_cogwheel_rgb);
|
||||
LV_IMG_DECLARE(img_benchmark_cogwheel_chroma_keyed);
|
||||
LV_IMG_DECLARE(img_benchmark_cogwheel_indexed16);
|
||||
LV_IMG_DECLARE(img_benchmark_cogwheel_alpha256);
|
||||
LV_IMAGE_DECLARE(img_benchmark_cogwheel_rgb);
|
||||
LV_IMAGE_DECLARE(img_benchmark_cogwheel_chroma_keyed);
|
||||
LV_IMAGE_DECLARE(img_benchmark_cogwheel_indexed16);
|
||||
LV_IMAGE_DECLARE(img_benchmark_cogwheel_alpha256);
|
||||
|
||||
#if LV_USE_FONT_COMPRESSED
|
||||
LV_FONT_DECLARE(lv_font_benchmark_montserrat_12_compr_az);
|
||||
@@ -269,14 +269,14 @@ static void shadow_large_ofs_cb(void)
|
||||
static void img_rgb_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
}
|
||||
|
||||
static void img_argb_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false);
|
||||
@@ -288,7 +288,7 @@ static void img_argb_cb(void)
|
||||
static void img_index_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
|
||||
}
|
||||
@@ -296,7 +296,7 @@ static void img_index_cb(void)
|
||||
static void img_alpha_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -304,8 +304,8 @@ static void img_alpha_cb(void)
|
||||
static void img_rgb_recolor_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_img_recolor_opa(&style_common, LV_OPA_50);
|
||||
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);
|
||||
|
||||
}
|
||||
@@ -313,8 +313,8 @@ static void img_rgb_recolor_cb(void)
|
||||
static void img_argb_recolor_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_img_recolor_opa(&style_common, LV_OPA_50);
|
||||
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);
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false);
|
||||
#else
|
||||
@@ -325,8 +325,8 @@ static void img_argb_recolor_cb(void)
|
||||
static void img_index_recolor_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_img_recolor_opa(&style_common, LV_OPA_50);
|
||||
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);
|
||||
|
||||
}
|
||||
@@ -334,21 +334,21 @@ static void img_index_recolor_cb(void)
|
||||
static void img_rgb_rot_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
}
|
||||
|
||||
static void img_rgb_rot_aa_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
}
|
||||
|
||||
static void img_argb_rot_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, false);
|
||||
#else
|
||||
@@ -359,7 +359,7 @@ static void img_argb_rot_cb(void)
|
||||
static void img_argb_rot_aa_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, true, false, true);
|
||||
#else
|
||||
@@ -370,7 +370,7 @@ static void img_argb_rot_aa_cb(void)
|
||||
static void img_rgb_zoom_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
|
||||
}
|
||||
@@ -378,7 +378,7 @@ static void img_rgb_zoom_cb(void)
|
||||
static void img_rgb_zoom_aa_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ static void img_rgb_zoom_aa_cb(void)
|
||||
static void img_argb_zoom_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, false);
|
||||
#else
|
||||
@@ -399,7 +399,7 @@ static void img_argb_zoom_cb(void)
|
||||
static void img_argb_zoom_aa_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
lv_style_set_image_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, true, true);
|
||||
#else
|
||||
@@ -520,10 +520,10 @@ static void sub_shadow_cb(void)
|
||||
|
||||
}
|
||||
|
||||
static void sub_img_cb(void)
|
||||
static void sub_image_cb(void)
|
||||
{
|
||||
lv_style_reset(&style_common);
|
||||
lv_style_set_img_opa(&style_common, scene_with_opa ? LV_OPA_50 : LV_OPA_COVER);
|
||||
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);
|
||||
#if LV_DEMO_BENCHMARK_RGB565A8 && LV_COLOR_DEPTH == 16
|
||||
img_create(&style_common, &img_benchmark_cogwheel_rgb565a8, false, false, false);
|
||||
@@ -619,7 +619,7 @@ static scene_dsc_t scenes[] = {
|
||||
{.name = "Substr. rectangle", .weight = 10, .create_cb = sub_rectangle_cb},
|
||||
{.name = "Substr. border", .weight = 10, .create_cb = sub_border_cb},
|
||||
{.name = "Substr. shadow", .weight = 10, .create_cb = sub_shadow_cb},
|
||||
{.name = "Substr. image", .weight = 10, .create_cb = sub_img_cb},
|
||||
{.name = "Substr. image", .weight = 10, .create_cb = sub_image_cb},
|
||||
{.name = "Substr. line", .weight = 10, .create_cb = sub_line_cb},
|
||||
{.name = "Substr. arc", .weight = 10, .create_cb = sub_arc_cb},
|
||||
{.name = "Substr. text", .weight = 10, .create_cb = sub_text_cb},
|
||||
@@ -1108,15 +1108,15 @@ static void img_create(lv_style_t * style, const void * src, bool rotate, bool z
|
||||
{
|
||||
uint32_t i;
|
||||
for(i = 0; i < (uint32_t)IMG_NUM; i++) {
|
||||
lv_obj_t * obj = lv_img_create(scene_bg);
|
||||
lv_obj_t * obj = lv_image_create(scene_bg);
|
||||
lv_obj_remove_style_all(obj);
|
||||
lv_obj_add_style(obj, style, 0);
|
||||
lv_img_set_src(obj, src);
|
||||
lv_obj_set_style_img_recolor(obj, lv_color_hex(rnd_next(0, 0xFFFFF0)), 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_img_set_angle(obj, rnd_next(0, 3599));
|
||||
if(zoom) lv_img_set_zoom(obj, rnd_next(IMG_ZOOM_MIN, IMG_ZOOM_MAX));
|
||||
lv_img_set_antialias(obj, aa);
|
||||
if(rotate) lv_image_set_angle(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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user