diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-30 23:58:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-30 23:58:26 +0100 |
commit | 13fe2afbddd19feef1516121a8279fe3ddf359bd (patch) | |
tree | 04c10e040a9c617f2c7292f0e384df4bea6767fd | |
parent | aba8a4c897b97aba9bc798567b2a9a52eac79351 (diff) |
chart: align the background grid correctly to the pixels
-rw-r--r-- | chart-demo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chart-demo.c b/chart-demo.c index 248937a..84a1825 100644 --- a/chart-demo.c +++ b/chart-demo.c @@ -158,13 +158,13 @@ bg_draw (struct device *device, cairo_t *cr) cairo_paint (cr); for (x = 50; x < device->width; x += 50) { - cairo_move_to (cr, x, 0); - cairo_line_to (cr, x, device->height); + cairo_move_to (cr, x+.5, 0); + cairo_line_to (cr, x+.5, device->height); } for (y = 50; y < device->height; y += 50) { - cairo_move_to (cr, 0, y); - cairo_line_to (cr, device->width, y); + cairo_move_to (cr, 0, y+.5); + cairo_line_to (cr, device->width, y+.5); } cairo_set_line_width (cr, 1.); |