From a46559ea015abc9f37045ddf8cf03e2857620ce5 Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 21 Sep 2007 18:13:25 +0000 Subject: [PATCH] Fixed: padding_top was added to the bottom instead of the top git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@737 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/render/text/viewer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/text/viewer.cpp b/src/render/text/viewer.cpp index 536984cd..9b8a92d5 100644 --- a/src/render/text/viewer.cpp +++ b/src/render/text/viewer.cpp @@ -655,14 +655,14 @@ void TextViewer::alignLines(RotatedDC& dc, const vector& chars, const -RealSize(style.padding_left+style.padding_right, style.padding_top + style.padding_bottom)); if (style.paragraph_height <= 0) { // whole text box alignment - alignParagraph(0, lines.size(), chars, style, RealRect(RealPoint(0,0),s)); + alignParagraph(0, lines.size(), chars, style, RealRect(RealPoint(0,style.padding_top),s)); } else { // per paragraph alignment size_t start = 0; int n = 0; for (size_t last = 0 ; last < lines.size() ; ++last) { if (lines[last].break_after != BREAK_SOFT || last == lines.size()) { - alignParagraph(start, last + 1, chars, style, RealRect(0, n*style.paragraph_height, s.width, style.paragraph_height)); + alignParagraph(start, last + 1, chars, style, RealRect(0, style.padding_top+n*style.paragraph_height, s.width, style.paragraph_height)); start = last + 1; ++n; }