1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

chore: change some // comments to /**/

This commit is contained in:
Gabor Kiss-Vamosi 2023-07-15 18:39:03 +02:00
parent 562d30694a
commit b466045f13
63 changed files with 30 additions and 523 deletions

View File

@ -1006,29 +1006,9 @@ static void generate_report(void)
lv_table_set_col_width(table, 1, w / 4 - 3);
lv_obj_set_width(table, lv_pct(100));
// static lv_style_t style_cell_slow;
// static lv_style_t style_cell_very_slow;
// static lv_style_t style_cell_title;
//
// lv_style_init(&style_cell_title);
// lv_style_set_bg_color(&style_cell_title, LV_STATE_DEFAULT, lv_palette_main(LV_PALETTE_GREY));
// lv_style_set_bg_opa(&style_cell_title, LV_STATE_DEFAULT, LV_OPA_50);
//
// lv_style_init(&style_cell_slow);
// lv_style_set_text_color(&style_cell_slow, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
//
// lv_style_init(&style_cell_very_slow);
// lv_style_set_text_color(&style_cell_very_slow, LV_STATE_DEFAULT, lv_palette_main(LV_PALETTE_RED));
// lv_obj_add_style(table, LV_TABLE_PART_CELL2, &style_cell_slow);
// lv_obj_add_style(table, LV_TABLE_PART_CELL3, &style_cell_very_slow);
// lv_obj_add_style(table, LV_TABLE_PART_CELL4, &style_cell_title);
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_table_set_cell_type(table, row, 0, 4);
LV_LOG("\r\n"
"LVGL v%d.%d.%d " LVGL_VERSION_INFO
@ -1047,11 +1027,6 @@ static void generate_report(void)
lv_snprintf(buf, sizeof(buf), "%"LV_PRIu32, scenes[i].fps_normal);
lv_table_set_cell_value(table, row, 1, buf);
// lv_table_set_cell_type(table, row, 0, 2);
// lv_table_set_cell_type(table, row, 1, 2);
//LV_LOG("%s,%s\r\n", scenes[i].name, buf);
row++;
}
@ -1059,15 +1034,9 @@ static void generate_report(void)
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_table_set_cell_type(table, row, 0, 2);
// lv_table_set_cell_type(table, row, 1, 2);
//LV_LOG("%s\r\n", buf);
row++;
}
}
@ -1090,15 +1059,6 @@ static void generate_report(void)
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) {
// lv_table_set_cell_type(table, row, 0, 3);
// lv_table_set_cell_type(table, row, 1, 3);
}
else if(scenes[i].fps_normal < 20) {
// lv_table_set_cell_type(table, row, 0, 2);
// lv_table_set_cell_type(table, row, 1, 2);
}
LV_LOG("%s,%s\r\n", scenes[i].name, buf);
row++;
@ -1112,21 +1072,11 @@ static void generate_report(void)
lv_table_set_cell_value(table, row, 1, buf);
if(scenes[i].fps_opa < 10) {
// lv_table_set_cell_type(table, row, 0, 3);
// lv_table_set_cell_type(table, row, 1, 3);
}
else if(scenes[i].fps_opa < 20) {
// lv_table_set_cell_type(table, row, 0, 2);
// lv_table_set_cell_type(table, row, 1, 2);
}
LV_LOG("%s\r\n", buf);
row++;
}
// lv_page_set_scrl_layout(page, LV_LAYOUT_COLUMN_LEFT);
}

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_1 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_1_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_10 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_10_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_11 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_11_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_12 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_12_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_13 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_13_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_14 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_14_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_15 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_15_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_16 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_16_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_17 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_17_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_19 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_19_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_2 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_2_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_22 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_22_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_25 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_25_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_3 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_COLOR_FORMAT_ARGB888,
.data = img_multilang_avatar_3_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_4 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_4_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_5 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_5_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_6 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_6_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_7 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_7_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_8 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_8_map,
};

View File

@ -160,7 +160,6 @@ const lv_img_dsc_t img_multilang_avatar_9 = {
.header.reserved = 0,
.header.w = 128,
.header.h = 128,
// .data_size = 16384 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_multilang_avatar_9_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_artist_palette = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_artist_palette_map,
};

View File

@ -50,7 +50,6 @@ const lv_img_dsc_t img_emoji_books = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_books_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_camera_with_flash = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_camera_with_flash_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_cat_face = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_cat_face_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_deciduous_tree = {
.header.reserved = 0,
.header.w = 16,
.header.h = 19,
// .data_size = 304 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_deciduous_tree_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_dog_face = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_dog_face_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_earth_globe_europe_africa = {
.header.reserved = 0,
.header.w = 19,
.header.h = 19,
// .data_size = 361 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_earth_globe_europe_africa_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_flexed_biceps = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_flexed_biceps_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_movie_camera = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_movie_camera_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_red_heart = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_red_heart_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_rocket = {
.header.reserved = 0,
.header.w = 16,
.header.h = 19,
// .data_size = 304 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_rocket_map,
};

