|
@@ -416,12 +416,15 @@ protected:
|
|
|
label += this->x_values_increment;
|
|
|
x += x_sep;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* draw lines and dots */
|
|
|
uint linewidth = _settings_client.gui.graph_line_thickness;
|
|
|
uint pointoffs1 = (linewidth + 1) / 2;
|
|
|
uint pointoffs2 = linewidth + 1 - pointoffs1;
|
|
|
for (int i = 0; i < this->num_dataset; i++) {
|
|
|
if (!HasBit(this->excluded_data, i)) {
|
|
|
/* Centre the dot between the grid lines. */
|
|
|
x = r.left + (x_sep / 2);
|
|
|
|
|
|
byte colour = this->colours[i];
|
|
@@ -452,16 +455,16 @@ protected:
|
|
|
} else {
|
|
|
datapoint >>= reduce_range;
|
|
|
}
|
|
|
y = r.top + x_axis_offset - ((r.bottom - r.top) * datapoint) / (interval_size >> reduce_range);
|
|
|
|
|
|
/* Draw the point. */
|
|
|
GfxFillRect(x - 2, y - 2, x + 2, y + 2, colour);
|
|
|
GfxFillRect(x - pointoffs1, y - pointoffs1, x + pointoffs2, y + pointoffs2, colour);
|
|
|
|
|
|
/* Draw the line connected to the previous point. */
|
|
|
if (prev_x != INVALID_DATAPOINT_POS) GfxDrawLine(prev_x, prev_y, x, y, colour, 3);
|
|
|
if (prev_x != INVALID_DATAPOINT_POS) GfxDrawLine(prev_x, prev_y, x, y, colour, linewidth);
|
|
|
|
|
|
prev_x = x;
|
|
|
prev_y = y;
|
|
|
} else {
|
|
|
prev_x = INVALID_DATAPOINT_POS;
|
|
|
prev_y = INVALID_DATAPOINT_POS;
|