r14575 by fschmid - DRW Importer: more fixes for line widths.
scribus-commit
scribus-commit at lists.scribus.net
Mon Jan 25 13:55:22 CET 2010
Revision: 14575
Author: fschmid
Date: 2010-01-25T12:52:27.166296Z
Commit message: DRW Importer: more fixes for line widths.
Changeset:
M /trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
Diffs:
Index: scribus/plugins/import/drw/importdrw.cpp
===================================================================
--- scribus/plugins/import/drw/importdrw.cpp (revision 14574)
+++ scribus/plugins/import/drw/importdrw.cpp (revision 14575)
@@ -417,7 +417,7 @@
void DrwPlug::decodeCmd(quint8 cmd, int pos)
{
recordCount++;
-/* if ((recordCount > 9) && (recordCount < 12))
+/* if ((recordCount > 83) && (recordCount < 91))
{
QFile f(QString("/home/franz/cmddatas%1.bin").arg(recordCount));
f.open(QIODevice::WriteOnly);
@@ -821,12 +821,12 @@
uint selectedItemCount = tmpSel->count();
if (selectedItemCount > 0)
{
+ double scx = 1.0;
+ double scy = 1.0;
if ((tmpSel->width() != 0) && (tmpSel->height() != 0) && (popped.width != 0) && (popped.height != 0))
{
- double scx = 1.0;
if (tmpSel->width() != popped.width)
scx = popped.width / tmpSel->width();
- double scy = 1.0;
if (tmpSel->height() != popped.height)
scy = popped.height / tmpSel->height();
m_Doc->scaleGroup(scx, scy, true, tmpSel);
@@ -875,6 +875,7 @@
ite->setWidthHeight(wh.x(),wh.y());
ite->setFillColor(popped.fillColor);
ite->setLineWidth(popped.lineWidth);
+ ite->setLineWidth(ite->lineWidth() / qMin(scx, scy));
handleLineStyle(ite, popped.flags, popped.lineColor);
handleGradient(ite, popped.patternIndex, popped.fillColor, popped.backColor, QRectF(0, 0, ite->width(), ite->height()));
groupStack.top().GElements.append(ite);
@@ -1639,6 +1640,7 @@
scy = ite->height() / bb.height();
// qDebug() << scx << scy;
ite->PoLine.scale(scx, scy);
+ ite->setLineWidth(ite->lineWidth() / qMin(scx, scy));
}
ite->OldB2 = ite->width();
ite->OldH2 = ite->height();
More information about the scribus-commit
mailing list