r17100 by fschmid - Fixed incorrect positioning of glyph outlines of pathtexts when exporting to ps and pdf.

scribus-commit scribus-commit at lists.scribus.net
Sun Dec 18 16:33:23 UTC 2011


Author: fschmid
Date: Sun Dec 18 16:33:23 2011
New Revision: 17100

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17100
Log:
Fixed incorrect positioning of glyph outlines of pathtexts when exporting to ps and pdf.

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/pslib.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17100&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sun Dec 18 16:33:23 2011
@@ -1089,6 +1089,11 @@
 	if (frameOverflows())
 		return itemText.length()-MaxChars;
 	return 0;
+}
+
+int PageItem::maxCharsInFrame()
+{
+	return MaxChars;
 }
 
 /// returns true if text is ending before that frame

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17100&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Sun Dec 18 16:33:23 2011
@@ -359,6 +359,7 @@
 	virtual void layout() {}
 	/// returns frame where is text end
 	PageItem * frameTextEnd();
+	int maxCharsInFrame();
 	/// returns true if text overflows
 	bool frameOverflows() const;
 	bool frameUnderflows() const;

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17100&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sun Dec 18 16:33:23 2011
@@ -4900,7 +4900,7 @@
 		ite->asPathText()->layout();
 		ite->OwnPage = savedOwnPage;
 		double CurX = 0;
-		for (int d = 0; d < ite->asPathText()->itemRenderText.length(); ++d)
+		for (int d = 0; d < ite->maxCharsInFrame(); ++d)
 		{
 			const ScText * const hl = ite->asPathText()->itemRenderText.item(d);
 			const QChar ch = hl->ch;
@@ -5404,8 +5404,6 @@
 					}
 					else
 					{
-						if (ite->BaseOffs != 0)
-							tmp2 += "1 0 0 1 0 "+FToStr( -ite->BaseOffs)+" cm\n";
 						tmp2 += FToStr(tsz / 10.0)+" 0 0 "+FToStr(tsz / 10.0)+" 0 "+FToStr(tsz / 10.0)+" cm\n";
 					}
 					if (hl->glyph.scaleV != 1.0)

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17100&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Sun Dec 18 16:33:23 2011
@@ -2201,7 +2201,7 @@
 			c->OwnPage = PNr-1;
 			c->asPathText()->layout();
 			c->OwnPage = savedOwnPage;
-			for (d = 0; d < c->asPathText()->itemRenderText.length(); ++d)
+			for (d = 0; d < c->maxCharsInFrame(); ++d)
 			{
 				hl = c->asPathText()->itemRenderText.item(d);
 				const CharStyle & style(c->asPathText()->itemRenderText.charStyle(d));
@@ -2958,7 +2958,7 @@
 				ite->OwnPage = PNr;
 				ite->asPathText()->layout();
 				ite->OwnPage = savedOwnPage;
-				for (d = 0; d < ite->asPathText()->itemRenderText.length(); ++d)
+				for (d = 0; d < ite->maxCharsInFrame(); ++d)
 				{
 					hl = ite->asPathText()->itemRenderText.item(d);
 					const CharStyle & style(ite->asPathText()->itemRenderText.charStyle(d));




More information about the scribus-commit mailing list