mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-10 09:26:10 +00:00
overlay: Improve the horizontal fit of the charts
Notably fix the fill boundary to not extend past the right hand side of the chart. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f185f46114
commit
b79a28355d
@ -138,7 +138,7 @@ void chart_draw(struct chart *chart, cairo_t *cr)
|
||||
|
||||
cairo_translate(cr, chart->x, chart->y + chart->h);
|
||||
cairo_scale(cr,
|
||||
chart->w / (double)chart->num_samples,
|
||||
chart->w / (double)(chart->num_samples-1),
|
||||
-chart->h / (chart->range[1] - chart->range[0]));
|
||||
|
||||
x = 0;
|
||||
@ -162,7 +162,7 @@ void chart_draw(struct chart *chart, cairo_t *cr)
|
||||
n, value_at(chart, i + n));
|
||||
}
|
||||
if (chart->mode != CHART_STROKE)
|
||||
cairo_line_to(cr, max, 0);
|
||||
cairo_line_to(cr, n-1, 0);
|
||||
|
||||
cairo_identity_matrix(cr);
|
||||
cairo_set_line_width(cr, chart->stroke_width);
|
||||
|
Loading…
x
Reference in New Issue
Block a user