File diff r18639:abf73430e6ba → r18640:cd857e155af2
src/graph_gui.cpp
Show inline comments
 
@@ -419,6 +419,9 @@ protected:
 
		}
 

	
 
		/* 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. */
 
@@ -455,10 +458,10 @@ protected:
 
						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;