/lvgl-latest/src/draw/ |
D | lv_draw_label.c | 126 lv_point_t pos; in lv_draw_label() local 127 pos.x = coords->x1; in lv_draw_label() 128 pos.y = coords->y1; in lv_draw_label() 134 pos.y += y_ofs; in lv_draw_label() 151 pos.y += hint->y; in lv_draw_label() 157 while(pos.y + line_height_font < draw_ctx->clip_area->y1) { in lv_draw_label() 161 pos.y += line_height; in lv_draw_label() 164 if(hint && pos.y >= -LV_LABEL_HINT_UPDATE_TH && hint->line_start < 0) { in lv_draw_label() 166 hint->y = pos.y - coords->y1; in lv_draw_label() 177 pos.x += (lv_area_get_width(coords) - line_width) / 2; in lv_draw_label() [all …]
|
D | lv_img_decoder.c | 544 uint32_t pos = ((y * dsc->header.w + x) * px_size) >> 3; in lv_img_decoder_built_in_line_true_color() local 545 pos += 4; /*Skip the header*/ in lv_img_decoder_built_in_line_true_color() 546 res = lv_fs_seek(&user_data->f, pos, LV_FS_SEEK_SET); in lv_img_decoder_built_in_line_true_color() 594 int8_t pos = 0; in lv_img_decoder_built_in_line_alpha() local 599 pos = 7 - (x & 0x7); in lv_img_decoder_built_in_line_alpha() 605 pos = 6 - (x & 0x3) * 2; in lv_img_decoder_built_in_line_alpha() 611 pos = 4 - (x & 0x1) * 4; in lv_img_decoder_built_in_line_alpha() 617 pos = 0; in lv_img_decoder_built_in_line_alpha() 638 uint8_t val_act = (*data_tmp >> pos) & mask; in lv_img_decoder_built_in_line_alpha() 643 pos -= px_size; in lv_img_decoder_built_in_line_alpha() [all …]
|
/lvgl-latest/src/draw/sw/ |
D | lv_draw_sw_letter.c | 31 … const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p); 34 …raw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos, 165 … const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p) in draw_letter_normal() argument 179 fill_area.x1 = pos->x; in draw_letter_normal() 180 fill_area.y1 = pos->y; in draw_letter_normal() 181 fill_area.x2 = pos->x + g->box_w - 1; in draw_letter_normal() 182 fill_area.y2 = pos->y + g->box_h - 1; in draw_letter_normal() 241 int32_t col_start = pos->x >= draw_ctx->clip_area->x1 ? 0 : draw_ctx->clip_area->x1 - pos->x; in draw_letter_normal() 242 …int32_t col_end = pos->x + box_w <= draw_ctx->clip_area->x2 ? box_w : draw_ctx->clip_area->x2 - … in draw_letter_normal() 243 int32_t row_start = pos->y >= draw_ctx->clip_area->y1 ? 0 : draw_ctx->clip_area->y1 - pos->y; in draw_letter_normal() [all …]
|
/lvgl-latest/src/draw/renesas/ |
D | lv_gpu_d2_draw_label.c | 44 … const lv_point_t * pos, lv_font_glyph_dsc_t * g, const uint8_t * map_p) in draw_letter_normal() argument 58 fill_area.x1 = pos->x; in draw_letter_normal() 59 fill_area.y1 = pos->y; in draw_letter_normal() 60 fill_area.x2 = pos->x + g->box_w - 1; in draw_letter_normal() 61 fill_area.y2 = pos->y + g->box_h - 1; in draw_letter_normal() 120 int32_t col_start = pos->x >= draw_ctx->clip_area->x1 ? 0 : draw_ctx->clip_area->x1 - pos->x; in draw_letter_normal() 121 …int32_t col_end = pos->x + box_w <= draw_ctx->clip_area->x2 ? box_w : draw_ctx->clip_area->x2 - … in draw_letter_normal() 122 int32_t row_start = pos->y >= draw_ctx->clip_area->y1 ? 0 : draw_ctx->clip_area->y1 - pos->y; in draw_letter_normal() 123 …int32_t row_end = pos->y + box_h <= draw_ctx->clip_area->y2 ? box_h : draw_ctx->clip_area->y2 - … in draw_letter_normal() 146 fill_area.x1 = col_start + pos->x; in draw_letter_normal() [all …]
|
/lvgl-latest/src/widgets/ |
D | lv_label.h | 181 void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t * pos); 198 bool lv_label_is_char_under_pos(const lv_obj_t * obj, lv_point_t * pos); 225 void lv_label_ins_text(lv_obj_t * obj, uint32_t pos, const char * txt); 234 void lv_label_cut_text(lv_obj_t * obj, uint32_t pos, uint32_t cnt);
|
D | lv_textarea.c | 139 lv_label_ins_text(ta->label, ta->cursor.pos, letter_buf); /*Insert the character*/ in lv_textarea_add_char() 149 _lv_txt_ins(ta->pwd_tmp, ta->cursor.pos, (const char *)letter_buf); in lv_textarea_add_char() 190 lv_label_ins_text(ta->label, ta->cursor.pos, txt); in lv_textarea_add_text() 199 _lv_txt_ins(ta->pwd_tmp, ta->cursor.pos, txt); in lv_textarea_add_text() 216 uint32_t cur_pos = ta->cursor.pos; in lv_textarea_del_char() 228 _lv_txt_cut(label_txt, ta->cursor.pos - 1, 1); in lv_textarea_del_char() 241 _lv_txt_cut(ta->pwd_tmp, ta->cursor.pos - 1, 1); in lv_textarea_del_char() 249 lv_textarea_set_cursor_pos(obj, ta->cursor.pos - 1); in lv_textarea_del_char() 344 void lv_textarea_set_cursor_pos(lv_obj_t * obj, int32_t pos) in lv_textarea_set_cursor_pos() argument 349 if((uint32_t)ta->cursor.pos == (uint32_t)pos) return; in lv_textarea_set_cursor_pos() [all …]
|
D | lv_label.c | 286 void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t * pos) in lv_label_get_letter_pos() argument 289 LV_ASSERT_NULL(pos); in lv_label_get_letter_pos() 296 pos->y = 0; in lv_label_get_letter_pos() 299 pos->x = 0; in lv_label_get_letter_pos() 302 pos->x = lv_obj_get_content_width(obj); in lv_label_get_letter_pos() 305 pos->x = lv_obj_get_content_width(obj) / 2; in lv_label_get_letter_pos() 392 pos->x = x; in lv_label_get_letter_pos() 393 pos->y = y; in lv_label_get_letter_pos() 406 lv_point_t pos; in lv_label_get_letter_on() local 407 pos.x = pos_in->x - lv_obj_get_style_pad_left(obj, LV_PART_MAIN); in lv_label_get_letter_on() [all …]
|
D | lv_textarea.h | 52 uint32_t pos; /*The current cursor position member 142 void lv_textarea_set_cursor_pos(lv_obj_t * obj, int32_t pos);
|
/lvgl-latest/src/extra/widgets/spinbox/ |
D | lv_spinbox.c | 160 void lv_spinbox_set_cursor_pos(lv_obj_t * obj, uint8_t pos) in lv_spinbox_set_cursor_pos() argument 166 int32_t new_step = spinbox->step * lv_pow(10, pos); in lv_spinbox_set_cursor_pos() 167 if(pos <= 0) spinbox->step = 1; in lv_spinbox_set_cursor_pos() 392 if(txt[spinbox->ta.cursor.pos] == '.') { in lv_spinbox_event() 395 else if(spinbox->ta.cursor.pos == (uint32_t)txt_len) { in lv_spinbox_event() 398 else if(spinbox->ta.cursor.pos == 0 && spinbox->range_min < 0) { in lv_spinbox_event() 403 uint16_t cp = spinbox->ta.cursor.pos; in lv_spinbox_event() 405 if(spinbox->ta.cursor.pos > spinbox->dec_point_pos && spinbox->dec_point_pos != 0) cp--; in lv_spinbox_event() 406 uint32_t pos = len - cp; in lv_spinbox_event() local 408 if(spinbox->range_min < 0) pos++; in lv_spinbox_event() [all …]
|
/lvgl-latest/src/extra/libs/fsdrv/ |
D | lv_fs_fatfs.c | 35 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 185 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence) in fs_seek() argument 190 f_lseek(file_p, pos); in fs_seek() 193 f_lseek(file_p, f_tell((FIL *)file_p) + pos); in fs_seek() 196 f_lseek(file_p, f_size((FIL *)file_p) + pos); in fs_seek()
|
D | lv_fs_littlefs.c | 38 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 221 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence) in fs_seek() argument 229 lfs_soff_t result = lfs_file_seek(lfs_p, file_p, pos, lfs_whence); in fs_seek()
|
D | lv_fs_posix.c | 41 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 175 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence) in fs_seek() argument 178 off_t offset = lseek((lv_uintptr_t)file_p, pos, whence); in fs_seek()
|
D | lv_fs_stdio.c | 44 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 177 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence) in fs_seek() argument 180 fseek(file_p, pos, whence); in fs_seek()
|
D | lv_fs_win32.c | 39 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 291 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence) in fs_seek() argument 307 distance_to_move.QuadPart = pos; in fs_seek()
|
/lvgl-latest/src/misc/ |
D | lv_fs.c | 245 lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence) in lv_fs_seek() argument 259 file_p->cache->file_position = pos; in lv_fs_seek() 269 file_p->cache->file_position += pos; in lv_fs_seek() 280 res = file_p->drv->seek_cb(file_p->drv, file_p->file_d, pos, whence); in lv_fs_seek() 294 res = file_p->drv->seek_cb(file_p->drv, file_p->file_d, pos, whence); in lv_fs_seek() 300 lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos) in lv_fs_tell() argument 303 *pos = 0; in lv_fs_tell() 308 *pos = 0; in lv_fs_tell() 314 *pos = file_p->cache->file_position; in lv_fs_tell() 318 res = file_p->drv->tell_cb(file_p->drv, file_p->file_d, pos); in lv_fs_tell()
|
D | lv_fs.h | 78 …lv_fs_res_t (*seek_cb)(struct _lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t when… 191 lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); 199 lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos);
|
D | lv_txt.c | 413 void _lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt) in _lv_txt_ins() argument 422 …pos = _lv_txt_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of l… in _lv_txt_ins() 426 for(i = new_len; i >= pos + ins_len; i--) { in _lv_txt_ins() 431 lv_memcpy_small(txt_buf + pos, ins_txt, ins_len); in _lv_txt_ins() 434 void _lv_txt_cut(char * txt, uint32_t pos, uint32_t len) in _lv_txt_cut() argument 440 pos = _lv_txt_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/ in _lv_txt_cut() 441 len = _lv_txt_encoded_get_byte_id(&txt[pos], len); in _lv_txt_cut() 445 for(i = pos; i <= old_len - len; i++) { in _lv_txt_cut()
|
D | lv_txt.h | 131 void _lv_txt_ins(char * txt_buf, uint32_t pos, const char * ins_txt); 140 void _lv_txt_cut(char * txt, uint32_t pos, uint32_t len);
|
/lvgl-latest/src/extra/widgets/span/ |
D | lv_span.c | 929 lv_point_t pos; in lv_draw_span() local 930 pos.x = txt_pos.x; in lv_draw_span() 931 … pos.y = txt_pos.y + max_line_h - pinfo->line_h - (max_baseline - pinfo->font->base_line); in lv_draw_span() 953 if(pos.x > clip_area.x2) { in lv_draw_span() 961 if(pos.x + letter_w + pinfo->letter_space < clip_area.x1) { in lv_draw_span() 963 pos.x = pos.x + letter_w + pinfo->letter_space; in lv_draw_span() 968 if(ellipsis_valid && pos.x + letter_w + pinfo->letter_space > ellipsis_width) { in lv_draw_span() 970 lv_draw_letter(draw_ctx, &label_draw_dsc, &pos, '.'); in lv_draw_span() 971 pos.x = pos.x + dot_letter_w + pinfo->letter_space; in lv_draw_span() 973 if(pos.x <= ellipsis_width) { in lv_draw_span() [all …]
|
/lvgl-latest/src/extra/widgets/colorwheel/ |
D | lv_colorwheel.c | 347 knob_area.x1 = obj->coords.x1 + colorwheel->knob.pos.x - r - left; in get_knob_area() 348 knob_area.y1 = obj->coords.y1 + colorwheel->knob.pos.y - r - right; in get_knob_area() 349 knob_area.x2 = obj->coords.x1 + colorwheel->knob.pos.x + r + top; in get_knob_area() 350 knob_area.y2 = obj->coords.y1 + colorwheel->knob.pos.y + r + bottom; in get_knob_area() 556 colorwheel->knob.pos.x = (((int32_t)r * lv_trigo_sin(angle)) >> LV_TRIGO_SHIFT); in refr_knob_pos() 557 colorwheel->knob.pos.y = (((int32_t)r * lv_trigo_cos(angle)) >> LV_TRIGO_SHIFT); in refr_knob_pos() 558 colorwheel->knob.pos.x = colorwheel->knob.pos.x + w / 2; in refr_knob_pos() 559 colorwheel->knob.pos.y = colorwheel->knob.pos.y + w / 2; in refr_knob_pos()
|
D | lv_colorwheel.h | 40 lv_point_t pos; member
|
/lvgl-latest/examples/porting/ |
D | lv_port_fs_template.c | 32 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 187 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence)
|
/lvgl-latest/src/extra/libs/png/ |
D | lodepng.c | 1477 size_t pos = values->size; in addLengthDistance() local 1481 values->data[pos + 0] = length_code + FIRST_LENGTH_CODE_INDEX; in addLengthDistance() 1482 values->data[pos + 1] = extra_length; in addLengthDistance() 1483 values->data[pos + 2] = dist_code; in addLengthDistance() 1484 values->data[pos + 3] = extra_distance; in addLengthDistance() 1543 static unsigned getHash(const unsigned char* data, size_t size, size_t pos) { in getHash() argument 1545 if(pos + 2 < size) { in getHash() 1550 result ^= ((unsigned)data[pos + 0] << 0u); in getHash() 1551 result ^= ((unsigned)data[pos + 1] << 4u); in getHash() 1552 result ^= ((unsigned)data[pos + 2] << 8u); in getHash() [all …]
|
/lvgl-latest/examples/widgets/textarea/ |
D | lv_example_textarea_3.py | 5 pos = ta.get_cursor_pos()
|
/lvgl-latest/examples/widgets/list/ |
D | lv_example_list_2.c | 67 const uint32_t pos = lv_obj_get_child_cnt(parent) / 2; in event_handler_center() local 69 lv_obj_move_to_index(currentButton, pos); in event_handler_center()
|