View File

@ -51,7 +51,6 @@ const lv_img_dsc_t img_emoji_soccer_ball = {
.header.reserved = 0,
.header.w = 18,
.header.h = 19,
// .data_size = 342 * LV_IMG_PX_SIZE_ALPHA_BYTE,
.data = img_emoji_soccer_ball_map,
};

View File

@ -200,7 +200,6 @@ lv_img_dsc_t img_lv_demo_music_btn_list_pause = {
.header.always_zero = 0,
.header.w = 58,
.header.h = 60,
// .data_size = 3480 * LV_COLOR_FORMAT_NATIVE_ALPHA_SIZE,
.header.cf = LV_COLOR_FORMAT_ARGB8888,
.data = img_lv_demo_music_btn_list_pause_map,
};

View File

@ -409,21 +409,15 @@ static lv_obj_t * create_cont(lv_obj_t * parent)
lv_obj_t * placeholder1 = lv_obj_create(main_cont);
lv_obj_remove_style_all(placeholder1);
lv_obj_clear_flag(placeholder1, LV_OBJ_FLAG_CLICKABLE);
// lv_obj_set_style_bg_color(placeholder1, lv_color_hex(0xff0000), 0);
// lv_obj_set_style_bg_opa(placeholder1, LV_OPA_50, 0);
lv_obj_t * placeholder2 = lv_obj_create(main_cont);
lv_obj_remove_style_all(placeholder2);
lv_obj_clear_flag(placeholder2, LV_OBJ_FLAG_CLICKABLE);
// lv_obj_set_style_bg_color(placeholder2, lv_color_hex(0x00ff00), 0);
// lv_obj_set_style_bg_opa(placeholder2, LV_OPA_50, 0);
#if LV_DEMO_MUSIC_SQUARE || LV_DEMO_MUSIC_ROUND
lv_obj_t * placeholder3 = lv_obj_create(main_cont);
lv_obj_remove_style_all(placeholder3);
lv_obj_clear_flag(placeholder3, LV_OBJ_FLAG_CLICKABLE);
// lv_obj_set_style_bg_color(placeholder3, lv_color_hex(0x0000ff), 0);
// lv_obj_set_style_bg_opa(placeholder3, LV_OPA_20, 0);
lv_obj_set_size(placeholder1, lv_pct(100), LV_VER_RES);
lv_obj_set_y(placeholder1, 0);
@ -863,9 +857,6 @@ static void spectrum_draw_event_cb(lv_event_t * e)
draw_dsc.p[0].x = center.x + x1_out;
draw_dsc.p[0].y = center.y + get_sin(di, v);
// int32_t x1_in = get_cos(di, r_in);
// draw_dsc.p[1].x = center.x + x1_in;
// draw_dsc.p[1].y = center.y + get_sin(di, r_in);
di += DEG_STEP - deg_space * 2;
int32_t x2_out = get_cos(di, v);

View File

@ -60,8 +60,6 @@ static void obj_test_task_cb(lv_timer_t * tmr)
lv_anim_t a;
lv_obj_t * obj;
// printf("step start: %d\n", state);
switch(state) {
case -1: {
lv_res_t res = lv_mem_test();
@ -143,13 +141,6 @@ static void obj_test_task_cb(lv_timer_t * tmr)
lv_obj_set_size(obj, 100, 70);
lv_obj_set_style_bg_img_src(obj, LV_SYMBOL_DUMMY"Text from\nstyle", 0);
lv_obj_del_async(obj); /*Delete on next call of `lv_task_handler` (so not now)*/
// obj = lv_btn_create(main_page);
// lv_obj_set_size(obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
// lv_obj_set_style_bg_img_src(obj, LV_SYMBOL_LEFT);
// lv_obj_set_style_bg_img_opa(obj, LV_OPA_50);
// lv_obj_set_style_bg_img_tiled(obj, true);
// lv_obj_scroll_to_view(obj, LV_ANIM_ON);
break;
case 5:
@ -419,7 +410,6 @@ static void obj_test_task_cb(lv_timer_t * tmr)
break;
}
// printf("step end: %d\n", state);
state++;
}

View File

@ -250,7 +250,6 @@ const lv_img_dsc_t img_clothes = {
.header.always_zero = 0,
.header.w = 56,
.header.h = 56,
// .data_size = 3136 * LV_COLOR_FORMAT_NATIVE_ALPHA_SIZE,
.header.cf = LV_COLOR_DEPTH == 16 ? LV_COLOR_FORMAT_RGB565A8 : LV_COLOR_FORMAT_ARGB8888,
.data = img_clothes_map,
};

View File

