/lvgl-latest/src/draw/ |
D | lv_draw_label.c | 237 lv_point_t pos; in lv_draw_label_iterate_characters() local 238 lv_point_set(&pos, coords->x1, coords->y1); in lv_draw_label_iterate_characters() 244 pos.y += y_ofs; in lv_draw_label_iterate_characters() 261 pos.y += dsc->hint->y; in lv_draw_label_iterate_characters() 270 while(pos.y + line_height_font < draw_unit->clip_area->y1) { in lv_draw_label_iterate_characters() 274 pos.y += line_height; in lv_draw_label_iterate_characters() 277 if(dsc->hint && pos.y >= -LV_LABEL_HINT_UPDATE_TH && dsc->hint->line_start < 0) { in lv_draw_label_iterate_characters() 279 dsc->hint->y = pos.y - coords->y1; in lv_draw_label_iterate_characters() 291 pos.x += (lv_area_get_width(coords) - line_width) / 2; in lv_draw_label_iterate_characters() 298 pos.x += lv_area_get_width(coords) - line_width; in lv_draw_label_iterate_characters() [all …]
|
/lvgl-latest/src/draw/nema_gfx/ |
D | lv_draw_nema_gfx_label.c | 84 …c void _draw_letter(lv_draw_unit_t * draw_unit, lv_draw_glyph_dsc_t * dsc, const lv_point_t * pos, 159 lv_point_t pos = {glyph_draw_dsc->letter_coords->x1, glyph_draw_dsc->letter_coords->y1}; in _draw_nema_gfx_outline() local 167 nema_mat3x3_translate(matrix, pos.x - glyph_draw_dsc->g->ofs_x, in _draw_nema_gfx_outline() 168 pos.y + glyph_draw_dsc->g->box_h + glyph_draw_dsc->g->ofs_y); in _draw_nema_gfx_outline() 427 lv_point_t pos; in _draw_label_iterate_characters() local 428 lv_point_set(&pos, coords->x1, coords->y1); in _draw_label_iterate_characters() 434 pos.y += y_ofs; in _draw_label_iterate_characters() 451 pos.y += dsc->hint->y; in _draw_label_iterate_characters() 460 while(pos.y + line_height_font < draw_unit->clip_area->y1) { in _draw_label_iterate_characters() 464 pos.y += line_height; in _draw_label_iterate_characters() [all …]
|
/lvgl-latest/src/libs/fsdrv/ |
D | lv_fs_memfs.c | 66 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 172 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 179 fp->cache->file_position = pos; in fs_seek() 183 fp->cache->file_position += pos; in fs_seek() 187 fp->cache->file_position = fp->cache->end - pos; in fs_seek()
|
D | lv_fs_fatfs.c | 40 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 192 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 197 f_lseek(file_p, pos); in fs_seek() 200 f_lseek(file_p, f_tell((FIL *)file_p) + pos); in fs_seek() 203 f_lseek(file_p, f_size((FIL *)file_p) + pos); in fs_seek()
|
D | lv_fs_uefi.c | 61 static lv_fs_res_t lv_fs_uefi_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_… 249 static lv_fs_res_t lv_fs_uefi_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_… in lv_fs_uefi_seek_cb() argument 268 if(new_pos < pos) { in lv_fs_uefi_seek_cb() 272 new_pos -= pos; in lv_fs_uefi_seek_cb() 276 new_pos = pos; in lv_fs_uefi_seek_cb() 284 new_pos += pos; in lv_fs_uefi_seek_cb() 302 UINT64 pos; in lv_fs_uefi_tell_cb() local 308 &pos); in lv_fs_uefi_tell_cb() 311 if(pos > UINT32_MAX) return LV_FS_RES_UNKNOWN; in lv_fs_uefi_tell_cb() 313 *pos_p = (uint32_t) pos; in lv_fs_uefi_tell_cb()
|
D | lv_fs_arduino_esp_littlefs.cpp | 23 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 153 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 166 int rc = lf->file.seek(pos, mode); in fs_seek()
|
D | lv_fs_arduino_sd.cpp | 23 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 145 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 158 int rc = lf->file.seek(pos, mode); in fs_seek()
|
D | lv_fs_littlefs.c | 26 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 160 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 173 int rc = lfs_file_seek(lfs, &lf->file, pos, mode); in fs_seek()
|
D | lv_fs_posix.c | 46 static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 206 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 225 off_t offset = lseek(fd, pos, w); in fs_seek()
|
/lvgl-latest/src/widgets/label/ |
D | lv_label.h | 165 void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t * pos); 183 bool lv_label_is_char_under_pos(const lv_obj_t * obj, lv_point_t * pos); 217 void lv_label_ins_text(lv_obj_t * obj, uint32_t pos, const char * txt); 226 void lv_label_cut_text(lv_obj_t * obj, uint32_t pos, uint32_t cnt);
|
D | lv_label.c | 301 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 304 LV_ASSERT_NULL(pos); in lv_label_get_letter_pos() 311 pos->y = 0; in lv_label_get_letter_pos() 314 pos->x = 0; in lv_label_get_letter_pos() 317 pos->x = lv_obj_get_content_width(obj); in lv_label_get_letter_pos() 320 pos->x = lv_obj_get_content_width(obj) / 2; in lv_label_get_letter_pos() 323 pos->x = 0; in lv_label_get_letter_pos() 401 pos->x = x; in lv_label_get_letter_pos() 402 pos->y = y; in lv_label_get_letter_pos() 416 lv_point_t pos; in lv_label_get_letter_on() local [all …]
|
/lvgl-latest/tests/src/test_cases/ |
D | test_fs.c | 229 int32_t pos = 500; in test_write_read_random() local 230 res = lv_fs_seek(&f, pos, LV_FS_SEEK_SET); in test_write_read_random() 240 TEST_ASSERT(0 == memcmp(buf, buf1000 + pos, amount)); in test_write_read_random() 241 pos += amount; in test_write_read_random() 246 buf1000[pos + k] = n; in test_write_read_random() 252 pos += amount; in test_write_read_random() 255 pos += amount; /* amount may be negative */ in test_write_read_random() 256 res = lv_fs_seek(&f, pos, LV_FS_SEEK_SET); in test_write_read_random()
|
/lvgl-latest/src/widgets/textarea/ |
D | lv_textarea.c | 247 lv_label_ins_text(ta->label, ta->cursor.pos, letter_buf); /*Insert the character*/ in lv_textarea_add_char() 257 lv_text_ins(ta->pwd_tmp, ta->cursor.pos, (const char *)letter_buf); in lv_textarea_add_char() 298 lv_label_ins_text(ta->label, ta->cursor.pos, txt); in lv_textarea_add_text() 307 lv_text_ins(ta->pwd_tmp, ta->cursor.pos, txt); in lv_textarea_add_text() 324 uint32_t cur_pos = ta->cursor.pos; in lv_textarea_delete_char() 336 lv_text_cut(label_txt, ta->cursor.pos - 1, 1); in lv_textarea_delete_char() 349 lv_text_cut(ta->pwd_tmp, ta->cursor.pos - 1, 1); in lv_textarea_delete_char() 357 lv_textarea_set_cursor_pos(obj, ta->cursor.pos - 1); in lv_textarea_delete_char() 451 void lv_textarea_set_cursor_pos(lv_obj_t * obj, int32_t pos) in lv_textarea_set_cursor_pos() argument 456 if((uint32_t)ta->cursor.pos == (uint32_t)pos) return; in lv_textarea_set_cursor_pos() [all …]
|
D | lv_textarea_private.h | 43 uint32_t pos; /**< The current cursor position member
|
/lvgl-latest/src/widgets/spinbox/ |
D | lv_spinbox.c | 133 void lv_spinbox_set_cursor_pos(lv_obj_t * obj, uint32_t pos) in lv_spinbox_set_cursor_pos() argument 139 const int32_t new_step = lv_pow(10, pos); in lv_spinbox_set_cursor_pos() 141 if(pos <= 0) spinbox->step = 1; in lv_spinbox_set_cursor_pos() 344 if(txt[spinbox->ta.cursor.pos] == '.') { in lv_spinbox_event() 348 else if(spinbox->ta.cursor.pos == (uint32_t)txt_len) { in lv_spinbox_event() 352 else if(spinbox->ta.cursor.pos == 0 && spinbox->range_min < 0) { in lv_spinbox_event() 357 uint32_t cp = spinbox->ta.cursor.pos; in lv_spinbox_event() 358 if(spinbox->ta.cursor.pos > spinbox->dec_point_pos && spinbox->dec_point_pos != 0) cp--; in lv_spinbox_event() 361 uint32_t pos = len - cp; in lv_spinbox_event() local 363 if(spinbox->range_min < 0) pos++; in lv_spinbox_event() [all …]
|
/lvgl-latest/src/libs/freetype/ |
D | lv_ftsystem.c | 101 stream->pos = 0; in FT_Stream_Open() 116 uint32_t pos; in FT_Stream_Open() local 117 res = lv_fs_tell(&file, &pos); in FT_Stream_Open() 124 stream->size = pos; in FT_Stream_Open() 277 if(stream->pos != offset) in ft_lv_fs_stream_io()
|
/lvgl-latest/src/libs/thorvg/ |
D | tvgSwRle.cpp | 238 SwPoint pos; member 447 static void _setCell(RleWorker& rw, SwPoint pos) in _setCell() argument 461 pos.x -= rw.cellMin.x; in _setCell() 462 pos.y -= rw.cellMin.y; in _setCell() 464 if (pos.x > rw.cellMax.x) pos.x = rw.cellMax.x; in _setCell() 467 if (pos != rw.cellPos) { in _setCell() 474 rw.cellPos = pos; in _setCell() 475 rw.invalid = ((unsigned)pos.y >= (unsigned)rw.cellYCnt || pos.x >= rw.cellXCnt); in _setCell() 479 static void _startCell(RleWorker& rw, SwPoint pos) in _startCell() argument 481 if (pos.x > rw.cellMax.x) pos.x = rw.cellMax.x; in _startCell() [all …]
|
D | tvgSwFill.cpp | 153 auto pos = 1.5f * inc; in _updateColorTable() local 163 while (pos <= pColors->offset) { in _updateColorTable() 166 pos += inc; in _updateColorTable() 183 while (pos < next->offset && i < GRADIENT_STOP_SIZE) { in _updateColorTable() 184 auto t = (pos - curr->offset) * delta; in _updateColorTable() 192 pos += inc; in _updateColorTable() 327 static inline uint32_t _clamp(const SwFill* fill, int32_t pos) in _clamp() argument 331 if (pos >= GRADIENT_STOP_SIZE) pos = GRADIENT_STOP_SIZE - 1; in _clamp() 332 else if (pos < 0) pos = 0; in _clamp() 336 pos = pos % GRADIENT_STOP_SIZE; in _clamp() [all …]
|
/lvgl-latest/src/misc/ |
D | lv_fs.c | 41 static lv_fs_res_t lv_fs_seek_cached(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); 248 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 265 res = lv_fs_seek_cached(file_p, pos, whence); in lv_fs_seek() 268 res = file_p->drv->seek_cb(file_p->drv, file_p->file_d, pos, whence); in lv_fs_seek() 276 lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos) in lv_fs_tell() argument 279 *pos = 0; in lv_fs_tell() 284 *pos = 0; in lv_fs_tell() 292 *pos = file_p->cache->file_position; in lv_fs_tell() 296 res = file_p->drv->tell_cb(file_p->drv, file_p->file_d, pos); in lv_fs_tell() 666 static lv_fs_res_t lv_fs_seek_cached(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence) in lv_fs_seek_cached() argument [all …]
|
D | lv_fs.h | 78 lv_fs_res_t (*seek_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); 187 lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); 195 lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos);
|
D | lv_text.c | 459 void lv_text_ins(char * txt_buf, uint32_t pos, const char * ins_txt) in lv_text_ins() argument 468 …pos = lv_text_encoded_get_byte_id(txt_buf, pos); /*Convert to byte index instead of l… in lv_text_ins() 472 for(i = new_len; i >= pos + ins_len; i--) { in lv_text_ins() 477 lv_memcpy(txt_buf + pos, ins_txt, ins_len); in lv_text_ins() 480 void lv_text_cut(char * txt, uint32_t pos, uint32_t len) in lv_text_cut() argument 486 pos = lv_text_encoded_get_byte_id(txt, pos); /*Convert to byte index instead of letter index*/ in lv_text_cut() 487 len = lv_text_encoded_get_byte_id(&txt[pos], len); in lv_text_cut() 491 for(i = pos; i <= old_len - len; i++) { in lv_text_cut()
|
D | lv_text_private.h | 54 void lv_text_ins(char * txt_buf, uint32_t pos, const char * ins_txt); 63 void lv_text_cut(char * txt, uint32_t pos, uint32_t len);
|
/lvgl-latest/src/draw/vg_lite/ |
D | lv_draw_vg_lite_label.c | 306 const lv_point_t pos = {dsc->letter_coords->x1, dsc->letter_coords->y1}; in draw_letter_outline() local 316 vg_lite_translate(pos.x - dsc->g->ofs_x, pos.y + dsc->g->box_h + dsc->g->ofs_y, &matrix); in draw_letter_outline() 320 …vg_lite_translate(pos.x - dsc->g->ofs_x + dsc->pivot.x, pos.y + dsc->g->box_h + dsc->g->ofs_y, &ma… in draw_letter_outline()
|
/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); 186 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/libs/lodepng/ |
D | lodepng.c | 1561 size_t pos = values->size; in addLengthDistance() local 1565 values->data[pos + 0] = length_code + FIRST_LENGTH_CODE_INDEX; in addLengthDistance() 1566 values->data[pos + 1] = extra_length; in addLengthDistance() 1567 values->data[pos + 2] = dist_code; in addLengthDistance() 1568 values->data[pos + 3] = extra_distance; in addLengthDistance() 1629 static unsigned getHash(const unsigned char * data, size_t size, size_t pos) in getHash() argument 1632 if(pos + 2 < size) { in getHash() 1637 result ^= ((unsigned)data[pos + 0] << 0u); in getHash() 1638 result ^= ((unsigned)data[pos + 1] << 4u); in getHash() 1639 result ^= ((unsigned)data[pos + 2] << 8u); in getHash() [all …]
|