r16123 by fschmid - Final fixes for PS and PDF export.
scribus-commit
scribus-commit at lists.scribus.net
Mon Dec 20 23:37:37 CET 2010
Author: fschmid
Date: Mon Dec 20 22:37:37 2010
New Revision: 16123
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16123
Log:
Final fixes for PS and PDF export.
Improvements for SVG export.
Modified:
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
trunk/Scribus/scribus/pslib.cpp
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16123&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Mon Dec 20 22:37:37 2010
@@ -2492,8 +2492,8 @@
if (ite->imageFlippedV())
PutPage("1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n");
QTransform trans;
+ trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
trans.translate(0.0, -ite->height());
- trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
trans.translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
PutPage(FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n");
for (int em = 0; em < pat.items.count(); ++em)
@@ -2538,8 +2538,8 @@
if (ite->imageFlippedV())
PutPage("1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n");
QTransform trans;
+ trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
trans.translate(0.0, -ite->height());
- trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
trans.translate(ite->groupItemList.at(0)->gXpos, -ite->groupItemList.at(0)->gYpos);
PutPage(FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n");
for (int em = 0; em < ite->groupItemList.count(); ++em)
@@ -4226,8 +4226,8 @@
if (ite->imageFlippedV())
tmp += "1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n";
QTransform trans;
+ trans.scale(ite->width() / pat.width, ite->height() / pat.height);
trans.translate(0.0, -ite->height());
- trans.scale(ite->width() / pat.width, ite->height() / pat.height);
trans.translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
tmp += FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n";
for (int em = 0; em < pat.items.count(); ++em)
@@ -4272,8 +4272,8 @@
if (ite->imageFlippedV())
tmp += "1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n";
QTransform trans;
+ trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
trans.translate(0.0, -ite->height());
- trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
trans.translate(ite->groupItemList.at(0)->gXpos, -ite->groupItemList.at(0)->gYpos);
tmp += FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n";
for (int em = 0; em < ite->groupItemList.count(); ++em)
Modified: trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16123&path=/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp Mon Dec 20 22:37:37 2010
@@ -414,7 +414,8 @@
if (Item->fillTransparency() != 0)
ob.setAttribute("opacity", FToStr(1.0 - Item->fillTransparency()));
}
- ob.setAttribute("transform", trans);
+ QString tr = trans + QString(" scale(%1, %2)").arg(Item->width() / Item->groupWidth).arg(Item->height() / Item->groupHeight);
+ ob.setAttribute("transform", tr);
ob.setAttribute("style", "fill:none; stroke:none");
QDomElement obc = docu.createElement("clipPath");
obc.setAttribute("id", "Clip"+IToStr(ClipCount));
Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16123&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Mon Dec 20 22:37:37 2010
@@ -2608,8 +2608,8 @@
PS_translate(0, -c->height());
PS_scale(1, -1);
}
+ PS_scale(c->width() / pat.width, c->height() / pat.height);
PS_translate(0, -c->height());
- PS_scale(c->width() / pat.width, c->height() / pat.height);
PS_translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
for (int em = 0; em < pat.items.count(); ++em)
{
@@ -2637,8 +2637,8 @@
PS_translate(0, -c->height());
PS_scale(1, -1);
}
+ PS_scale(c->width() / c->groupWidth, c->height() / c->groupHeight);
PS_translate(0, -c->height());
- PS_scale(c->width() / c->groupWidth, c->height() / c->groupHeight);
for (int em = 0; em < c->groupItemList.count(); ++em)
{
PageItem* embed = c->groupItemList.at(em);
More information about the scribus-commit
mailing list