@ -1492,53 +1492,6 @@ static void chart_event_cb(lv_event_t * e)
static void shop_chart_event_cb(lv_event_t * e)
{
LV_UNUSED(e);
// lv_event_code_t code = lv_event_get_code(e);
// if(code == LV_EVENT_DRAW_PART_BEGIN) {
// lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
// /*Set the markers' text*/
// if(dsc->part == LV_PART_TICKS && dsc->id == LV_CHART_AXIS_PRIMARY_X) {
// const char * month[] = {"Jan", "Febr", "March", "Apr", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec"};
// lv_snprintf(dsc->text, dsc->text_length, "%s", month[dsc->value]);
// }
// if(dsc->part == LV_PART_ITEMS) {
// dsc->rect_dsc->bg_opa = LV_OPA_TRANSP; /*We will draw it later*/
// }
// }
// if(code == LV_EVENT_DRAW_PART_END) {
// lv_obj_draw_part_dsc_t * dsc = lv_event_get_param(e);
// /*Add the faded area before the lines are drawn */
// if(dsc->part == LV_PART_ITEMS) {
// static const uint32_t devices[10] = {32, 43, 21, 56, 29, 36, 19, 25, 62, 35};
// static const uint32_t clothes[10] = {12, 19, 23, 31, 27, 32, 32, 11, 21, 32};
// static const uint32_t services[10] = {56, 38, 56, 13, 44, 32, 49, 64, 17, 33};
//
// lv_draw_rect_dsc_t draw_rect_dsc;
// lv_draw_rect_dsc_init(&draw_rect_dsc);
//
// lv_coord_t h = lv_area_get_height(dsc->draw_area);
//
// lv_area_t a;
// a.x1 = dsc->draw_area->x1;
// a.x2 = dsc->draw_area->x2;
//
// a.y1 = dsc->draw_area->y1;
// a.y2 = a.y1 + 4 + (devices[dsc->id] * h) / 100; /*+4 to overlap the radius*/
// draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_RED);
// draw_rect_dsc.radius = 4;
// lv_draw_rect(dsc->layer, &draw_rect_dsc, &a);
//
// a.y1 = a.y2 - 4; /*-4 to overlap the radius*/
// a.y2 = a.y1 + (clothes[dsc->id] * h) / 100;
// draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_BLUE);
// draw_rect_dsc.radius = 0;
// lv_draw_rect(dsc->layer, &draw_rect_dsc, &a);
//
// a.y1 = a.y2;
// a.y2 = a.y1 + (services[dsc->id] * h) / 100;
// draw_rect_dsc.bg_color = lv_palette_main(LV_PALETTE_GREEN);
// lv_draw_rect(dsc->layer, &draw_rect_dsc, &a);
// }
// }
}

View File

@ -173,7 +173,6 @@ const lv_img_dsc_t imgbtn_mid = {
.header.always_zero = 0,
.header.w = 5,
.header.h = 49,
// .data_size = 245 * LV_COLOR_FORMAT_NATIVE_ALPHA_SIZE,
.header.cf = LV_COLOR_FORMAT_ARGB8888,
.data = imgbtn_mid_map,
};

View File

@ -9,11 +9,7 @@ void lv_example_bmp_1(void)
lv_obj_t * img = lv_img_create(lv_scr_act());
/* Assuming a File system is attached to letter 'A'
* E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */
//#if LV_COLOR_DEPTH == 32
lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_32bit.bmp");
//#elif LV_COLOR_DEPTH == 16
// lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_16bit.bmp");
//#endif
lv_obj_center(img);
}

View File

@ -53,7 +53,7 @@ void lv_example_file_explorer_1(void)
char * envvar = "HOME";
char home_dir[LV_FS_MAX_PATH_LENGTH];
strcpy(home_dir, "A:");
// get the user's home directory from the HOME enviroment variable
/* get the user's home directory from the HOME enviroment variable*/
strcat(home_dir, getenv(envvar));
LV_LOG_USER("home_dir: %s\n", home_dir);
lv_file_explorer_set_quick_access_path(file_explorer, LV_EXPLORER_HOME_DIR, home_dir);

View File

@ -83,7 +83,7 @@ void lv_example_file_explorer_2(void)
char * envvar = "HOME";
char home_dir[LV_FS_MAX_PATH_LENGTH];
strcpy(home_dir, "A:");
// get the user's home directory from the HOME enviroment variable
/* get the user's home directory from the HOME enviroment variable*/
strcat(home_dir, getenv(envvar));
LV_LOG_USER("home_dir: %s\n", home_dir);
lv_file_explorer_set_quick_access_path(file_explorer, LV_EXPLORER_HOME_DIR, home_dir);
@ -135,7 +135,6 @@ void lv_example_file_explorer_2(void)
lv_obj_set_size(dd, LV_PCT(30), LV_SIZE_CONTENT);
lv_dropdown_set_options_static(dd, opts);
lv_obj_align(dd, LV_ALIGN_RIGHT_MID, 0, 0);
//lv_obj_align_to(dd, btn, LV_ALIGN_OUT_RIGHT_MID, 0, 0);
lv_obj_add_event(dd, dd_event_handler, LV_EVENT_VALUE_CHANGED, file_explorer);
}

View File

