diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-03-03 14:31:37 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-03-03 14:31:37 +0100 |
commit | 563d68d3f39d1d261a29ee567e911f0e42113b1d (patch) | |
tree | fa03494ac2042d0d3516757e28b2fab93c512c0b | |
parent | 5bbfc5de114b7ff0e14272575b78b82a693f7980 (diff) |
Fix line width
-rw-r--r-- | src/render.c | 3 | ||||
-rw-r--r-- | src/wrap.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c index ef98e07..124c3f4 100644 --- a/src/render.c +++ b/src/render.c @@ -106,7 +106,8 @@ static void render_lines(struct frame *fr, cairo_t *cr) double asc = pango_units_to_double(fr->lines[i].ascent); cairo_move_to(cr, 0, y_pos+asc+0.5); - cairo_line_to(cr, fr->lines[i].width, y_pos+asc+0.5); + cairo_line_to(cr, pango_units_to_double(fr->lines[i].width), + y_pos+asc+0.5); cairo_set_source_rgb(cr, 0.0, 0.0, 1.0); cairo_set_line_width(cr, 1.0); cairo_stroke(cr); @@ -75,7 +75,7 @@ struct wrap_box struct wrap_line { - int width; + int width; /* Pango units */ int height; /* Pango units */ int ascent; /* Pango units */ |