From 69d5af93169ea2d87276b65d43c889a359d5d81e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 9 Apr 2015 15:17:16 -0700 Subject: [PATCH] [util] Minor --- util/view-cairo.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/view-cairo.cc b/util/view-cairo.cc index 160250e2d..578c17a12 100644 --- a/util/view-cairo.cc +++ b/util/view-cairo.cc @@ -77,12 +77,10 @@ view_cairo_t::draw (cairo_t *cr) cairo_font_extents_t font_extents; cairo_font_extents (cr, &font_extents); cairo_translate (cr, view_options.margin.l, view_options.margin.t); - double descent; if (vertical) - descent = font_extents.height * (lines->len + .5); + cairo_translate (cr, font_extents.height * (lines->len + .5), 0); else - descent = font_extents.height - font_extents.ascent; - cairo_translate (cr, v * descent, h * -descent); + cairo_translate (cr, 0, -(font_extents.height - font_extents.ascent)); for (unsigned int i = 0; i < lines->len; i++) { helper_cairo_line_t &l = g_array_index (lines, helper_cairo_line_t, i);