From 799cfdd15ab369580b2283200c3aca6866214b59 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 16 Apr 2012 16:00:36 -0400 Subject: [PATCH] Make page progression be right to left for vertical text --- util/view-cairo.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/view-cairo.cc b/util/view-cairo.cc index ce578ed..6b5b3f1 100644 --- a/util/view-cairo.cc +++ b/util/view-cairo.cc @@ -109,18 +109,18 @@ view_cairo_t::draw (cairo_t *cr) cairo_translate (cr, margin.l, margin.t); double descent; if (vertical) - descent = font_extents.height * .5; + descent = font_extents.height * (lines->len + .5); else descent = font_extents.height - font_extents.ascent; - cairo_translate (cr, v * -descent, h * -descent); + cairo_translate (cr, v * descent, h * -descent); for (unsigned int i = 0; i < lines->len; i++) { helper_cairo_line_t &l = g_array_index (lines, helper_cairo_line_t, i); if (i) - cairo_translate (cr, v * line_space, h * line_space); + cairo_translate (cr, v * -line_space, h * line_space); - cairo_translate (cr, v * font_extents.height, h * font_extents.height); + cairo_translate (cr, v * -font_extents.height, h * font_extents.height); if (annotate) { cairo_save (cr); -- 2.7.4