aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-03-03 14:31:37 +0100
committerThomas White <taw@bitwiz.org.uk>2013-03-03 14:31:37 +0100
commit563d68d3f39d1d261a29ee567e911f0e42113b1d (patch)
treefa03494ac2042d0d3516757e28b2fab93c512c0b
parent5bbfc5de114b7ff0e14272575b78b82a693f7980 (diff)
Fix line width
-rw-r--r--src/render.c3
-rw-r--r--src/wrap.h2
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);
diff --git a/src/wrap.h b/src/wrap.h
index 85609a3..9e744ac 100644
--- a/src/wrap.h
+++ b/src/wrap.h
@@ -75,7 +75,7 @@ struct wrap_box
struct wrap_line
{
- int width;
+ int width; /* Pango units */
int height; /* Pango units */
int ascent; /* Pango units */