Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 21 → Rev 22

/trunk/Scribus/ChangeLogCVS
1,4 → 1,7
Changes since Version 0.9.10
01.06.2003 svgexplugin.cpp Added Support for Images.
page.cpp Fixed Crash when loading Documents with Images.
 
31.05.2003 svgexplugin.cpp Moved the SVG-Export Plugin to the Main Package
and added Support for Gradients and combined Polygons.
 
/trunk/Scribus/scribus/scribus.cpp
5151,6 → 5151,7
qApp->setOverrideCursor(QCursor(arrowCursor), true);
return false;
}
delete dd;
closePSDriver();
qApp->setOverrideCursor(QCursor(arrowCursor), true);
return true;
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.h
32,6 → 32,7
void SetTextProps(QDomElement *tp, struct Pti *hl, ScribusApp *plug);
QString SetFarbe(QString farbe, int shad, ScribusApp *plug);
int GradCount;
int ClipCount;
};
 
#endif // CMSPLUG_H
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
21,6 → 21,7
#include <qfile.h>
#include <qtextstream.h>
extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level);
extern QString Path2Relative(QString Path);
 
QString Name()
{
68,9 → 69,12
elem.setAttribute("width", plug->doc->PageB);
elem.setAttribute("height", plug->doc->PageH);
Page *Seite;
Seite = plug->doc->ActPage;
GradCount = 0;
ClipCount = 0;
Seite = plug->view->MasterPages.at(plug->view->MasterNames[plug->doc->ActPage->MPageNam]);
ProcessPage(plug, Seite, &docu, &elem);
Seite = plug->doc->ActPage;
ProcessPage(plug, Seite, &docu, &elem);
QFile f(fName);
if(!f.open(IO_WriteOnly))
return;
84,7 → 88,7
 
void SVGExPlug::ProcessPage(ScribusApp *plug, Page *Seite, QDomDocument *docu, QDomElement *elem)
{
QString tmp, trans, fill, stroke, strokeW, strokeLC, strokeLJ, strokeDA, gradi;
QString tmp, trans, fill, stroke, strokeW, strokeLC, strokeLJ, strokeDA, gradi, Clipi;
uint d;
struct Pti *hl;
int Lnr = 0;
95,6 → 99,7
QDomText tp1;
PageItem *Item;
gradi = "Grad";
Clipi = "Clip";
for (uint la = 0; la < plug->doc->Layers.count(); la++)
{
Level2Layer(plug->doc, &ll, Lnr);
116,6 → 121,7
else
grad = docu->createElement("linearGradient");
grad.setAttribute("id", gradi+IToStr(GradCount));
grad.setAttribute("gradientUnits", "userSpaceOnUse");
switch (Item->GrType)
{
case 1:
160,7 → 166,7
fill = "fill:url(#"+gradi+IToStr(GradCount)+");";
GradCount++;
}
fill += " fill-rule:even-odd;";
fill += " fill-rule:evenodd;";
if (Item->Transparency != 0)
fill += " fill-opacity:"+FToStr(1.0 - Item->Transparency)+";";
}
174,7 → 180,7
}
else
stroke = "stroke:none;";
trans = "translate("+FToStr(Item->Xpos)+" "+FToStr(Item->Ypos)+")";
trans = "translate("+FToStr(Item->Xpos)+", "+FToStr(Item->Ypos)+")";
if (Item->Rot != 0)
trans += " rotate("+FToStr(Item->Rot)+")";
strokeW = "stroke-width:"+FToStr(Item->Pwidth)+";";
252,6 → 258,30
ob.setAttribute("d", SetClipPath(Item)+"Z");
break;
case 2:
if (Item->Pcolor != "None")
{
ob = docu->createElement("path");
ob.setAttribute("d", SetClipPath(Item)+"Z");
ob.setAttribute("style", fill);
gr.appendChild(ob);
}
if ((Item->PicAvail) && (Item->Pfile != ""))
{
/* ob = docu->createElement("clipPath");
ob.setAttribute("id", Clipi+IToStr(ClipCount));
ob.setAttribute("clipPathUnits", "userSpaceOnUse");
QDomElement cl = docu->createElement("path");
cl.setAttribute("d", SetClipPath(Item)+"Z");
ob.appendChild(cl);
gr.appendChild(ob);
ob = docu->createElement("image");
ob.setAttribute("clip-path", "url(#"+Clipi+IToStr(ClipCount)+")");
ob.setAttribute("clip-rule", "evenodd"); */
ob = docu->createElement("image");
ob.setAttribute("transform", "translate("+FToStr(Item->LocalX)+", "+FToStr(Item->LocalY)+") scale("+FToStr(Item->LocalScX)+", "+FToStr(Item->LocalScY)+")");
ob.setAttribute("xlink:href", Path2Relative(Item->Pfile));
ClipCount++;
}
break;
case 7:
ob = docu->createElement("path");
/trunk/Scribus/scribus/page.cpp
6567,7 → 6567,8
Items.at(ItNr)->PicAvail = false;
Items.at(ItNr)->PicArt = false;
}
emit HaveSel(2);
if (!doku->loading)
emit HaveSel(2);
return;
}
if ((ext == "eps") || (ext == "ps"))
6705,7 → 6706,8
Items.at(ItNr)->PicAvail = false;
Items.at(ItNr)->PicArt = false;
}
emit HaveSel(2);
if (!doku->loading)
emit HaveSel(2);
return;
}
#ifdef HAVE_TIFF
6848,7 → 6850,8
}
Items.at(ItNr)->flippedH = 0;
Items.at(ItNr)->flippedV = 0;
emit HaveSel(2);
if (!doku->loading)
emit HaveSel(2);
emit DocChanged();
}