Lines Matching refs:cursor
453 lv_chart_cursor_t * cursor = _lv_ll_ins_head(&chart->cursor_ll); in lv_chart_add_cursor() local
454 LV_ASSERT_MALLOC(cursor); in lv_chart_add_cursor()
455 if(cursor == NULL) return NULL; in lv_chart_add_cursor()
457 cursor->pos.x = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
458 cursor->pos.y = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
459 cursor->point_id = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
460 cursor->pos_set = 0; in lv_chart_add_cursor()
461 cursor->color = color; in lv_chart_add_cursor()
462 cursor->dir = dir; in lv_chart_add_cursor()
464 return cursor; in lv_chart_add_cursor()
474 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
476 LV_ASSERT_NULL(cursor); in lv_chart_set_cursor_pos()
479 cursor->pos.x = pos->x; in lv_chart_set_cursor_pos()
480 cursor->pos.y = pos->y; in lv_chart_set_cursor_pos()
481 cursor->pos_set = 1; in lv_chart_set_cursor_pos()
493 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
495 LV_ASSERT_NULL(cursor); in lv_chart_set_cursor_point()
498 cursor->point_id = point_id; in lv_chart_set_cursor_point()
499 cursor->pos_set = 0; in lv_chart_set_cursor_point()
501 cursor->ser = ser; in lv_chart_set_cursor_point()
511 lv_point_t lv_chart_get_cursor_point(lv_obj_t * chart, lv_chart_cursor_t * cursor) in lv_chart_get_cursor_point() argument
513 LV_ASSERT_NULL(cursor); in lv_chart_get_cursor_point()
516 return cursor->pos; in lv_chart_get_cursor_point()
1284 lv_chart_cursor_t * cursor; in draw_cursors() local
1310 _LV_LL_READ_BACK(&chart->cursor_ll, cursor) { in draw_cursors()
1313 line_dsc_tmp.color = cursor->color; in draw_cursors()
1314 point_dsc_tmp.bg_color = cursor->color; in draw_cursors()
1321 if(cursor->pos_set) { in draw_cursors()
1322 cx = cursor->pos.x; in draw_cursors()
1323 cy = cursor->pos.y; in draw_cursors()
1326 if(cursor->point_id == LV_CHART_POINT_NONE) continue; in draw_cursors()
1328 lv_chart_get_point_pos_by_id(obj, cursor->ser, cursor->point_id, &p); in draw_cursors()
1350 if(cursor->dir & LV_DIR_HOR) { in draw_cursors()
1351 p1.x = cursor->dir & LV_DIR_LEFT ? obj->coords.x1 : cx; in draw_cursors()
1353 p2.x = cursor->dir & LV_DIR_RIGHT ? obj->coords.x2 : cx; in draw_cursors()
1366 if(cursor->dir & LV_DIR_VER) { in draw_cursors()
1368 p1.y = cursor->dir & LV_DIR_TOP ? obj->coords.y1 : cy; in draw_cursors()
1370 p2.y = cursor->dir & LV_DIR_BOTTOM ? obj->coords.y2 : cy; in draw_cursors()