Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4579 → Rev 4580

/branches/Version13x/Scribus/scribus/fileloader.cpp
1957,7 → 1957,7
currItem->BBoxH = obj->attribute("BBOXH").toDouble(); */
currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
currItem->Pwidth = pw;
currItem->setLineWidth(pw);
if (currItem->pixm.imgInfo.layerInfo.count() != 0)
{
bool found = false;
2284,7 → 2284,7
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
else
{
int ph = static_cast<int>(QMAX(1.0, currItem->Pwidth / 2.0));
int ph = static_cast<int>(QMAX(1.0, currItem->lineWidth() / 2.0));
currItem->Segments.clear();
currItem->PoLine.resize(0);
currItem->Clip.setPoints(4, -ph,-ph, static_cast<int>(currItem->width()+ph),-ph,
/branches/Version13x/Scribus/scribus/mpalette.cpp
2476,7 → 2476,7
{
double lineCorr;
if (CurItem->lineColor() != CommonStrings::None)
lineCorr = CurItem->Pwidth;
lineCorr = CurItem->lineWidth();
else
lineCorr = 0;
double newWidth = dGap->value() / Umrech;
/branches/Version13x/Scribus/scribus/pageitem_line.cpp
87,7 → 87,7
QWMatrix arrowTrans;
FPointArray arrow = (*m_Doc->arrowStyles.at(m_startArrowIndex-1)).points.copy();
arrowTrans.translate(0, 0);
arrowTrans.scale(Pwidth, Pwidth);
arrowTrans.scale(m_lineWidth, m_lineWidth);
arrowTrans.scale(-1,1);
arrow.map(arrowTrans);
p->setBrush(p->pen());
102,7 → 102,7
QWMatrix arrowTrans;
FPointArray arrow = (*m_Doc->arrowStyles.at(m_endArrowIndex-1)).points.copy();
arrowTrans.translate(Width, 0);
arrowTrans.scale(Pwidth, Pwidth);
arrowTrans.scale(m_lineWidth, m_lineWidth);
arrow.map(arrowTrans);
p->setBrush(p->pen());
p->setBrushOpacity(1.0 - lineTransparency());
/branches/Version13x/Scribus/scribus/pdflib.cpp
1093,10 → 1093,11
int y = static_cast<int>(pag->yOffset());
int w = static_cast<int>(pag->width());
int h1 = static_cast<int>(pag->height());
int x2 = static_cast<int>(ite->BoundingX - ite->Pwidth / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ite->Pwidth / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ite->Pwidth);
int h2 = static_cast<int>(ite->BoundingH + ite->Pwidth);
double ilw=ite->lineWidth();
int x2 = static_cast<int>(ite->BoundingX - ilw / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ilw / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ilw);
int h2 = static_cast<int>(ite->BoundingH + ilw);
if (!QRect(x, y, w, h1).intersects(QRect(x2, y2, w2, h2)))
continue;
if (ite->ChangedMasterItem)
1117,7 → 1118,7
PutPage(putColor(ite->fillColor(), ite->fillShade(), true));
if (ite->lineColor() != CommonStrings::None)
PutPage(putColor(ite->lineColor(), ite->lineShade(), false));
Inhalt += FToStr(fabs(ite->Pwidth))+" w\n";
Inhalt += FToStr(fabs(ite->lineWidth()))+" w\n";
if (ite->DashValues.count() != 0)
{
PutPage("[ ");
1132,8 → 1133,8
}
else
{
QString Dt = FToStr(QMAX(2*fabs(ite->Pwidth), 1));
QString Da = FToStr(QMAX(6*fabs(ite->Pwidth), 1));
QString Dt = FToStr(QMAX(2*fabs(ite->lineWidth()), 1));
QString Da = FToStr(QMAX(6*fabs(ite->lineWidth()), 1));
switch (ite->PLineArt)
{
case Qt::SolidLine:
1225,7 → 1226,7
PutPage("Q\n");
if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
1267,7 → 1268,7
QWMatrix arrowTrans;
FPointArray arrow = (*doc.arrowStyles.at(ite->startArrowIndex()-1)).points.copy();
arrowTrans.translate(0, 0);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrowTrans.scale(-1,1);
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
1293,7 → 1294,7
QWMatrix arrowTrans;
FPointArray arrow = (*doc.arrowStyles.at(ite->endArrowIndex()-1)).points.copy();
arrowTrans.translate(ite->width(), 0);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
{
1329,7 → 1330,7
}
if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
1362,7 → 1363,7
}
if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
PutPage(SetClipPath(ite, false));
PutPage("S\n");
1391,7 → 1392,7
FPointArray arrow = (*doc.arrowStyles.at(ite->startArrowIndex()-1)).points.copy();
arrowTrans.translate(Start.x(), Start.y());
arrowTrans.rotate(r);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
{
1427,7 → 1428,7
FPointArray arrow = (*doc.arrowStyles.at(ite->endArrowIndex()-1)).points.copy();
arrowTrans.translate(End.x(), End.y());
arrowTrans.rotate(r);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
{
1459,7 → 1460,7
PutPage("q\n");
if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
PutPage(SetClipPath(ite, false));
PutPage("S\n");
1738,7 → 1739,7
PutPage(putColor(ite->fillColor(), ite->fillShade(), true));
if (ite->lineColor() != CommonStrings::None)
PutPage(putColor(ite->lineColor(), ite->lineShade(), false));
Inhalt += FToStr(fabs(ite->Pwidth))+" w\n";
Inhalt += FToStr(fabs(ite->lineWidth()))+" w\n";
if (ite->DashValues.count() != 0)
{
PutPage("[ ");
1753,8 → 1754,8
}
else
{
QString Dt = FToStr(QMAX(2*fabs(ite->Pwidth), 1));
QString Da = FToStr(QMAX(6*fabs(ite->Pwidth), 1));
QString Dt = FToStr(QMAX(2*fabs(ite->lineWidth()), 1));
QString Da = FToStr(QMAX(6*fabs(ite->lineWidth()), 1));
switch (ite->PLineArt)
{
case Qt::SolidLine:
1823,7 → 1824,7
PutPage("Q\n");
if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
PutPage(SetClipPath(ite));
PutPage("h\nS\n");
1860,7 → 1861,7
PutPage(putColor(ite->fillColor(), ite->fillShade(), true));
if (ite->lineColor() != CommonStrings::None)
PutPage(putColor(ite->lineColor(), ite->lineShade(), false));
Inhalt += FToStr(fabs(ite->Pwidth))+" w\n";
Inhalt += FToStr(fabs(ite->lineWidth()))+" w\n";
if (ite->DashValues.count() != 0)
{
PutPage("[ ");
1875,8 → 1876,8
}
else
{
QString Dt = FToStr(QMAX(2*fabs(ite->Pwidth), 1));
QString Da = FToStr(QMAX(6*fabs(ite->Pwidth), 1));
QString Dt = FToStr(QMAX(2*fabs(ite->lineWidth()), 1));
QString Da = FToStr(QMAX(6*fabs(ite->lineWidth()), 1));
switch (ite->PLineArt)
{
case Qt::SolidLine:
2004,10 → 2005,11
int y = static_cast<int>(pag->yOffset());
int w = static_cast<int>(pag->width());
int h1 = static_cast<int>(pag->height());
int x2 = static_cast<int>(ite->BoundingX - ite->Pwidth / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ite->Pwidth / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ite->Pwidth);
int h2 = static_cast<int>(ite->BoundingH + ite->Pwidth);
double ilw=ite->lineWidth();
int x2 = static_cast<int>(ite->BoundingX - ilw / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ilw / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ilw);
int h2 = static_cast<int>(ite->BoundingH + ilw);
if (!QRect(x, y, w, h1).intersects(QRect(x2, y2, w2, h2)))
continue;
if (ite->ChangedMasterItem)
2026,7 → 2028,7
PutPage(putColor(ite->fillColor(), ite->fillShade(), true));
if (ite->lineColor() != CommonStrings::None)
PutPage(putColor(ite->lineColor(), ite->lineShade(), false));
Inhalt += FToStr(fabs(ite->Pwidth))+" w\n";
Inhalt += FToStr(fabs(ite->lineWidth()))+" w\n";
if (ite->DashValues.count() != 0)
{
PutPage("[ ");
2041,8 → 2043,8
}
else
{
QString Dt = FToStr(QMAX(2*fabs(ite->Pwidth), 1));
QString Da = FToStr(QMAX(6*fabs(ite->Pwidth), 1));
QString Dt = FToStr(QMAX(2*fabs(ite->lineWidth()), 1));
QString Da = FToStr(QMAX(6*fabs(ite->lineWidth()), 1));
switch (ite->PLineArt)
{
case Qt::SolidLine:
2135,10 → 2137,11
int y = static_cast<int>(pag->yOffset());
int w = static_cast<int>(pag->width());
int h1 = static_cast<int>(pag->height());
int x2 = static_cast<int>(ite->BoundingX - ite->Pwidth / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ite->Pwidth / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ite->Pwidth);
int h2 = static_cast<int>(ite->BoundingH + ite->Pwidth);
double ilw=ite->lineWidth();
int x2 = static_cast<int>(ite->BoundingX - ilw / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ilw / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ilw);
int h2 = static_cast<int>(ite->BoundingH + ilw);
if (!QRect(x, y, w, h1).intersects(QRect(x2, y2, w2, h2)))
return tmp;
if (ite->ChangedMasterItem)
2159,7 → 2162,7
tmp += putColor(ite->fillColor(), ite->fillShade(), true);
if (ite->lineColor() != CommonStrings::None)
tmp += putColor(ite->lineColor(), ite->lineShade(), false);
tmp += FToStr(fabs(ite->Pwidth))+" w\n";
tmp += FToStr(fabs(ite->lineWidth()))+" w\n";
if (ite->DashValues.count() != 0)
{
tmp += "[ ";
2174,8 → 2177,8
}
else
{
QString Dt = FToStr(QMAX(2*fabs(ite->Pwidth), 1));
QString Da = FToStr(QMAX(6*fabs(ite->Pwidth), 1));
QString Dt = FToStr(QMAX(2*fabs(ite->lineWidth()), 1));
QString Da = FToStr(QMAX(6*fabs(ite->lineWidth()), 1));
switch (ite->PLineArt)
{
case Qt::SolidLine:
2270,7 → 2273,7
tmp += "Q\n";
if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
tmp += SetClipPath(ite);
tmp += "h\nS\n";
2312,7 → 2315,7
tmp += "Q\n";
if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
tmp += SetClipPath(ite);
tmp += "h\nS\n";
2352,7 → 2355,7
QWMatrix arrowTrans;
FPointArray arrow = (*doc.arrowStyles.at(ite->startArrowIndex()-1)).points.copy();
arrowTrans.translate(0, 0);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrowTrans.scale(-1,1);
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
2378,7 → 2381,7
QWMatrix arrowTrans;
FPointArray arrow = (*doc.arrowStyles.at(ite->endArrowIndex()-1)).points.copy();
arrowTrans.translate(ite->width(), 0);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
{
2417,7 → 2420,7
}
if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
tmp += SetClipPath(ite);
tmp += "h\nS\n";
2450,7 → 2453,7
}
if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
tmp += SetClipPath(ite, false);
tmp += "S\n";
2479,7 → 2482,7
FPointArray arrow = (*doc.arrowStyles.at(ite->startArrowIndex()-1)).points.copy();
arrowTrans.translate(Start.x(), Start.y());
arrowTrans.rotate(r);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
{
2515,7 → 2518,7
FPointArray arrow = (*doc.arrowStyles.at(ite->endArrowIndex()-1)).points.copy();
arrowTrans.translate(End.x(), End.y());
arrowTrans.rotate(r);
arrowTrans.scale(ite->Pwidth, ite->Pwidth);
arrowTrans.scale(ite->lineWidth(), ite->lineWidth());
arrow.map(arrowTrans);
if ((ite->lineTransparency() != 0) && (Options.Version >= 14))
{
2547,7 → 2550,7
tmp += "q\n";
if ((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty()))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
tmp += SetClipPath(ite, false);
tmp += "S\n";
2867,7 → 2870,7
QValueList<PageItem::TabRecord> tTabValues;
double tabDist=ite->textToFrameDistLeft();
if (ite->lineColor() != CommonStrings::None)
tabDist += ite->Pwidth / 2.0;
tabDist += ite->lineWidth() / 2.0;
if (ite->itemType() == PageItem::TextFrame)
tmp += "BT\n";
// Loop over each character (!) in the pageItem...
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
2744,13 → 2744,13
newItem->Frame = true;
if (oldItem->itemType()==PageItem::PathText)
{
uint newPolyItemNo = itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->Pwidth, CommonStrings::None, currItem->lineColor(), true);
uint newPolyItemNo = itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), CommonStrings::None, currItem->lineColor(), true);
PageItem *polyLineItem = Items->at(newPolyItemNo);
polyLineItem->PoLine = currItem->PoLine.copy();
polyLineItem->ClipEdited = true;
polyLineItem->FrameType = 3;
polyLineItem->setRotation(currItem->rotation());
polyLineItem->SetPolyClip(qRound(QMAX(polyLineItem->Pwidth / 2, 1)));
polyLineItem->SetPolyClip(qRound(QMAX(polyLineItem->lineWidth() / 2, 1)));
ScMW->view->AdjustItemSize(polyLineItem);
 
newItem->setLineColor(CommonStrings::None);
2780,7 → 2780,7
case PageItem::PolyLine:
newItem->convertTo(PageItem::PolyLine);
newItem->ClipEdited = true;
newItem->SetPolyClip(qRound(QMAX(newItem->Pwidth / 2, 1)));
newItem->SetPolyClip(qRound(QMAX(newItem->lineWidth() / 2, 1)));
ScMW->view->AdjustItemSize(newItem);
break;
case PageItem::PathText:
2789,7 → 2789,7
newItem->Frame = true;
newItem->ClipEdited = true;
newItem->PoLine = secondaryItem->PoLine.copy();
newItem->Pwidth = secondaryItem->Pwidth;
newItem->setLineWidth(secondaryItem->lineWidth());
newItem->setLineColor(secondaryItem->lineColor());
newItem->PLineArt = secondaryItem->PLineArt;
newItem->PLineEnd = secondaryItem->PLineEnd;
/branches/Version13x/Scribus/scribus/pageitem_polyline.cpp
134,7 → 134,7
FPointArray arrow = (*m_Doc->arrowStyles.at(m_startArrowIndex-1)).points.copy();
arrowTrans.translate(Start.x(), Start.y());
arrowTrans.rotate(r);
arrowTrans.scale(Pwidth, Pwidth);
arrowTrans.scale(m_lineWidth, m_lineWidth);
arrow.map(arrowTrans);
p->setBrush(p->pen());
p->setBrushOpacity(1.0 - lineTransparency());
159,7 → 159,7
FPointArray arrow = (*m_Doc->arrowStyles.at(m_endArrowIndex-1)).points.copy();
arrowTrans.translate(End.x(), End.y());
arrowTrans.rotate(r);
arrowTrans.scale(Pwidth, Pwidth);
arrowTrans.scale(m_lineWidth, m_lineWidth);
arrow.map(arrowTrans);
p->setBrush(p->pen());
p->setBrushOpacity(1.0 - lineTransparency());
/branches/Version13x/Scribus/scribus/scribusXml.cpp
235,7 → 235,7
ob->setAttribute("RADRECT",item->cornerRadius());
ob->setAttribute("FRTYPE", item->FrameType);
ob->setAttribute("CLIPEDIT", item->ClipEdited ? 1 : 0);
ob->setAttribute("PWIDTH",item->Pwidth);
ob->setAttribute("PWIDTH",item->lineWidth());
ob->setAttribute("PCOLOR",item->fillColor());
ob->setAttribute("PCOLOR2",item->lineColor());
ob->setAttribute("TXTFILL",item->TxtFill);
/branches/Version13x/Scribus/scribus/pageitem.h
316,9 → 316,6
int TxtStrikeWidth;
int Cols;
double ColGap;
/** Strichstaerke */
double Pwidth;
double OldPwidth;
/** Linienart */
PenStyle PLineArt;
PenCapStyle PLineEnd;
573,7 → 570,7
void setLineStyle(PenStyle newStyle);
 
/** @brief Get the width of the line */
double lineWidth() const { return Pwidth; }
double lineWidth() const { return m_lineWidth; }
/**
* @brief Set the width of line
* @param newWidth width of line
1153,6 → 1150,10
/** Darstellungsart Bild/Titel */
bool PicArt;
/** Line width */
double m_lineWidth;
double Oldm_lineWidth;
 
signals:
//Frame signals
/branches/Version13x/Scribus/scribus/pageitem.cpp
91,8 → 91,8
TxtStrikeWidth(other.TxtStrikeWidth),
Cols(other.Cols),
ColGap(other.ColGap),
Pwidth(other.Pwidth),
OldPwidth(other.OldPwidth),
m_lineWidth(other.m_lineWidth),
Oldm_lineWidth(other.Oldm_lineWidth),
PLineArt(other.PLineArt),
PLineEnd(other.PLineEnd),
PLineJoin(other.PLineJoin),
299,8 → 299,8
GrStartY = 0;
GrEndX = w;
GrEndY = 0;
Pwidth = w2;
OldPwidth = w2;
m_lineWidth = w2;
Oldm_lineWidth = w2;
PLineArt = PenStyle(m_Doc->toolSettings.dLineArt);
PLineEnd = FlatCap;
PLineJoin = MiterJoin;
721,7 → 721,7
// p->rotate(Rot);
}
p->rotate(Rot);
p->setLineWidth(Pwidth);
p->setLineWidth(m_lineWidth);
if (GrType != 0)
{
p->setFillMode(ScPainter::Gradient);
760,11 → 760,11
}
if (lineColor() != CommonStrings::None)
{
if ((Pwidth == 0) && ! asLine())
if ((m_lineWidth == 0) && ! asLine())
p->setLineWidth(0);
else
{
p->setPen(strokeQColor, Pwidth, PLineArt, PLineEnd, PLineJoin);
p->setPen(strokeQColor, m_lineWidth, PLineArt, PLineEnd, PLineJoin);
if (DashValues.count() != 0)
p->setDash(DashValues, DashOffset);
}
786,7 → 786,7
{
if (lineColor() != CommonStrings::None)
{
p->setPen(strokeQColor, Pwidth, PLineArt, PLineEnd, PLineJoin);
p->setPen(strokeQColor, m_lineWidth, PLineArt, PLineEnd, PLineJoin);
if (DashValues.count() != 0)
p->setDash(DashValues, DashOffset);
}
925,7 → 925,7
p->scale(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->Dirty = Dirty;
double sc;
double pws = embedded->Pwidth;
double pws = embedded->m_lineWidth;
embedded->DrawObj_Pre(p, sc);
switch(embedded->itemType())
{
938,7 → 938,7
embedded->DrawObj_Item(p, e, sc);
break;
case Line:
embedded->Pwidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->m_lineWidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
//embedded->DrawObj_Line(p);
embedded->DrawObj_Item(p);
break;
947,7 → 947,7
embedded->DrawObj_Item(p);
break;
case PolyLine:
embedded->Pwidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->m_lineWidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
//embedded->DrawObj_PolyLine(p);
embedded->DrawObj_Item(p);
break;
958,10 → 958,10
default:
break;
}
embedded->Pwidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->m_lineWidth = pws * QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
embedded->DrawObj_Post(p);
p->restore();
embedded->Pwidth = pws;
embedded->m_lineWidth = pws;
for (int xxx=0; xxx<5; ++xxx)
{
m_Doc->docParagraphStyles[xxx].LineSpaMode = savedParagraphStyles[xxx].LineSpaMode;
1589,18 → 1589,19
 
void PageItem::setLineWidth(double newWidth)
{
if (Pwidth == newWidth)
if (m_lineWidth == newWidth)
return; // nothing to do -> return
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::LineWidth,
QString(Um::FromTo).arg(Pwidth).arg(newWidth),Um::ILineStyle);
QString(Um::FromTo).arg(m_lineWidth).arg(newWidth),Um::ILineStyle);
ss->set("LINE_WIDTH", "line_width");
ss->set("OLD_WIDTH", Pwidth);
ss->set("OLD_WIDTH", m_lineWidth);
ss->set("NEW_WIDTH", newWidth);
undoManager->action(this, ss);
}
Pwidth = newWidth;
Oldm_lineWidth=m_lineWidth;
m_lineWidth = newWidth;
}
 
void PageItem::setLineEnd(PenCapStyle newStyle)
2893,7 → 2894,7
Buffer->RadRect = RadRect;
Buffer->FrameType = FrameType;
Buffer->ClipEdited = ClipEdited;
Buffer->Pwidth = Pwidth;
Buffer->Pwidth = m_lineWidth;
Buffer->Pcolor = fillColor();
Buffer->Pcolor2 = lineColor();
Buffer->Shade = fillShade();
3399,10 → 3400,10
 
QRect PageItem::getRedrawBounding(const double viewScale)
{
int x = qRound(floor(BoundingX - OldPwidth / 2.0 - 5) * viewScale);
int y = qRound(floor(BoundingY - OldPwidth / 2.0 - 5) * viewScale);
int w = qRound(ceil(BoundingW + OldPwidth + 10) * viewScale);
int h = qRound(ceil(BoundingH + OldPwidth + 10) * viewScale);
int x = qRound(floor(BoundingX - Oldm_lineWidth / 2.0 - 5) * viewScale);
int y = qRound(floor(BoundingY - Oldm_lineWidth / 2.0 - 5) * viewScale);
int w = qRound(ceil(BoundingW + Oldm_lineWidth + 10) * viewScale);
int h = qRound(ceil(BoundingH + Oldm_lineWidth + 10) * viewScale);
QRect ret = QRect(x, y, w, h);
ret.moveBy(qRound(-m_Doc->minCanvasCoordinate.x() * viewScale), qRound(-m_Doc->minCanvasCoordinate.y() * viewScale));
return ret;
3604,7 → 3605,7
emit position(Xpos, Ypos);
emit widthAndHeight(Width, Height);
emit rotation(Rot);
emit lineWidth(Pwidth);
emit lineWidth(m_lineWidth);
emit lineStyleCapJoin(PLineArt, PLineEnd, PLineJoin);
emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
/branches/Version13x/Scribus/scribus/scribusview.cpp
595,7 → 595,7
currItem->SetFarbe(&tmp, currItem->lineColor(), currItem->lineShade());
if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
{
painter->setPen(tmp, currItem->Pwidth, currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
if (currItem->TopLine)
painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
if (currItem->RightLine)
690,7 → 690,7
{
horizRuler->setItemPosition(currItem->xPos(), currItem->width());
if (currItem->lineColor() != CommonStrings::None)
horizRuler->lineCorr = currItem->Pwidth / 2.0;
horizRuler->lineCorr = currItem->lineWidth() / 2.0;
else
horizRuler->lineCorr = 0;
horizRuler->ColGap = currItem->ColGap;
734,7 → 734,7
currItem->SetFarbe(&tmp, currItem->lineColor(), currItem->lineShade());
if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
{
painter->setPen(tmp, currItem->Pwidth, currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
if (currItem->TopLine)
painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
if (currItem->RightLine)
2971,7 → 2971,7
else
{
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false);
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2, 1)));
AdjustItemSize(currItem);
currItem->Sizing = ssiz;
currItem->ContourLine = currItem->PoLine.copy();
2995,7 → 2995,7
else
{
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false);
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2.0, 1)));
AdjustItemSize(currItem);
currItem->ContourLine = currItem->PoLine.copy();
}
4162,7 → 4162,7
{
cli.putPoints(0, EndInd-StartInd, Clip, StartInd);
//z = PaintPoly(currItem->xPos(), currItem->yPos(), currItem->Width, currItem->Height, currItem->Pwidth, currItem->fillColor(), currItem->lineColor());
z = Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->Pwidth, currItem->fillColor(), currItem->lineColor(), true);
z = Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), currItem->fillColor(), currItem->lineColor(), true);
bb = Doc->Items->at(z);
if (EditContour)
bb->ContourLine.resize(0);
4220,7 → 4220,7
if ((ClRe > 1) && (ClRe < static_cast<int>(Clip.size()-2)))
{
//z = PaintPolyLine(currItem->xPos(), currItem->yPos(), currItem->Width, currItem->Height, currItem->Pwidth, currItem->fillColor(), currItem->lineColor());
z = Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->Pwidth, currItem->fillColor(), currItem->lineColor(), true);
z = Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), currItem->fillColor(), currItem->lineColor(), true);
bb = Doc->Items->at(z);
if (EditContour)
bb->ContourLine.putPoints(0, Clip.size()-(ClRe+2), Clip, ClRe+2);
4237,7 → 4237,7
currItem->ClipEdited = true;
edited = true;
Doc->EditClipMode = 0;
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2.0, 1)));
emit PolyOpen();
}
}
4810,7 → 4810,7
MoveItem(0, npf2.y(), currItem);
}
SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false);
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2, 1)));
currItem->paintObj();
//CB emitted already
/*
5307,7 → 5307,7
{
if (Doc->appMode == modeDrawBezierLine)
return;
int ph = static_cast<int>(QMAX(1.0, currItem->Pwidth / 2.0));
int ph = static_cast<int>(QMAX(1.0, currItem->lineWidth() / 2.0));
switch (currItem->itemType())
{
case PageItem::Line:
6112,7 → 6112,7
newX = QMAX(newX, 1);
newY = QMAX(newY, 1);
}
int ph = static_cast<int>(QMAX(1.0, currItem->Pwidth / 2.0));
int ph = static_cast<int>(QMAX(1.0, currItem->lineWidth() / 2.0));
QWMatrix ma;
ma.rotate(currItem->rotation());
double dX = ma.m11() * (currItem->width() - newX) + ma.m21() * (currItem->height() - newY) + ma.dx();
6464,7 → 6464,7
FPoint h(0, bb->height(), bb->xPos(), bb->yPos(), bb->rotation(), 1, 1);
h -= g;
FPoint h1(h.x(), h.y(), 0, 0, 0, scx, scy);
bb->Pwidth = QMAX(bb->Pwidth*((scx+scy)/2), 0.01);
bb->setLineWidth(QMAX(bb->lineWidth()*((scx+scy)/2), 0.01));
if (bb->itemType() == PageItem::Line)
{
bb->setRotation(atan2(t1.y()-b1.y(),t1.x()-b1.x())*(180.0/M_PI));
6661,7 → 6661,7
currItem->ClipEdited = true;
currItem->PoLine = Clip.copy();
if (currItem->asPolyLine())
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2, 1)));
else
currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
currItem->Sizing = siz;
7100,7 → 7100,7
{
double lineCorr;
if (currItem->lineColor() != CommonStrings::None)
lineCorr = currItem->Pwidth / 2.0;
lineCorr = currItem->lineWidth() / 2.0;
else
lineCorr = 0;
xp = static_cast<int>(currItem->textToFrameDistLeft() + lineCorr);
7114,7 → 7114,7
{
double lineCorr;
if (currItem->lineColor() != CommonStrings::None)
lineCorr = currItem->Pwidth / 2.0;
lineCorr = currItem->lineWidth() / 2.0;
else
lineCorr = 0;
xp = static_cast<int>(currItem->textToFrameDistLeft() + lineCorr);
9163,10 → 9163,11
for (uint a = 0; a < selectedItemCount; ++a)
{
PageItem *currItem = Doc->selection->itemAt(a);
currItem->OldPwidth = currItem->Pwidth;
//cb moved to setlinewidth
//currItem->Oldm_lineWidth = currItem->lineWidth();
currItem->setLineWidth(w);
if (currItem->asPolyLine())
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2, 1)));
if (currItem->asLine())
{
int ph = static_cast<int>(QMAX(1.0, w / 2.0));
10109,7 → 10110,7
{
horizRuler->setItemPosition(currItem->xPos(), currItem->width());
if (currItem->lineColor() != CommonStrings::None)
horizRuler->lineCorr = currItem->Pwidth / 2.0;
horizRuler->lineCorr = currItem->lineWidth() / 2.0;
else
horizRuler->lineCorr = 0;
horizRuler->ColGap = currItem->ColGap;
10598,7 → 10599,7
Doc->Items->at(z)->BBoxH = Buffer->BBoxH; */
Doc->Items->at(z)->ScaleType = Buffer->ScaleType;
Doc->Items->at(z)->AspectRatio = Buffer->AspectRatio;
Doc->Items->at(z)->Pwidth = Buffer->Pwidth;
Doc->Items->at(z)->setLineWidth(Buffer->Pwidth);
break;
// OBSOLETE CR 2005-02-06
case PageItem::ItemType3:
10811,7 → 10812,7
}
else
{
int ph = static_cast<int>(QMAX(1.0, currItem->Pwidth / 2.0));
int ph = static_cast<int>(QMAX(1.0, currItem->lineWidth() / 2.0));
currItem->Segments.clear();
currItem->PoLine.resize(0);
currItem->Clip.setPoints(4, -ph,-ph, static_cast<int>(currItem->width()+ph),-ph,
11126,7 → 11127,7
chma.scale(1, -1);
pts.map(chma);
}
uint z = Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->Pwidth, currItem->lineColor(), currItem->fillColor(), !Mpressed);
uint z = Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), currItem->lineColor(), currItem->fillColor(), !Mpressed);
bb = Doc->Items->at(z);
bb->setTextFlowsAroundFrame(currItem->textFlowsAroundFrame());
bb->setTextFlowUsesBoundingBox(currItem->textFlowUsesBoundingBox());
11150,7 → 11151,7
bb->setLineColor(CommonStrings::None);
bb->setLineShade(100);
}
bb->Pwidth = chs * hl->coutline / 10000.0;
bb->setLineWidth(chs * hl->coutline / 10000.0);
if (currItem->asPathText())
AdjustItemSize(bb);
else
11180,13 → 11181,13
}
if ((currItem->asPathText()) && (currItem->PoShow))
{
uint z = Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->Pwidth, CommonStrings::None, currItem->lineColor(), !Mpressed);
uint z = Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), CommonStrings::None, currItem->lineColor(), !Mpressed);
PageItem *bb = Doc->Items->at(z);
bb->PoLine = currItem->PoLine.copy();
bb->ClipEdited = true;
bb->FrameType = 3;
bb->setRotation(currItem->rotation());
bb->SetPolyClip(qRound(QMAX(bb->Pwidth / 2, 1)));
bb->SetPolyClip(qRound(QMAX(bb->lineWidth() / 2, 1)));
AdjustItemSize(bb);
newGroupedItems.append(bb);
}
11266,7 → 11267,7
if (currItem->PoLine.point(a).x() > 900000)
{
StartInd = a + 1;
z = Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->Pwidth, currItem->fillColor(), currItem->lineColor(), !Mpressed);
z = Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), currItem->fillColor(), currItem->lineColor(), !Mpressed);
bb = Doc->Items->at(z);
bb->PoLine.resize(0);
bb->PoLine.putPoints(0, EndInd - StartInd, currItem->PoLine, StartInd);
/branches/Version13x/Scribus/scribus/pageitem_textframe.cpp
134,7 → 134,7
p->fillPath();
}
if (lineColor() != CommonStrings::None)
lineCorr = Pwidth / 2.0;
lineCorr = m_lineWidth / 2.0;
else
lineCorr = 0;
if ((isAnnotation()) && (annotation().Type() == 2) && (!Pfile.isEmpty()) && (PicAvail) && (PicArt) && (annotation().UseIcons()))
265,7 → 265,7
Zli3.Style = hl->cstyle;
Zli3.ZFo = hl->cfont;
if ((hl->ch == QChar(25)) && (hl->cembedded != 0))
Zli3.wide = (hl->cembedded->gWidth + hl->cembedded->Pwidth) * (hl->cscale / 1000.0);
Zli3.wide = (hl->cembedded->gWidth + hl->cembedded->lineWidth()) * (hl->cscale / 1000.0);
else
Zli3.wide = Cwidth(m_Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 1000.0);
if (hl->cstyle & 16384)
689,7 → 689,7
else
{
if ((hl->ch == QChar(25)) && (hl->cembedded != 0))
chs = qRound((hl->cembedded->gHeight + hl->cembedded->Pwidth) * 10);
chs = qRound((hl->cembedded->gHeight + hl->cembedded->lineWidth()) * 10);
else
chs = hl->csize;
}
701,7 → 701,7
else
chx2 = chx;
if ((hl->ch == QChar(25)) && (hl->cembedded != 0))
wide = hl->cembedded->gWidth + hl->cembedded->Pwidth;
wide = hl->cembedded->gWidth + hl->cembedded->lineWidth();
else
{
if (a < MaxText-1)
721,7 → 721,7
{
if ((hl->ch == QChar(25)) && (hl->cembedded != 0))
{
wide = hl->cembedded->gWidth + hl->cembedded->Pwidth;
wide = hl->cembedded->gWidth + hl->cembedded->lineWidth();
if (m_Doc->docParagraphStyles[hl->cab].BaseAdj)
asce = m_Doc->typographicSettings.valueBaseGrid * DropLines;
else
731,7 → 731,7
else
asce = RealFHeight(m_Doc, hl->cfont, m_Doc->docParagraphStyles[absa].FontSize) * DropLines;
}
hl->cscalev = qRound(asce / (hl->cembedded->gHeight + hl->cembedded->Pwidth) * 1000.0);
hl->cscalev = qRound(asce / (hl->cembedded->gHeight + hl->cembedded->lineWidth()) * 1000.0);
hl->cscale = hl->cscalev;
}
else
1437,7 → 1437,7
if ((Zli2->Zeich == QChar(13)) || (Zli2->Zeich == QChar(28)))
currasce = Zli2->ZFo->numAscent * (Zli2->realSiz / 10.0);
else if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = RealCAscent(m_Doc, Zli2->ZFo, Zli2->Zeich, Zli2->realSiz);
for (uint zc = 0; zc < LiList.count(); ++zc)
1449,7 → 1449,7
|| (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(29)))
continue;
if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = QMAX(currasce, RealCAscent(m_Doc, Zli2->ZFo, Zli2->Zeich, Zli2->realSiz));
}
1466,7 → 1466,7
double firstasce = m_Doc->docParagraphStyles[hl->cab].LineSpa;
double currasce;
if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = RealFHeight(m_Doc, Zli2->ZFo, Zli2->realSiz);
for (uint zc = 0; zc < LiList.count(); ++zc)
1478,7 → 1478,7
|| (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(29)))
continue;
if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = QMAX(currasce, RealFHeight(m_Doc, Zli2->ZFo, Zli2->realSiz));
}
1721,7 → 1721,7
if ((Zli2->Zeich == QChar(13)) || (Zli2->Zeich == QChar(28)))
currasce = Zli2->ZFo->numAscent * (Zli2->realSiz / 10.0);
else if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = RealCAscent(m_Doc, Zli2->ZFo, Zli2->Zeich, Zli2->realSiz);
for (uint zc = 0; zc < LiList.count(); ++zc)
1733,7 → 1733,7
|| (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(29)))
continue;
if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = QMAX(currasce, RealCAscent(m_Doc, Zli2->ZFo, Zli2->Zeich, Zli2->realSiz));
}
1750,7 → 1750,7
double firstasce = m_Doc->docParagraphStyles[hl->cab].LineSpa;
double currasce = 0;
if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = RealFHeight(m_Doc, Zli2->ZFo, Zli2->realSiz);
for (uint zc = 0; zc < LiList.count(); ++zc)
1762,7 → 1762,7
|| (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(29)))
continue;
if ((Zli2->Zeich == QChar(25)) && (Zli2->embedded != 0))
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->Pwidth) * (Zli2->scalev / 1000.0));
currasce = QMAX(currasce, (Zli2->embedded->gHeight + Zli2->embedded->lineWidth()) * (Zli2->scalev / 1000.0));
else
currasce = QMAX(currasce, RealFHeight(m_Doc, Zli2->ZFo, Zli2->realSiz));
}
1986,7 → 1986,7
{
if (lineColor() != CommonStrings::None)
{
p->setPen(strokeQColor, Pwidth, PLineArt, PLineEnd, PLineJoin);
p->setPen(strokeQColor, m_lineWidth, PLineArt, PLineEnd, PLineJoin);
if (DashValues.count() != 0)
p->setDash(DashValues, DashOffset);
}
2912,7 → 2912,7
{
double lineCorr;
if (lineColor() != CommonStrings::None)
lineCorr = Pwidth;
lineCorr = m_lineWidth;
else
lineCorr = 0;
return (Width - (ColGap * (Cols - 1)) - Extra - RExtra - lineCorr) / Cols;
2925,15 → 2925,15
double scp16 = 16.0*scp1;
double scp14 = 14.0*scp1;
double scp3 = 3.0*scp1;
double scpwidth16 = Width - scp16;
double scm_lineWidth16 = Width - scp16;
double scpheight16 = Height - scp16;
double scpwidth3 = Width - scp3;
double scm_lineWidth3 = Width - scp3;
double scpheight3 = Height - scp3;
p->setPen(black, scp1, SolidLine, FlatCap, MiterJoin);
p->setBrush(white);
p->drawRect(scpwidth16, scpheight16, scp14, scp14);
p->drawLine(FPoint(scpwidth16, scpheight16), FPoint(scpwidth3, scpheight3));
p->drawLine(FPoint(scpwidth16, scpheight3), FPoint(scpwidth3, scpheight16));
p->drawRect(scm_lineWidth16, scpheight16, scp14, scp14);
p->drawLine(FPoint(scm_lineWidth16, scpheight16), FPoint(scm_lineWidth3, scpheight3));
p->drawLine(FPoint(scm_lineWidth16, scpheight3), FPoint(scm_lineWidth3, scpheight16));
*/
//TODO: CB clean
ScribusView* view = m_Doc->view();
/branches/Version13x/Scribus/scribus/scribus.cpp
1277,7 → 1277,7
else
{
view->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false);
currItem->SetPolyClip(qRound(QMAX(currItem->Pwidth / 2, 1)));
currItem->SetPolyClip(qRound(QMAX(currItem->lineWidth() / 2.0, 1)));
view->AdjustItemSize(currItem);
currItem->ContourLine = currItem->PoLine.copy();
currItem->ClipEdited = true;
2361,7 → 2361,7
actionManager->enableUnicodeActions(true);
view->horizRuler->setItemPosition(currItem->xPos(), currItem->width());
if (currItem->lineColor() != CommonStrings::None)
view->horizRuler->lineCorr = currItem->Pwidth / 2.0;
view->horizRuler->lineCorr = currItem->lineWidth() / 2.0;
else
view->horizRuler->lineCorr = 0;
view->horizRuler->ColGap = currItem->ColGap;
8784,10 → 8784,16
QMessageBox::Yes, QMessageBox::No | QMessageBox::Default);
if (t == QMessageBox::Yes)
{
imageItem->EmProfile = "";
imageItem->pixm.imgInfo.isRequest = false;
imageItem->IProfile = doc->CMSSettings.DefaultImageRGBProfile;
imageItem->IRender = doc->CMSSettings.DefaultIntentImages;
qApp->setOverrideCursor( QCursor(Qt::WaitCursor) );
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
doc->loadPict(contentsBuffer.contentsFileName, imageItem);
currItem->AdjustPictScale();
imageItem->AdjustPictScale();
imageItem->setImageXYScale(contentsBuffer.LocalScX, contentsBuffer.LocalScY);
imageItem->setImageXYOffset(contentsBuffer.LocalX, contentsBuffer.LocalY);
imageItem->setImageXYOffset(contentsBuffer.LocalX, contentsBuffer.LocalY);
qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
qApp->restoreOverrideCursor();
view->DrawNew();
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
51,7 → 51,7
if(!checkHaveDocument())
return NULL;
PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->Pwidth)) : NULL;
return i != NULL ? PyFloat_FromDouble(static_cast<double>(i->lineWidth())) : NULL;
}
 
