Lines Matching refs:cursor
452 lv_chart_cursor_t * cursor = _lv_ll_ins_head(&chart->cursor_ll); in lv_chart_add_cursor() local
453 LV_ASSERT_MALLOC(cursor); in lv_chart_add_cursor()
454 if(cursor == NULL) return NULL; in lv_chart_add_cursor()
456 cursor->pos.x = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
457 cursor->pos.y = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
458 cursor->point_id = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
459 cursor->pos_set = 0; in lv_chart_add_cursor()
460 cursor->color = color; in lv_chart_add_cursor()
461 cursor->dir = dir; in lv_chart_add_cursor()
463 return cursor; in lv_chart_add_cursor()
473 void lv_chart_set_cursor_pos(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_point_t * pos) in lv_chart_set_cursor_pos() argument
475 LV_ASSERT_NULL(cursor); in lv_chart_set_cursor_pos()
478 cursor->pos.x = pos->x; in lv_chart_set_cursor_pos()
479 cursor->pos.y = pos->y; in lv_chart_set_cursor_pos()
480 cursor->pos_set = 1; in lv_chart_set_cursor_pos()
491 void lv_chart_set_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_chart_series_t * se… in lv_chart_set_cursor_point() argument
493 LV_ASSERT_NULL(cursor); in lv_chart_set_cursor_point()
496 cursor->point_id = point_id; in lv_chart_set_cursor_point()
497 cursor->pos_set = 0; in lv_chart_set_cursor_point()
499 cursor->ser = ser; in lv_chart_set_cursor_point()
509 lv_point_t lv_chart_get_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor) in lv_chart_get_cursor_point() argument
511 LV_ASSERT_NULL(cursor); in lv_chart_get_cursor_point()
514 return cursor->pos; in lv_chart_get_cursor_point()
1281 lv_chart_cursor_t * cursor; in draw_cursors() local
1307 _LV_LL_READ_BACK(&chart->cursor_ll, cursor) { in draw_cursors()
1310 line_dsc_tmp.color = cursor->color; in draw_cursors()
1311 point_dsc_tmp.bg_color = cursor->color; in draw_cursors()
1318 if(cursor->pos_set) { in draw_cursors()
1319 cx = cursor->pos.x; in draw_cursors()
1320 cy = cursor->pos.y; in draw_cursors()
1323 if(cursor->point_id == LV_CHART_POINT_NONE) continue; in draw_cursors()
1325 lv_chart_get_point_pos_by_id(obj, cursor->ser, cursor->point_id, &p); in draw_cursors()
1347 if(cursor->dir & LV_DIR_HOR) { in draw_cursors()
1348 p1.x = cursor->dir & LV_DIR_LEFT ? obj->coords.x1 : cx; in draw_cursors()
1350 p2.x = cursor->dir & LV_DIR_RIGHT ? obj->coords.x2 : cx; in draw_cursors()
1363 if(cursor->dir & LV_DIR_VER) { in draw_cursors()
1365 p1.y = cursor->dir & LV_DIR_TOP ? obj->coords.y1 : cy; in draw_cursors()
1367 p2.y = cursor->dir & LV_DIR_BOTTOM ? obj->coords.y2 : cy; in draw_cursors()