@ -97,7 +97,7 @@ void lv_example_file_explorer_3(void)
char * envvar = "HOME";
char home_dir[LV_FS_MAX_PATH_LENGTH];
strcpy(home_dir, "A:");
// get the user's home directory from the HOME enviroment variable
/* get the user's home directory from the HOME enviroment variable*/
strcat(home_dir, getenv(envvar));
LV_LOG_USER("home_dir: %s\n", home_dir);
lv_file_explorer_set_quick_access_path(file_explorer, LV_EXPLORER_HOME_DIR, home_dir);

View File

@ -17,8 +17,6 @@ void lv_example_style_5(void)
/*Add a shadow*/
lv_style_set_shadow_width(&style, 55);
lv_style_set_shadow_color(&style, lv_palette_main(LV_PALETTE_BLUE));
// lv_style_set_shadow_ofs_x(&style, 10);
// lv_style_set_shadow_ofs_y(&style, 20);
/*Create an object with the new style*/
lv_obj_t * obj = lv_obj_create(lv_scr_act());

View File

@ -720,7 +720,6 @@ static void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state)
lv_free(ts);
if(cmp_res == _LV_STYLE_STATE_CMP_DIFF_REDRAW) {
// lv_obj_invalidate(obj);
/*Invalidation is not enough, e.g. layer type needs to be updated too*/
lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
}

View File