PyObject *scribus_getlineshade(PyObject* /* self */, PyObject* args)
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp
84,7 → 84,7
PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
if (i == NULL)
return NULL;
i->Pwidth = w;
i->setLineWidth(w);
Py_INCREF(Py_None);
return Py_None;
}
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
641,7 → 641,7
//ite->Ypos += mm.dy();
ite->moveBy(mm.dx(), mm.dy());
ite->setWidthHeight(ite->width() * mm.m11(), ite->height() * mm.m22());
ite->Pwidth = ite->Pwidth * ((mm.m11() + mm.m22()) / 2.0);
ite->setLineWidth(ite->lineWidth() * ((mm.m11() + mm.m22()) / 2.0));
if (ite->PicAvail)
ite->setImageXYScale(ite->width() / ite->pixm.width(), ite->height() / ite->pixm.height());
break;
649,7 → 649,7
case PageItem::TextFrame:
{
QWMatrix mm = gc->matrix;
ite->Pwidth = ite->Pwidth * ((mm.m11() + mm.m22()) / 2.0);
ite->setLineWidth(ite->lineWidth() * ((mm.m11() + mm.m22()) / 2.0));
}
break;
default:
665,7 → 665,7
mv.scale(viewScaleX, viewScaleY);
ite->PoLine.map(mv);
}
ite->Pwidth = ite->Pwidth * ((mm.m11() + mm.m22()) / 2.0);
ite->setLineWidth(ite->lineWidth() * ((mm.m11() + mm.m22()) / 2.0));
FPoint wh = getMaxClipF(&ite->PoLine);
ite->setWidthHeight(wh.x(), wh.y());
ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
/branches/Version13x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
360,7 → 360,7
trans = "translate("+FToStr(Item->xPos()-Seite->xOffset())+", "+FToStr(Item->yPos()-Seite->yOffset())+")";
if (Item->rotation() != 0)
trans += " rotate("+FToStr(Item->rotation())+")";
strokeW = "stroke-width:"+FToStr(Item->Pwidth)+"pt;";
strokeW = "stroke-width:"+FToStr(Item->lineWidth())+"pt;";
strokeLC = "stroke-linecap:";
switch (Item->PLineEnd)
{
405,8 → 405,8
}
else
{
QString Dt = FToStr(QMAX(2*Item->Pwidth, 1));
QString Da = FToStr(QMAX(6*Item->Pwidth, 1));
QString Dt = FToStr(QMAX(2*Item->lineWidth(), 1));
QString Da = FToStr(QMAX(6*Item->lineWidth(), 1));
switch (Item->PLineArt)
{
case Qt::SolidLine:
/branches/Version13x/Scribus/scribus/plugins/psimport/importps.cpp
416,7 → 416,7
{
ite = Elements.at(Elements.count()-1);
ite->setLineColor(CurrColor);
ite->Pwidth = LineW;
ite->setLineWidth(LineW);
ite->PLineEnd = CapStyle;
ite->PLineJoin = JoinStyle;
ite->setLineTransparency(1.0 - Opacity);
/branches/Version13x/Scribus/scribus/pslib.cpp
1099,10 → 1099,11
int y = static_cast<int>(Doc->MasterPages.at(ap)->yOffset());
int w = static_cast<int>(Doc->MasterPages.at(ap)->width());
int h = static_cast<int>(Doc->MasterPages.at(ap)->height());
int x2 = static_cast<int>(it->BoundingX - it->Pwidth / 2.0);
int y2 = static_cast<int>(it->BoundingY - it->Pwidth / 2.0);
int w2 = static_cast<int>(it->BoundingW + it->Pwidth);
int h2 = static_cast<int>(it->BoundingH + it->Pwidth);
double ilw=it->lineWidth();
int x2 = static_cast<int>(it->BoundingX - ilw / 2.0);
int y2 = static_cast<int>(it->BoundingY - ilw / 2.0);
int w2 = static_cast<int>(it->BoundingW + ilw);
int h2 = static_cast<int>(it->BoundingH + ilw);
if (!QRect(x, y, w, h).intersects(QRect(x2, y2, w2, h2)))
continue;
if ((it->OwnPage != static_cast<int>(Doc->MasterPages.at(ap)->pageNr())) && (it->OwnPage != -1))
1232,11 → 1233,11
PS_restore();
if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
SetFarbe(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ite->Pwidth);
PS_setlinewidth(ite->lineWidth());
PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
SetClipPath(&ite->PoLine);
1294,11 → 1295,11
setTextSt(Doc, ite, gcr, a, mPage, sep, farb, Ic, true);
if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
{
if ((ite->NamedLStyle.isEmpty()) && (ite->Pwidth != 0.0))
if ((ite->NamedLStyle.isEmpty()) && (ite->lineWidth() != 0.0))
{
SetFarbe(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(ite->Pwidth);
PS_setlinewidth(ite->lineWidth());
PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
SetClipPath(&ite->PoLine);
1338,7 → 1339,7
SetFarbe(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(ite->Pwidth);
PS_setlinewidth(ite->lineWidth());
PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
1427,7 → 1428,7
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(c->Pwidth);
PS_setlinewidth(c->lineWidth());
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
PS_setdash(c->PLineArt, c->DashOffset, c->DashValues);
if (!embedded)
1479,11 → 1480,11
PS_restore();
if (((c->lineColor() != CommonStrings::None) || (!c->NamedLStyle.isEmpty())) && (!c->isTableItem))
{
if ((c->NamedLStyle.isEmpty()) && (c->Pwidth != 0.0))
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(c->Pwidth);
PS_setlinewidth(c->lineWidth());
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
PS_setdash(c->PLineArt, c->DashOffset, c->DashValues);
SetClipPath(&c->PoLine);
1557,10 → 1558,10
{
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_setlinewidth(c->Pwidth);
PS_setlinewidth(c->lineWidth());
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
PS_setdash(c->PLineArt, c->DashOffset, c->DashValues);
if ((c->NamedLStyle.isEmpty()) && (c->Pwidth != 0.0))
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
SetClipPath(&c->PoLine);
PS_closepath();
1584,7 → 1585,7
}
break;
case PageItem::Line:
if ((c->NamedLStyle.isEmpty()) && (c->Pwidth != 0.0))
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
PS_moveto(0, 0);
PS_lineto(c->width(), 0);
1610,7 → 1611,7
QWMatrix arrowTrans;
FPointArray arrow = (*Doc->arrowStyles.at(c->startArrowIndex()-1)).points.copy();
arrowTrans.translate(0, 0);
arrowTrans.scale(c->Pwidth, c->Pwidth);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrowTrans.scale(-1,1);
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
1625,7 → 1626,7
QWMatrix arrowTrans;
FPointArray arrow = (*Doc->arrowStyles.at(c->endArrowIndex()-1)).points.copy();
arrowTrans.translate(c->width(), 0);
arrowTrans.scale(c->Pwidth, c->Pwidth);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
1654,7 → 1655,7
}
if ((c->lineColor() != CommonStrings::None) || (!c->NamedLStyle.isEmpty()))
{
if ((c->NamedLStyle.isEmpty()) && (c->Pwidth != 0.0))
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
SetClipPath(&c->PoLine);
PS_closepath();
1690,7 → 1691,7
}
if ((c->lineColor() != CommonStrings::None) || (!c->NamedLStyle.isEmpty()))
{
if ((c->NamedLStyle.isEmpty()) && (c->Pwidth != 0.0))
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
SetClipPath(&c->PoLine, false);
putColor(c->lineColor(), c->lineShade(), false);
1723,7 → 1724,7
FPointArray arrow = (*Doc->arrowStyles.at(c->startArrowIndex()-1)).points.copy();
arrowTrans.translate(Start.x(), Start.y());
arrowTrans.rotate(r);
arrowTrans.scale(c->Pwidth, c->Pwidth);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
1748,7 → 1749,7
FPointArray arrow = (*Doc->arrowStyles.at(c->endArrowIndex()-1)).points.copy();
arrowTrans.translate(End.x(), End.y());
arrowTrans.rotate(r);
arrowTrans.scale(c->Pwidth, c->Pwidth);
arrowTrans.scale(c->lineWidth(), c->lineWidth());
arrow.map(arrowTrans);
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
1767,7 → 1768,7
if (c->PoLine.size() > 3)
{
PS_save();
if ((c->NamedLStyle.isEmpty()) && (c->Pwidth != 0.0))
if ((c->NamedLStyle.isEmpty()) && (c->lineWidth() != 0.0))
{
SetClipPath(&c->PoLine, false);
putColor(c->lineColor(), c->lineShade(), false);
1943,10 → 1944,11
int y = static_cast<int>(a->yOffset());
int w = static_cast<int>(a->width());
int h1 = static_cast<int>(a->height());
int x2 = static_cast<int>(c->BoundingX - c->Pwidth / 2.0);
int y2 = static_cast<int>(c->BoundingY - c->Pwidth / 2.0);
int w2 = static_cast<int>(c->BoundingW + c->Pwidth);
int h2 = static_cast<int>(c->BoundingH + c->Pwidth);
double ilw=c->lineWidth();
int x2 = static_cast<int>(c->BoundingX - ilw / 2.0);
int y2 = static_cast<int>(c->BoundingY - ilw / 2.0);
int w2 = static_cast<int>(c->BoundingW + ilw);
int h2 = static_cast<int>(c->BoundingH + ilw);
if (!QRect(x, y, w, h1).intersects(QRect(x2, y2, w2, h2)))
continue;
if (c->ChangedMasterItem)
1969,10 → 1971,11
int y = static_cast<int>(a->yOffset());
int w = static_cast<int>(a->width());
int h1 = static_cast<int>(a->height());
int x2 = static_cast<int>(c->BoundingX - c->Pwidth / 2.0);
int y2 = static_cast<int>(c->BoundingY - c->Pwidth / 2.0);
int w2 = static_cast<int>(c->BoundingW + c->Pwidth);
int h2 = static_cast<int>(c->BoundingH + c->Pwidth);
double ilw=c->lineWidth();
int x2 = static_cast<int>(c->BoundingX - ilw / 2.0);
int y2 = static_cast<int>(c->BoundingY - ilw / 2.0);
int w2 = static_cast<int>(c->BoundingW + ilw);
int h2 = static_cast<int>(c->BoundingH + ilw);
if (!QRect(x, y, w, h1).intersects(QRect(x2, y2, w2, h2)))
continue;
if (c->ChangedMasterItem)
1989,7 → 1992,7
SetFarbe(c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(c->Pwidth);
PS_setlinewidth(c->lineWidth());
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
PS_setdash(c->PLineArt, c->DashOffset, c->DashValues);
PS_translate(c->xPos() - a->xOffset(), a->height() - (c->yPos() - a->yOffset()));
2142,7 → 2145,7
QValueList<PageItem::TabRecord> tTabValues;
double tabDist = ite->textToFrameDistLeft();
if (ite->lineColor() != CommonStrings::None)
tabDist += ite->Pwidth / 2.0;
tabDist += ite->lineWidth() / 2.0;
 
for (uint d = 0; d < ite->MaxChars; ++d)
{