Lines Matching full:x

41 static uint32_t get_index_from_x(lv_obj_t * obj, lv_coord_t x);
278 p_out->x = 0; in lv_chart_get_point_pos_by_id()
287 p_out->x = (w * id) / (chart->point_cnt - 1); in lv_chart_get_point_pos_by_id()
290 …p_out->x = lv_map(ser->x_points[id], chart->xmin[ser->x_axis_sec], chart->xmax[ser->x_axis_sec], 0… in lv_chart_get_point_pos_by_id()
294 /*Gap between the column on the X tick*/ in lv_chart_get_point_pos_by_id()
297 /*Gap between the columns on adjacent X ticks*/ in lv_chart_get_point_pos_by_id()
309 p_out->x = (int32_t)((int32_t)(w + block_gap) * id) / chart->point_cnt; in lv_chart_get_point_pos_by_id()
310 p_out->x += block_w * ser_idx / ser_cnt; in lv_chart_get_point_pos_by_id()
313 p_out->x += col_w / 2; in lv_chart_get_point_pos_by_id()
317 p_out->x += lv_obj_get_style_pad_left(obj, LV_PART_MAIN) + border_width; in lv_chart_get_point_pos_by_id()
318 p_out->x -= lv_obj_get_scroll_left(obj); in lv_chart_get_point_pos_by_id()
456 cursor->pos.x = LV_CHART_POINT_NONE; in lv_chart_add_cursor()
478 cursor->pos.x = pos->x; in lv_chart_set_cursor_pos()
720 p.x -= obj->coords.x1; in lv_chart_event()
721 uint32_t id = get_index_from_x(obj, p.x + lv_obj_get_scroll_left(obj)); in lv_chart_event()
742 p->x = ((int32_t)lv_obj_get_content_width(obj) * chart->zoom_x) >> 8; in lv_chart_event()
805 p1.x = obj->coords.x1; in draw_div_lines()
806 p2.x = obj->coords.x2; in draw_div_lines()
844 p1.x = (int32_t)((int32_t)w * i) / (chart->vdiv_cnt - 1); in draw_div_lines()
845 p1.x += x_ofs; in draw_div_lines()
846 p2.x = p1.x; in draw_div_lines()
921 p1.x = x_ofs; in draw_series_line()
922 p2.x = x_ofs; in draw_series_line()
943 p1.x = p2.x; in draw_series_line()
946 if(p1.x > clip_area_ori->x2 + point_w + 1) break; in draw_series_line()
947 p2.x = ((w * i) / (chart->point_cnt - 1)) + x_ofs; in draw_series_line()
955 if(p2.x < clip_area_ori->x1 - point_w - 1) { in draw_series_line()
964 … /*Draw only one vertical line between the min and max y-values on the same x-value*/ in draw_series_line()
967 if(p1.x != p2.x) { in draw_series_line()
969 p2.x--; /*It's already on the next x value*/ in draw_series_line()
970 p1.x = p2.x; in draw_series_line()
975 p2.x++; /*Compensate the previous x--*/ in draw_series_line()
976 y_min = y_cur; /*Start the line of the next x from the current last y*/ in draw_series_line()
983 point_area.x1 = p1.x - point_w; in draw_series_line()
984 point_area.x2 = p1.x + point_w; in draw_series_line()
1016 point_area.x1 = p2.x - point_w; in draw_series_line()
1017 point_area.x2 = p2.x + point_w; in draw_series_line()
1083 p1.x = x_ofs; in draw_series_scatter()
1084 p2.x = x_ofs; in draw_series_scatter()
1089 …p2.x = lv_map(ser->x_points[p_act], chart->xmin[ser->x_axis_sec], chart->xmax[ser->x_axis_sec], 0,… in draw_series_scatter()
1090 p2.x += x_ofs; in draw_series_scatter()
1097 p2.x = LV_COORD_MIN; in draw_series_scatter()
1111 p1.x = p2.x; in draw_series_scatter()
1120 …p2.x = lv_map(ser->x_points[p_act], chart->xmin[ser->x_axis_sec], chart->xmax[ser->x_axis_sec], 0,… in draw_series_scatter()
1121 p2.x += x_ofs; in draw_series_scatter()
1131 point_area.x1 = p1.x - point_w; in draw_series_scatter()
1132 point_area.x2 = p1.x + point_w; in draw_series_scatter()
1161 point_area.x1 = p2.x - point_w; in draw_series_scatter()
1162 point_area.x2 = p2.x + point_w; in draw_series_scatter()
1200 … LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/ in draw_series_bar()
1203 … LV_PART_ITEMS) * chart->zoom_x) >> 8; /*Gap between the columns on the ~same X*/ in draw_series_bar()
1319 cx = cursor->pos.x; in draw_cursors()
1326 cx = p.x; 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()
1364 p1.x = cx; in draw_cursors()
1366 p2.x = p1.x; in draw_cursors()
1447 p1.x = x_ofs; in draw_y_ticks()
1450 if(axis == LV_CHART_AXIS_PRIMARY_Y) p1.x--; in draw_y_ticks()
1451 else p1.x++; in draw_y_ticks()
1457 if(major) p2.x = p1.x - major_len; /*major tick*/ in draw_y_ticks()
1458 else p2.x = p1.x - minor_len; /*minor tick*/ in draw_y_ticks()
1486 a.x1 = p2.x - size.x - label_gap; in draw_y_ticks()
1487 a.x2 = p2.x - label_gap; in draw_y_ticks()
1490 a.x1 = p2.x + label_gap; in draw_y_ticks()
1491 a.x2 = p2.x + size.x + label_gap; in draw_y_ticks()
1573 … LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the columns on ~adjacent X*/ in draw_x_ticks()
1585 /*draw a line at moving x position*/ in draw_x_ticks()
1586 p2.x = p1.x = x_ofs + (int32_t)((int32_t)(w - line_dsc.width) * i) / total_tick_num; in draw_x_ticks()
1620 a.x1 = (p2.x - size.x / 2); in draw_x_ticks()
1621 a.x2 = (p2.x + size.x / 2); in draw_x_ticks()
1643 if(p1.x + line_dsc.width / 2 >= obj->coords.x1 && in draw_x_ticks()
1644 p2.x - line_dsc.width / 2 <= obj->coords.x2) { in draw_x_ticks()
1661 * Get the nearest index to an X coordinate
1666 static uint32_t get_index_from_x(lv_obj_t * obj, lv_coord_t x) in get_index_from_x() argument
1671 x -= pad_left; in get_index_from_x()
1673 if(x < 0) return 0; in get_index_from_x()
1674 if(x > w) return chart->point_cnt - 1; in get_index_from_x()
1675 if(chart->type == LV_CHART_TYPE_LINE) return (x * (chart->point_cnt - 1) + w / 2) / w; in get_index_from_x()
1676 if(chart->type == LV_CHART_TYPE_BAR) return (x * chart->point_cnt) / w; in get_index_from_x()
1722 … LV_PART_MAIN) * chart->zoom_x) >> 8; /*Gap between the column on ~adjacent X*/ in invalidate_point()