@ -891,7 +891,7 @@ static void draw_buf_flush(lv_disp_t * disp)
{
/*Flush the rendered content to the display*/
lv_layer_t * layer = disp->layer_head;
// if(layer->wait_for_finish) layer->wait_for_finish(layer);
while(layer->draw_task_head) {
lv_draw_dispatch_wait_for_request();
lv_draw_dispatch();

View File

@ -122,7 +122,7 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file)
if(dsc->fbfd > 0) close(dsc->fbfd);
// Open the file for reading and writing
/* Open the file for reading and writing*/
dsc->fbfd = open(dsc->devname, O_RDWR);
if(dsc->fbfd == -1) {
perror("Error: cannot open framebuffer device");
@ -131,10 +131,10 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file)
LV_LOG_INFO("The framebuffer device was opened successfully");
#if !LV_LINUX_FBDEV_NUTTX
// Make sure that the display is on.
/* Make sure that the display is on.*/
if(ioctl(dsc->fbfd, FBIOBLANK, FB_BLANK_UNBLANK) != 0) {
perror("ioctl(FBIOBLANK)");
// Don't return. Some framebuffer drivers like efifb or simplefb don't implement FBIOBLANK.
/* Don't return. Some framebuffer drivers like efifb or simplefb don't implement FBIOBLANK.*/
}
#endif /* !LV_LINUX_FBDEV_NUTTX */
@ -142,13 +142,13 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file)
struct fbtype fb;
unsigned line_length;
//Get fb type
/*Get fb type*/
if(ioctl(dsc->fbfd, FBIOGTYPE, &fb) != 0) {
perror("ioctl(FBIOGTYPE)");
return;
}
//Get screen width
/*Get screen width*/
if(ioctl(dsc->fbfd, FBIO_GETLINEWIDTH, &line_length) != 0) {
perror("ioctl(FBIO_GETLINEWIDTH)");
return;
@ -163,13 +163,13 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file)
dsc->finfo.smem_len = dsc->finfo.line_length * dsc->vinfo.yres;
#else /* LV_LINUX_FBDEV_BSD */
// Get fixed screen information
/* Get fixed screen information*/
if(ioctl(dsc->fbfd, FBIOGET_FSCREENINFO, &dsc->finfo) == -1) {
perror("Error reading fixed information");
return;
}
// Get variable screen information
/* Get variable screen information*/
if(ioctl(dsc->fbfd, FBIOGET_VSCREENINFO, &dsc->vinfo) == -1) {
perror("Error reading variable information");
return;
@ -178,18 +178,18 @@ void lv_linux_fbdev_set_file(lv_disp_t * disp, const char * file)
LV_LOG_INFO("%dx%d, %dbpp", dsc->vinfo.xres, dsc->vinfo.yres, dsc->vinfo.bits_per_pixel);
// Figure out the size of the screen in bytes
/* Figure out the size of the screen in bytes*/
dsc->screensize = dsc->finfo.smem_len; //finfo.line_length * vinfo.yres;
// Map the device to memory
/* Map the device to memory*/
dsc->fbp = (char *)mmap(0, dsc->screensize, PROT_READ | PROT_WRITE, MAP_SHARED, dsc->fbfd, 0);
if((intptr_t)dsc->fbp == -1) {
perror("Error: failed to map framebuffer device to memory");
return;
}
// Don't initialise the memory to retain what's currently displayed / avoid clearing the screen.
// This is important for applications that only draw to a subsection of the full framebuffer.
/* Don't initialise the memory to retain what's currently displayed / avoid clearing the screen.
* This is important for applications that only draw to a subsection of the full framebuffer.*/
LV_LOG_INFO("The framebuffer device was mapped to memory successfully");
@ -257,7 +257,7 @@ static void flush_cb(lv_disp_t * disp, const lv_area_t * area, uint8_t * color_p
}
#if LV_LINUX_FBDEV_NUTTX && defined(CONFIG_FB_UPDATE)
//May be some direct update command is required
/*May be some direct update command is required*/
struct fb_area_s fb_area;
fb_area.x = area->x1;
fb_area.y = area->y1;

View File

@ -100,8 +100,6 @@ void _lv_sdl_mousewheel_handler(SDL_Event * event)
switch(event->type) {
case SDL_MOUSEWHEEL:
// Scroll down (y = -1) means positive encoder turn,
// so invert it
#ifdef __EMSCRIPTEN__
/*Escripten scales it wrong*/
if(event->wheel.y < 0) dsc->diff++;

View File

@ -184,71 +184,6 @@ static void lv_draw_sw_buffer_copy(lv_layer_t * layer,
static void lv_draw_sw_buffer_convert(lv_layer_t * layer)
{
LV_UNUSED(layer);
//TODO
// /*Keep the rendered image as it is*/
// if(layer->color_format == LV_COLOR_FORMAT_NATIVE) return;
//
//#if LV_COLOR_DEPTH == 8
// if(layer->color_format == LV_COLOR_FORMAT_L8) return;
//#endif
//
//#if LV_COLOR_DEPTH == 16
// if(layer->color_format == LV_COLOR_FORMAT_RGB565) return;
//
// /*Make both the clip and buf area relative to the buf area*/
// if(layer->color_format == LV_COLOR_FORMAT_NATIVE_REVERSED) {
// uint32_t px_cnt = lv_area_get_size(layer->buf_area);
// uint32_t u32_cnt = px_cnt / 2;
// uint16_t * buf16 = layer->buf;
// uint32_t * buf32 = (uint32_t *) buf16 ;
//
// /*Swap all byte pairs*/
// while(u32_cnt >= 8) {
// buf32[0] = ((uint32_t)(buf32[0] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[0] & 0x00ff00ff) << 8);
// buf32[1] = ((uint32_t)(buf32[1] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[1] & 0x00ff00ff) << 8);
// buf32[2] = ((uint32_t)(buf32[2] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[2] & 0x00ff00ff) << 8);
// buf32[3] = ((uint32_t)(buf32[3] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[3] & 0x00ff00ff) << 8);
// buf32[4] = ((uint32_t)(buf32[4] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[4] & 0x00ff00ff) << 8);
// buf32[5] = ((uint32_t)(buf32[5] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[5] & 0x00ff00ff) << 8);
// buf32[6] = ((uint32_t)(buf32[6] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[6] & 0x00ff00ff) << 8);
// buf32[7] = ((uint32_t)(buf32[7] & 0xff00ff00) >> 8) + ((uint32_t)(buf32[7] & 0x00ff00ff) << 8);
// buf32 += 8;
// u32_cnt -= 8;
// }
//
// while(u32_cnt) {
// *buf32 = ((uint32_t)(*buf32 & 0xff00ff00) >> 8) + ((uint32_t)(*buf32 & 0x00ff00ff) << 8);
// buf32++;
// u32_cnt--;
// }
//
// if(px_cnt & 0x1) {
// uint32_t e = px_cnt - 1;
// buf16[e] = ((buf16[e] & 0xff00) >> 8) + ((buf16[e] & 0x00ff) << 8);
// }
//
// return;
// }
//#endif
//
// size_t buf_size_px = lv_area_get_size(&layer->buf_area);
//
// bool has_alpha = lv_color_format_has_alpha(layer->color_format);
// uint8_t px_size_in = lv_color_format_get_size(layer->color_format);
// uint8_t px_size_out = lv_color_format_get_size(display->color_format);
//
// /*In-plpace conversation can happen only when converting to a smaller pixel size*/
// if(px_size_in >= px_size_out) {
// if(has_alpha) lv_color_from_native_alpha(layer->buf, layer->buf, layer->color_format, buf_size_px);
// else lv_color_convert_from_native(layer->buf, layer->buf, layer->color_format, buf_size_px);
// }
// else {
// /*TODO What to to do when can't perform in-place conversion?*/
// LV_LOG_WARN("Can't convert to the desired color format (%d)", layer->color_format);
// }
// return;
//
// LV_LOG_WARN("Couldn't convert the image to the desired format");
}
uint8_t * buf_tmp;

View File

@ -33,7 +33,6 @@ typedef struct {
lv_draw_unit_t base_unit;
struct _lv_draw_task_t * task_act;
#if LV_USE_OS
// lv_mutex_t mutex;
lv_thread_sync_t sync;
lv_thread_t thread;
#endif

View File

@ -1306,7 +1306,7 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_opa_t mask_mix(lv_opa_t mask_act, lv_opa_
if(mask_new >= LV_OPA_MAX) return mask_act;
if(mask_new <= LV_OPA_MIN) return 0;
return LV_UDIV255(mask_act * mask_new);// >> 8);
return LV_UDIV255(mask_act * mask_new);
}

View File

@ -49,10 +49,6 @@ 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 rgb_no_aa_chroma_key(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, lv_color_t * cbuf, uint8_t * abuf, lv_color_t chroma_key_color);
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);

View File

@ -233,9 +233,6 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
lv_font_fmt_txt_dsc_t * fdsc = (lv_font_fmt_txt_dsc_t *)font->dsc;
/*Check the cache first*/
// if(fdsc->cache && letter == fdsc->cache->last_letter) return fdsc->cache->last_glyph_id;
uint16_t i;
for(i = 0; i < fdsc->cmap_num; i++) {
@ -272,18 +269,9 @@ static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter)
}
}
/*Update the cache*/
// if(fdsc->cache) {
// fdsc->cache->last_letter = letter;
// fdsc->cache->last_glyph_id = glyph_id;
// }
return glyph_id;
}
// if(fdsc->cache) {
// fdsc->cache->last_letter = letter;
// fdsc->cache->last_glyph_id = 0;
// }
return 0;
}

