r20662 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 4 19:13:48 UTC 2016


Author: fschmid
Date: Mon Jan  4 19:13:47 2016
New Revision: 20662

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20662
Log:
Fixed incorrect paragraph background rendering.

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
    trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20662&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Mon Jan  4 19:13:47 2016
@@ -3730,7 +3730,10 @@
 						y2 = ls.y;
 						descent = ls.descent;
 						if ((llp + 1) < textLayout.lines())
-							descent += LineStyle.lineSpacing() - (ls.descent + textLayout.line(llp + 1).ascent);
+						{
+							if ((textLayout.line(llp + 1).lastItem - textLayout.line(llp + 1).firstItem) > 0)
+								descent += LineStyle.lineSpacing() - (ls.descent + textLayout.line(llp + 1).ascent);
+						}
 						llp++;
 						break;
 					}

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20662&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Mon Jan  4 19:13:47 2016
@@ -5412,7 +5412,10 @@
 						y2 = ls.y;
 						descent = ls.descent;
 						if ((llp + 1) < ite->textLayout.lines())
-							descent += LineStyle.lineSpacing() - (ls.descent + ite->textLayout.line(llp + 1).ascent);
+						{
+							if ((ite->textLayout.line(llp + 1).lastItem - ite->textLayout.line(llp + 1).firstItem) > 0)
+								descent += LineStyle.lineSpacing() - (ls.descent + ite->textLayout.line(llp + 1).ascent);
+						}
 						llp++;
 						break;
 					}

Modified: trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20662&path=/trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/export/svgexplugin/svgexplugin.cpp	Mon Jan  4 19:13:47 2016
@@ -1220,7 +1220,10 @@
 					y2 = ls.y;
 					descent = ls.descent;
 					if ((llp + 1) < Item->textLayout.lines())
-						descent += LineStyle.lineSpacing() - (ls.descent + Item->textLayout.line(llp + 1).ascent);
+					{
+						if ((Item->textLayout.line(llp + 1).lastItem - Item->textLayout.line(llp + 1).firstItem) > 0)
+							descent += LineStyle.lineSpacing() - (ls.descent + Item->textLayout.line(llp + 1).ascent);
+					}
 					llp++;
 					break;
 				}

Modified: trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20662&path=/trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/export/xpsexport/xpsexplugin.cpp	Mon Jan  4 19:13:47 2016
@@ -924,7 +924,10 @@
 					y2 = ls.y;
 					descent = ls.descent;
 					if ((llp + 1) < Item->textLayout.lines())
-						descent += LineStyle.lineSpacing() - (ls.descent + Item->textLayout.line(llp + 1).ascent);
+					{
+						if ((Item->textLayout.line(llp + 1).lastItem - Item->textLayout.line(llp + 1).firstItem) > 0)
+							descent += LineStyle.lineSpacing() - (ls.descent + Item->textLayout.line(llp + 1).ascent);
+					}
 					llp++;
 					break;
 				}
@@ -1246,6 +1249,9 @@
 					else
 						pts.translate(0, -(chs / 10.0));
 					pts.translate(CurX, ls.y);
+					// Fix for drop caps ???
+					if (ls.isFirstLine && Item->itemText.paragraphStyle(ls.firstItem).hasDropCap() && (txItem.index == ls.firstItem))
+						pts.translate(0, -ls.ascent);
 					if (txItem.style.effects() & (ScStyle_Subscript | ScStyle_Superscript))
 						pts.translate(0, txItem.glyphs->yoffset);
 					if ((txItem.style.effects() & ScStyle_Shadowed) && (txItem.style.strokeColor() != CommonStrings::None))

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20662&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Mon Jan  4 19:13:47 2016
@@ -5098,7 +5098,10 @@
 					y2 = ls.y;
 					descent = ls.descent;
 					if ((llp + 1) < ite->textLayout.lines())
-						descent += LineStyle.lineSpacing() - (ls.descent + ite->textLayout.line(llp + 1).ascent);
+					{
+						if ((ite->textLayout.line(llp + 1).lastItem - ite->textLayout.line(llp + 1).firstItem) > 0)
+							descent += LineStyle.lineSpacing() - (ls.descent + ite->textLayout.line(llp + 1).ascent);
+					}
 					llp++;
 					break;
 				}




More information about the scribus-commit mailing list