View File

@ -600,15 +600,6 @@ gd_get_frame(gd_GIF * gif)
void
gd_render_frame(gd_GIF * gif, uint8_t * buffer)
{
// uint32_t i;
// uint32_t j;
// for(i = 0, j = 0; i < gif->width * gif->height * 3; i+= 3, j+=4) {
// buffer[j + 0] = gif->canvas[i + 2];
// buffer[j + 1] = gif->canvas[i + 1];
// buffer[j + 2] = gif->canvas[i + 0];
// buffer[j + 3] = 0xFF;
// }
// memcpy(buffer, gif->canvas, gif->width * gif->height * 3);
render_frame_rect(gif, buffer);
}

View File

@ -119,7 +119,7 @@ static void * ttf_cache_add(ttf_cache_handle_t handle, int key, int size)
}
}
while(cache->total_size > 0 && (cache->max_size < cache->total_size + size)) {
// expire entries
/* expire entries*/
unsigned long long oldest = ttf_cache_get_oldest_age(handle);
if(oldest == 0) {
break;
@ -216,7 +216,7 @@ static void ttf_cache_destroy(ttf_cache_handle_t handle)
TTF_CACHE_FREE((ttf_cache_t *)handle);
}
#if LV_TINY_TTF_FILE_SUPPORT !=0
// a hydra stream that can be in memory or from a file
/* a hydra stream that can be in memory or from a file*/
typedef struct ttf_cb_stream {
lv_fs_file_t * file;
const void * data;

View File

@ -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.
/* 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 with the specified 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 line_height, size_t cache_size);
#endif
// create a font from the specified data pointer with the specified 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 line_height);
// create a font from the specified data pointer with the specified line height and the specified 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 line_height, size_t cache_size);
// set the size of the font to a new line_height
/* 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);
// 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);
/**********************

View File

@ -182,7 +182,7 @@ static void notify(lv_msg_t * m)
if(!s->_checked) {
/*Check if this sub_dsc_t is about this msg_id*/
if(s->msg_id == m->id && s->callback) {
// Set this flag and notify
/* Set this flag and notify*/
s->_checked = 1;
m->user_data = s->user_data;
m->_priv_data = s->_priv_data;

View File

@ -144,7 +144,8 @@ static void lv_animimg_constructor(const lv_obj_class_t * class_p, lv_obj_t * ob
animimg->dsc = NULL;
animimg->pic_count = -1;
//initial animation
/*initial animation*/
lv_anim_init(&animimg->anim);
lv_anim_set_var(&animimg->anim, obj);
lv_anim_set_time(&animimg->anim, 30);

View File

@ -228,225 +228,6 @@ void lv_canvas_copy_buf(lv_obj_t * obj, const void * to_copy, lv_coord_t x, lv_c
}
}
void lv_canvas_blur_hor(lv_obj_t * obj, const lv_area_t * area, uint16_t r)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
LV_UNUSED(obj);
LV_UNUSED(area);
LV_UNUSED(r);
//
// if(r == 0) return;
//
// lv_canvas_t * canvas = (lv_canvas_t *)obj;
//
// lv_area_t a;
// if(area) {
// lv_area_copy(&a, area);
// if(a.x1 < 0) a.x1 = 0;
// if(a.y1 < 0) a.y1 = 0;
// if(a.x2 > canvas->dsc.header.w - 1) a.x2 = canvas->dsc.header.w - 1;
// if(a.y2 > canvas->dsc.header.h - 1) a.y2 = canvas->dsc.header.h - 1;
// }
// else {
// a.x1 = 0;
// a.y1 = 0;
// a.x2 = canvas->dsc.header.w - 1;
// a.y2 = canvas->dsc.header.h - 1;
// }
//
// lv_color_t color = lv_obj_get_style_img_recolor(obj, LV_PART_MAIN);
//
// uint16_t r_back = r / 2;
// uint16_t r_front = r / 2;
//
// if((r & 0x1) == 0) r_back--;
//
// bool has_alpha = lv_color_format_has_alpha(canvas->dsc.header.cf);
//
// lv_coord_t line_w = lv_img_buf_get_img_size(canvas->dsc.header.w, 1, canvas->dsc.header.cf);
// uint8_t * line_buf = lv_malloc(line_w);
//
// lv_img_dsc_t line_img;
// line_img.data = line_buf;
// line_img.header.always_zero = 0;
// line_img.header.w = canvas->dsc.header.w;
// line_img.header.h = 1;
// line_img.header.cf = canvas->dsc.header.cf;
//
// lv_coord_t x;
// lv_coord_t y;
// lv_coord_t x_safe;
//
// for(y = a.y1; y <= a.y2; y++) {
// /*Initialize the buffers*/
// uint32_t asum = 0;
// uint32_t rsum = 0;
// uint32_t gsum = 0;
// uint32_t bsum = 0;
//
// lv_color_t c;
// lv_opa_t opa = LV_OPA_TRANSP;
// lv_memcpy(line_buf, &canvas->dsc.data[y * line_w], line_w);
//
// for(x = a.x1 - r_back; x <= a.x1 + r_front; x++) {
// x_safe = x < 0 ? 0 : x;
// x_safe = x_safe > canvas->dsc.header.w - 1 ? canvas->dsc.header.w - 1 : x_safe;
//
// lv_canvas_get_px(obj, x_safe, 0, &c, &opa);
//
// rsum += c.red;
// gsum += c.green;
// bsum += c.blue;
// if(has_alpha) asum += opa;
// }
//
// /*Just to indicate that the px is visible*/
// if(has_alpha == false) asum = LV_OPA_COVER;
//
// /*Blur all pixels of the line*/
// for(x = a.x1; x <= a.x2; x++) {
// if(asum) {
// c.red = rsum / r;
// c.green = gsum / r;
// c.blue = bsum / r;
// if(has_alpha) opa = asum / r;
//
// lv_canvas_set_px(&canvas->dsc, x, y, c, opa);
// }
//
// x_safe = x - r_back;
// x_safe = x_safe < 0 ? 0 : x_safe;
// lv_canvas_get_px(obj, x_safe, 0, &c, &opa);
//
// rsum -= c.red;
// gsum -= c.green;
// bsum -= c.blue;
// if(has_alpha) asum -= opa;
//
// x_safe = x + 1 + r_front;
// x_safe = x_safe > canvas->dsc.header.w - 1 ? canvas->dsc.header.w - 1 : x_safe;
// lv_canvas_get_px(obj, x_safe, 0, &c, &opa);
//
// rsum += c.red;
// gsum += c.green;
// bsum += c.blue;
// if(has_alpha) asum += opa;
// }
// }
// lv_obj_invalidate(obj);
//
// lv_free(line_buf);
}
void lv_canvas_blur_ver(lv_obj_t * obj, const lv_area_t * area, uint16_t r)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
LV_UNUSED(obj);
LV_UNUSED(area);
LV_UNUSED(r);
// if(r == 0) return;
//
// lv_canvas_t * canvas = (lv_canvas_t *)obj;
//
// lv_area_t a;
// if(area) {
// lv_area_copy(&a, area);
// if(a.x1 < 0) a.x1 = 0;
// if(a.y1 < 0) a.y1 = 0;
// if(a.x2 > canvas->dsc.header.w - 1) a.x2 = canvas->dsc.header.w - 1;
// if(a.y2 > canvas->dsc.header.h - 1) a.y2 = canvas->dsc.header.h - 1;
// }
// else {
// a.x1 = 0;
// a.y1 = 0;
// a.x2 = canvas->dsc.header.w - 1;
// a.y2 = canvas->dsc.header.h - 1;
// }
//
// lv_color_t color = lv_obj_get_style_img_recolor(obj, LV_PART_MAIN);
//
// uint16_t r_back = r / 2;
// uint16_t r_front = r / 2;
//
// if((r & 0x1) == 0) r_back--;
//
// bool has_alpha = lv_color_format_has_alpha(canvas->dsc.header.cf);
//
// lv_coord_t x;
// lv_coord_t y;
// lv_coord_t y_safe;
//
// for(x = a.x1; x <= a.x2; x++) {
// uint32_t asum = 0;
// uint32_t rsum = 0;
// uint32_t gsum = 0;
// uint32_t bsum = 0;
//
// lv_color_t c;
// lv_opa_t opa = LV_OPA_COVER;
//
// for(y = a.y1 - r_back; y <= a.y1 + r_front; y++) {
// y_safe = y < 0 ? 0 : y;
// y_safe = y_safe > canvas->dsc.header.h - 1 ? canvas->dsc.header.h - 1 : y_safe;
//
//// c = canvas->dsc[x_safe];
//
//// c = lv_img_buf_get_px_color(&canvas->dsc, x, y_safe, color);
//// if(has_alpha) opa = lv_img_buf_get_px_alpha(&canvas->dsc, x, y_safe);
//
//// lv_img_buf_set_px_color(&line_img, 0, y_safe, c);
//// if(has_alpha) lv_img_buf_set_px_alpha(&line_img, 0, y_safe, opa);
//
// rsum += c.red;
// gsum += c.green;
// bsum += c.blue;
// if(has_alpha) asum += opa;
// }
//
// /*Just to indicate that the px is visible*/
// if(has_alpha == false) asum = LV_OPA_COVER;
//
// for(y = a.y1; y <= a.y2; y++) {
// if(asum) {
// c.red = rsum / r;
// c.green = gsum / r;
// c.blue = bsum / r;
// if(has_alpha) opa = asum / r;
//
// lv_img_buf_set_px_color(&canvas->dsc, x, y, c);
// }
// if(has_alpha) lv_img_buf_set_px_alpha(&canvas->dsc, x, y, opa);
//
// y_safe = y - r_back;
// y_safe = y_safe < 0 ? 0 : y_safe;
//// c = lv_img_buf_get_px_color(&line_img, 0, y_safe, color);
//// if(has_alpha) opa = lv_img_buf_get_px_alpha(&line_img, 0, y_safe);
//
// rsum -= c.red;
// gsum -= c.green;
// bsum -= c.blue;
// if(has_alpha) asum -= opa;
//
// y_safe = y + 1 + r_front;
// y_safe = y_safe > canvas->dsc.header.h - 1 ? canvas->dsc.header.h - 1 : y_safe;
//
//// c = lv_img_buf_get_px_color(&canvas->dsc, x, y_safe, color);
//// if(has_alpha) opa = lv_img_buf_get_px_alpha(&canvas->dsc, x, y_safe);
//
//// lv_img_buf_set_px_color(&line_img, 0, y_safe, c);
//// if(has_alpha) lv_img_buf_set_px_alpha(&line_img, 0, y_safe, opa);
//
// rsum += c.red;
// gsum += c.green;
// bsum += c.blue;
// if(has_alpha) asum += opa;
// }
// }
//
// lv_obj_invalidate(obj);
}
void lv_canvas_fill_bg(lv_obj_t * obj, lv_color_t color, lv_opa_t opa)
{
LV_ASSERT_OBJ(obj, MY_CLASS);

View File

@ -108,23 +108,6 @@ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas);
*/
void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coord_t w,
lv_coord_t h);
/**
* Apply horizontal blur on the canvas
* @param canvas pointer to a canvas object
* @param area the area to blur. If `NULL` the whole canvas will be blurred.
* @param r radius of the blur
*/
void lv_canvas_blur_hor(lv_obj_t * canvas, const lv_area_t * area, uint16_t r);
/**
* Apply vertical blur on the canvas
* @param canvas pointer to a canvas object
* @param area the area to blur. If `NULL` the whole canvas will be blurred.
* @param r radius of the blur
*/
void lv_canvas_blur_ver(lv_obj_t * canvas, const lv_area_t * area, uint16_t r);
/**
* Fill the canvas with color
* @param canvas pointer to a canvas

View File

@ -300,7 +300,6 @@ void lv_chart_get_point_pos_by_id(lv_obj_t * obj, lv_chart_series_t * ser, uint1
LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/
lv_coord_t block_w = (w - ((chart->point_cnt - 1) * block_gap)) / chart->point_cnt;
lv_coord_t col_w = (block_w - (ser_cnt - 1) * ser_gap) / ser_cnt;
// p_out->x = (int32_t)((int32_t)w * id) / chart->point_cnt;
p_out->x = (int32_t)((int32_t)(w - block_w) * id) / (chart->point_cnt - 1);
lv_chart_series_t * ser_i = NULL;

View File

@ -68,11 +68,6 @@ lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt)
LV_LOG_INFO("begin");
lv_obj_t * obj = lv_label_create(list);
lv_label_set_text(obj, txt);
// lv_obj_t * obj = lv_obj_class_create_obj(&lv_list_text_class, list);
// lv_obj_class_init_obj(obj);
// lv_label_set_text(obj, txt);
// lv_label_set_long_mode(obj, LV_LABEL_LONG_SCROLL_CIRCULAR);
// lv_obj_set_width(obj, LV_PCT(100));
return obj;
}

View File

@ -41,8 +41,8 @@ typedef struct {
int32_t step;
uint16_t digit_count : 4;
uint16_t dec_point_pos : 4; /*if 0, there is no separator and the number is an integer*/
uint16_t rollover : 1; // Set to true for rollover functionality
uint16_t digit_step_dir : 2; // the direction the digit will step on encoder button press when editing
uint16_t rollover : 1; /* Set to true for rollover functionality*/
uint16_t digit_step_dir : 2; /* the direction the digit will step on encoder button press when editing*/
} lv_spinbox_t;
extern const lv_obj_class_t lv_spinbox_class;