Index: colorm.cpp =================================================================== RCS file: /cvs/Scribus/scribus/colorm.cpp,v retrieving revision 1.32.2.8 diff -u -r1.32.2.8 colorm.cpp --- colorm.cpp 16 Jan 2005 15:28:39 -0000 1.32.2.8 +++ colorm.cpp 2 Feb 2005 18:52:48 -0000 @@ -366,7 +366,7 @@ } } /* PFJ - 29.02.04 - merged if's to one line */ - if ((it.key() == ite->Pcolor) || (it.key() == ite->Pcolor2)) + if ((it.key() == ite->fillColor()) || (it.key() == ite->lineColor())) found = true; if (found) break; @@ -400,7 +400,7 @@ } } /* PFJ - 29.02.04 - Merged if's */ - if ((it.key() == ite->Pcolor) || (it.key() == ite->Pcolor2)) + if ((it.key() == ite->fillColor()) || (it.key() == ite->lineColor())) found = true; if (found) break; Index: gtaction.cpp =================================================================== RCS file: /cvs/Scribus/scribus/gtaction.cpp,v retrieving revision 1.8.2.12 diff -u -r1.8.2.12 gtaction.cpp --- gtaction.cpp 1 Feb 2005 10:38:38 -0000 1.8.2.12 +++ gtaction.cpp 2 Feb 2005 18:52:48 -0000 @@ -198,8 +198,8 @@ { textFrame->Cols = fstyle->getColumns(); textFrame->ColGap = fstyle->getColumnsGap(); - textFrame->Pcolor = parseColor(fstyle->getBgColor()); - textFrame->Shade = fstyle->getBgShade(); + textFrame->setFillColor(parseColor(fstyle->getBgColor())); + textFrame->setFillShade(fstyle->getBgShade()); textFrame->TabValues = QValueList(*(fstyle->getTabValues())); // gtParagraphStyle* pstyle = new gtParagraphStyle(*fstyle); @@ -243,8 +243,8 @@ { fstyle->setColumns(textFrame->Cols); fstyle->setColumnsGap(textFrame->ColGap); - fstyle->setBgColor(textFrame->Pcolor); - fstyle->setBgShade(textFrame->Shade); + fstyle->setBgColor(textFrame->fillColor()); + fstyle->setBgShade(textFrame->fillShade()); struct ParagraphStyle vg = textFrame->Doc->docParagraphStyles[textFrame->Doc->currentParaStyle]; fstyle->setName(vg.Vname); Index: mpalette.cpp =================================================================== RCS file: /cvs/Scribus/scribus/mpalette.cpp,v retrieving revision 1.110.2.25 diff -u -r1.110.2.25 mpalette.cpp --- mpalette.cpp 2 Feb 2005 18:35:00 -0000 1.110.2.25 +++ mpalette.cpp 2 Feb 2005 18:52:49 -0000 @@ -1084,7 +1084,7 @@ else { double lineCorr; - if (i->Pcolor2 != "None") + if (i->lineColor() != "None") lineCorr = i->Pwidth; else lineCorr = 0; @@ -1677,7 +1677,7 @@ else { double lineCorr; - if (CurItem->Pcolor2 != "None") + if (CurItem->lineColor() != "None") lineCorr = CurItem->Pwidth; else lineCorr = 0; @@ -2295,7 +2295,7 @@ else { double lineCorr; - if (CurItem->Pcolor2 != "None") + if (CurItem->lineColor() != "None") lineCorr = CurItem->Pwidth; else lineCorr = 0; @@ -3314,7 +3314,7 @@ if ((HaveDoc) && (HaveItem)) { double lineCorr; - if (CurItem->Pcolor2 != "None") + if (CurItem->lineColor() != "None") lineCorr = CurItem->Pwidth; else lineCorr = 0; Index: pageitem.cpp =================================================================== RCS file: /cvs/Scribus/scribus/pageitem.cpp,v retrieving revision 1.121.2.50 diff -u -r1.121.2.50 pageitem.cpp --- pageitem.cpp 2 Feb 2005 18:35:00 -0000 1.121.2.50 +++ pageitem.cpp 2 Feb 2005 18:52:50 -0000 @@ -80,16 +80,16 @@ Rot = 0; oldRot = 0; Doc = pa; - Pcolor = fill; - Pcolor2 = PType == 4 ? fill : outline; + fillColorVal = fill; + lineColorVal = PType == 4 ? fill : outline; TxtFill = Doc->toolSettings.dPenText; TxtStroke = Doc->toolSettings.dStrokeText; ShTxtStroke = 100; ShTxtFill = 100; TxtScale = 100; TxTStyle = 0; - Shade = 100; - Shade2 = 100; + fillShadeVal = 100; + lineShadeVal = 100; GrType = 0; GrStartX = 0; GrStartY = 0; @@ -250,8 +250,8 @@ LayerNr = Doc->ActiveLayer; ScaleType = true; AspectRatio = true; - Transparency = 0.0; - TranspStroke = 0.0; + fillTransparencyVal = 0.0; + lineTransparencyVal = 0.0; Reverse = false; InvPict = false; NamedLStyle = ""; @@ -260,14 +260,14 @@ DashOffset = 0; fill_gradient = VGradient(VGradient::linear); fill_gradient.clearStops(); - if (Pcolor == "None") + if (fillColor() == "None") fill_gradient.addStop(Doc->PageColors[Doc->toolSettings.dBrush].getRGBColor(), 0.0, 0.5, 1.0, Doc->toolSettings.dBrush, 100); else - fill_gradient.addStop(Doc->PageColors[Pcolor].getRGBColor(), 0.0, 0.5, 1.0, Pcolor, 100); - if (Pcolor2 == "None") + fill_gradient.addStop(Doc->PageColors[fillColor()].getRGBColor(), 0.0, 0.5, 1.0, fillColor(), 100); + if (lineColor() == "None") fill_gradient.addStop(Doc->PageColors[Doc->toolSettings.dPen].getRGBColor(), 1.0, 0.5, 1.0, Doc->toolSettings.dPen, 100); else - fill_gradient.addStop(Doc->PageColors[Pcolor2].getRGBColor(), 1.0, 0.5, 1.0, Pcolor2, 100); + fill_gradient.addStop(Doc->PageColors[lineColor()].getRGBColor(), 1.0, 0.5, 1.0, lineColor(), 100); Language = Doc->Language; Cols = Doc->toolSettings.dCols; ColGap = Doc->toolSettings.dGap; @@ -388,18 +388,18 @@ else { p->fill_gradient = VGradient(VGradient::linear); - if (Pcolor != "None") + if (fillColor() != "None") { - SetFarbe(&tmp, Pcolor, Shade); + SetFarbe(&tmp, fillColor(), fillShade()); p->setBrush(tmp); p->setFillMode(ScPainter::Solid); } else p->setFillMode(ScPainter::None); } - if (Pcolor2 != "None") + if (lineColor() != "None") { - SetFarbe(&tmp, Pcolor2, Shade2); + SetFarbe(&tmp, lineColor(), lineShade()); if ((Pwidth == 0) && (PType != 5)) p->setLineWidth(0); else @@ -411,14 +411,14 @@ } else p->setLineWidth(0); - p->setBrushOpacity(1.0 - Transparency); - p->setPenOpacity(1.0 - TranspStroke); + p->setBrushOpacity(1.0 - fillTransparency()); + p->setPenOpacity(1.0 - lineTransparency()); switch (PType) { case 2: if (Doc->RePos) break; - if ((Pcolor != "None") || (GrType != 0)) + if ((fillColor() != "None") || (GrType != 0)) { p->setupPolygon(&PoLine); p->fillPath(); @@ -500,7 +500,7 @@ arrowTrans.scale(-1,1); arrow.map(arrowTrans); p->setBrush(p->pen()); - p->setBrushOpacity(1.0 - TranspStroke); + p->setBrushOpacity(1.0 - lineTransparency()); p->setLineWidth(0); p->setFillMode(ScPainter::Solid); p->setupPolygon(&arrow); @@ -514,7 +514,7 @@ arrowTrans.scale(Pwidth, Pwidth); arrow.map(arrowTrans); p->setBrush(p->pen()); - p->setBrushOpacity(1.0 - TranspStroke); + p->setBrushOpacity(1.0 - lineTransparency()); p->setLineWidth(0); p->setFillMode(ScPainter::Solid); p->setupPolygon(&arrow); @@ -535,7 +535,7 @@ break; if (PoLine.size() < 4) break; - if ((Pcolor != "None") || (GrType != 0)) + if ((fillColor() != "None") || (GrType != 0)) { FPointArray cli; FPoint Start; @@ -605,7 +605,7 @@ arrowTrans.scale(Pwidth, Pwidth); arrow.map(arrowTrans); p->setBrush(p->pen()); - p->setBrushOpacity(1.0 - TranspStroke); + p->setBrushOpacity(1.0 - lineTransparency()); p->setLineWidth(0); p->setFillMode(ScPainter::Solid); p->setupPolygon(&arrow); @@ -630,7 +630,7 @@ arrowTrans.scale(Pwidth, Pwidth); arrow.map(arrowTrans); p->setBrush(p->pen()); - p->setBrushOpacity(1.0 - TranspStroke); + p->setBrushOpacity(1.0 - lineTransparency()); p->setLineWidth(0); p->setFillMode(ScPainter::Solid); p->setupPolygon(&arrow); @@ -645,12 +645,12 @@ pf2.begin(ScApp->view->viewport()); pf2.translate(Xpos, Ypos); pf2.rotate(Rot); - if ((Pcolor != "None") || (GrType != 0)) + if ((fillColor() != "None") || (GrType != 0)) { p->setupPolygon(&PoLine); p->fillPath(); } - if (Pcolor2 != "None") + if (lineColor() != "None") lineCorr = Pwidth / 2.0; else lineCorr = 0; @@ -1852,9 +1852,9 @@ } if ((doStroke) && (!Doc->RePos)) { - if (Pcolor2 != "None") + if (lineColor() != "None") { - SetFarbe(&tmp, Pcolor2, Shade2); + SetFarbe(&tmp, lineColor(), lineShade()); p->setPen(tmp, Pwidth, PLineArt, PLineEnd, PLineJoin); if (DashValues.count() != 0) p->setDash(DashValues, DashOffset); @@ -2273,7 +2273,7 @@ QString PageItem::fillColor() const { - return Pcolor; + return fillColorVal; } void PageItem::setFillColor(const QString &newColor) @@ -2281,19 +2281,19 @@ if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::SetFill, - QString(Um::ColorFromTo).arg(Pcolor).arg(newColor), + QString(Um::ColorFromTo).arg(fillColorVal).arg(newColor), Um::IFill); ss->set("FILL", "fill"); - ss->set("OLD_FILL", Pcolor); + ss->set("OLD_FILL", fillColorVal); ss->set("NEW_FILL", newColor); undoManager->action(this, ss); } - Pcolor = newColor; + fillColorVal = newColor; } int PageItem::fillShade() const { - return Shade; + return fillShadeVal; } void PageItem::setFillShade(int newShade) @@ -2301,19 +2301,19 @@ if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::SetShade, - QString(Um::ShadeFromTo).arg(Shade).arg(newShade), + QString(Um::ShadeFromTo).arg(fillShadeVal).arg(newShade), Um::IShade); ss->set("SHADE", "shade"); - ss->set("OLD_SHADE", Shade); + ss->set("OLD_SHADE", fillShadeVal); ss->set("NEW_SHADE", newShade); undoManager->action(this, ss); } - Shade = newShade; + fillShadeVal = newShade; } double PageItem::fillTransparency() const { - return Transparency; + return fillTransparencyVal; } void PageItem::setFillTransparency(double newTransparency) @@ -2321,19 +2321,19 @@ if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::Transparency, - QString(Um::FromTo).arg(Transparency).arg(newTransparency), + QString(Um::FromTo).arg(fillTransparencyVal).arg(newTransparency), Um::ITransparency); ss->set("TRANSPARENCY", "transparency"); - ss->set("OLD_TP", Transparency); + ss->set("OLD_TP", fillTransparencyVal); ss->set("NEW_TP", newTransparency); undoManager->action(this, ss); } - Transparency = newTransparency; + fillTransparencyVal = newTransparency; } QString PageItem::lineColor() const { - return Pcolor2; + return lineColorVal; } void PageItem::setLineColor(const QString &newColor) @@ -2341,19 +2341,19 @@ if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::SetLineColor, - QString(Um::ColorFromTo).arg(Pcolor2).arg(newColor), + QString(Um::ColorFromTo).arg(lineColorVal).arg(newColor), Um::IFill); ss->set("LINE_COLOR", "line_color"); - ss->set("OLD_COLOR", Pcolor2); + ss->set("OLD_COLOR", lineColorVal); ss->set("NEW_COLOR", newColor); undoManager->action(this, ss); } - Pcolor2 = newColor; + lineColorVal = newColor; } int PageItem::lineShade() const { - return Shade2; + return lineShadeVal; } void PageItem::setLineShade(int newShade) @@ -2361,20 +2361,20 @@ if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::SetLineShade, - QString(Um::ShadeFromTo).arg(Shade).arg(newShade), + QString(Um::ShadeFromTo).arg(lineShadeVal).arg(newShade), Um::IShade); ss->set("LINE_SHADE", "line_shade"); - ss->set("OLD_SHADE", Shade2); + ss->set("OLD_SHADE", lineShadeVal); ss->set("NEW_SHADE", newShade); undoManager->action(this, ss); } - Shade2 = newShade; + lineShadeVal = newShade; } double PageItem::lineTransparency() const { - return TranspStroke; + return lineTransparencyVal; } void PageItem::setLineTransparency(double newTransparency) @@ -2382,14 +2382,19 @@ if (UndoManager::undoEnabled()) { SimpleState *ss = new SimpleState(Um::LineTransparency, - QString(Um::FromTo).arg(TranspStroke).arg(newTransparency), + QString(Um::FromTo).arg(lineTransparencyVal).arg(newTransparency), Um::ITransparency); ss->set("LINE_TRANSPARENCY", "transparency"); - ss->set("OLD_TP", TranspStroke); + ss->set("OLD_TP", lineTransparencyVal); ss->set("NEW_TP", newTransparency); undoManager->action(this, ss); } - TranspStroke = newTransparency; + lineTransparencyVal = newTransparency; +} + +Qt::PenStyle PageItem::lineStyle() const +{ + return PLineArt; } void PageItem::setLineStyle(PenStyle newStyle) @@ -2405,6 +2410,11 @@ PLineArt = newStyle; } +double PageItem::lineWidth() const +{ + return Pwidth; +} + void PageItem::setLineWidth(double newWidth) { if (UndoManager::undoEnabled()) @@ -2419,6 +2429,11 @@ Pwidth = newWidth; } +Qt::PenCapStyle PageItem::lineEnd() const +{ + return PLineEnd; +} + void PageItem::setLineEnd(PenCapStyle newStyle) { if (UndoManager::undoEnabled()) @@ -2432,6 +2447,11 @@ PLineEnd = newStyle; } +Qt::PenJoinStyle PageItem::lineJoin() const +{ + return PLineJoin; +} + void PageItem::setLineJoin(PenJoinStyle newStyle) { if (UndoManager::undoEnabled()) @@ -2444,16 +2464,9 @@ } PLineJoin = newStyle; } - -bool PageItem::imageFlippedH() const -{ - return imageIsFlippedH; -} - -void PageItem::setImageFlippedH(bool flipped) +QString PageItem::customLineStyle() const { - if (flipped != imageIsFlippedH) - flipImageH(); + return NamedLStyle; } void PageItem::setCustomLineStyle(const QString& newStyle) @@ -2473,6 +2486,11 @@ NamedLStyle = newStyle; } +int PageItem::getStartArrowIndex() const +{ + return startArrowIndex; +} + void PageItem::setStartArrowIndex(int newIndex) { if (UndoManager::undoEnabled()) @@ -2486,6 +2504,11 @@ startArrowIndex = newIndex; } +int PageItem::getEndArrowIndex() const +{ + return endArrowIndex; +} + void PageItem::setEndArrowIndex(int newIndex) { if (UndoManager::undoEnabled()) @@ -2497,6 +2520,17 @@ undoManager->action(this, ss); } endArrowIndex = newIndex; +} + +bool PageItem::imageFlippedH() const +{ + return imageIsFlippedH; +} + +void PageItem::setImageFlippedH(bool flipped) +{ + if (flipped != imageIsFlippedH) + flipImageH(); } void PageItem::flipImageH() Index: pageitem.h =================================================================== RCS file: /cvs/Scribus/scribus/pageitem.h,v retrieving revision 1.26.2.27 diff -u -r1.26.2.27 pageitem.h --- pageitem.h 2 Feb 2005 18:35:00 -0000 1.26.2.27 +++ pageitem.h 2 Feb 2005 18:52:50 -0000 @@ -38,19 +38,31 @@ class PageItem : public QObject, public UndoObject { Q_OBJECT + // Properties - see http://doc.trolltech.com/3.3/properties.html // See the getters and setters of these properties for details on their use. Q_PROPERTY(QString itemName READ itemName WRITE setItemName DESIGNABLE false) Q_PROPERTY(QString fillColor READ fillColor WRITE setFillColor DESIGNABLE false) - Q_PROPERTY(int fillShade READ fillShade WRITE setFillShade DESIGNABLE false) - Q_PROPERTY(double fillTransparency READ fillTransparency WRITE setFillTransparency DESIGNABLE false) Q_PROPERTY(QString lineColor READ lineColor WRITE setLineColor DESIGNABLE false) + Q_PROPERTY(int fillShade READ fillShade WRITE setFillShade DESIGNABLE false) Q_PROPERTY(int lineShade READ lineShade WRITE setLineShade DESIGNABLE false) + Q_PROPERTY(double fillTransparency READ fillTransparency WRITE setFillTransparency DESIGNABLE false) Q_PROPERTY(double lineTransparency READ lineTransparency WRITE setLineTransparency DESIGNABLE false) Q_PROPERTY(bool locked READ locked WRITE setLocked DESIGNABLE false) Q_PROPERTY(bool sizeLocked READ sizeLocked WRITE setSizeLocked DESIGNABLE false) Q_PROPERTY(bool imageFlippedV READ imageFlippedV WRITE setImageFlippedV DESIGNABLE false) Q_PROPERTY(bool imageFlippedH READ imageFlippedH WRITE setImageFlippedH DESIGNABLE false) + Q_PROPERTY(double lineWidth READ lineWidth WRITE setLineWidth DESIGNABLE false) + Q_PROPERTY(QString customLineStyle READ customLineStyle WRITE setCustomLineStyle DESIGNABLE false) + Q_PROPERTY(int startArrowIndex READ getStartArrowIndex WRITE setStartArrowIndex DESIGNABLE false) + Q_PROPERTY(int endArrowIndex READ getEndArrowIndex WRITE setEndArrowIndex DESIGNABLE false) + Q_ENUMS(PenStyle) + Q_PROPERTY(PenStyle lineStyle READ lineStyle WRITE setLineStyle DESIGNABLE false) + Q_ENUMS(PenCapStyle) + Q_PROPERTY(PenCapStyle lineEnd READ lineEnd WRITE setLineEnd DESIGNABLE false) + Q_ENUMS(PenJoinStyle) + Q_PROPERTY(PenJoinStyle lineJoin READ lineJoin WRITE setLineJoin DESIGNABLE false) + public: PageItem(ScribusDoc *pa, int art, double x, double y, double w, double h, double w2, QString fill, QString outline); ~PageItem() {}; @@ -110,14 +122,6 @@ double GrStartY; double GrEndX; double GrEndY; - /** Fuellfarbe */ - QString Pcolor; - /** Abstufung fuer Fllfarbe */ - int Shade; - /** Zeichenfarbe fuer Elemente */ - QString Pcolor2; - /** Abstufung fuer Zeichenfarbe */ - int Shade2; QString TxtStroke; QString TxtFill; int ShTxtStroke; @@ -275,8 +279,6 @@ int LayerNr; bool ScaleType; bool AspectRatio; - double Transparency; - double TranspStroke; QValueStack Groups; bool InvPict; QValueList DashValues; @@ -374,23 +376,35 @@ * @param newTransparency transparency of the line color */ void setLineTransparency(double newTransparency); + + /** @brief Get the style of line */ + PenStyle lineStyle() const; /** * @brief Set the style of line. * @param newStyle style of line * @sa Qt::PenStyle */ void setLineStyle(PenStyle newStyle); + + /** @brief Get the width of the line */ + double lineWidth() const; /** * @brief Set the width of line * @param newWidth width of line */ void setLineWidth(double newWidth); + + /** @brief Get the end cap style of the line */ + PenCapStyle lineEnd() const; /** * @brief Set the end style of line * @param newStyle end style of line * @sa Qt::PenCapStyle */ void setLineEnd(PenCapStyle newStyle); + + /** @brief Get the join style of multi-segment lines */ + PenJoinStyle lineJoin() const; /** * @brief Set the join style of line * @param newStyle join style of line @@ -398,28 +412,38 @@ */ void setLineJoin(PenJoinStyle newStyle); - /** @brief Is the image flipped horizontally? */ - bool imageFlippedH() const; - /** @brief Horizontally flip / unflip the image */ - void setImageFlippedH(bool flipped); - + /** @brief Get name of active custom line style */ + QString customLineStyle() const; /** * @brief Set custom line style * @param newStyle name of the custom style */ void setCustomLineStyle(const QString& newStyle); + /** @brief Get start arrow index + * @sa PageItem::getEndArrowIndex(), PageItem::setStartArrowIndex() + */ + int getStartArrowIndex() const; /** * @brief Set start arrow index * @param newIndex index for start arrow */ void setStartArrowIndex(int newIndex); + + /** @brief Get end arrow index + * @sa PageItem::getStartArrowIndex(), PageItem::setEndArrowIndex() + */ + int getEndArrowIndex() const; /** * @brief Set end arrow index * @param newIndex index for end arrow */ void setEndArrowIndex(int newIndex); + /** @brief Is the image flipped horizontally? */ + bool imageFlippedH() const; + /** @brief Horizontally flip / unflip the image */ + void setImageFlippedH(bool flipped); /** @brief Flip an image horizontally. */ void flipImageH(); @@ -509,6 +533,42 @@ * @sa PageItem::itemName(), PageItem::setItemName() */ QString AnName; + + /** + * @brief Fill color name + * @sa PageItem::fillColor(), PageItem::setFillColor() + */ + QString fillColorVal; + + /** + * @brief Line color name + * @sa PageItem::lineColor(), PageItem::setLineColor() + */ + QString lineColorVal; + + /** + * @brief Line shade + * @sa PageItem::lineShade, PageItem::setLineShade() + */ + int lineShadeVal; + + /** + * @brief Fill shade + * @sa PageItem::fillShade, PageItem::setFillShade() + */ + int fillShadeVal; + + /** + * @brief Fill transparency + * @sa PageItem::fillTransparency(), PageItem::setFillTransparency() + */ + double fillTransparencyVal; + + /** + * @brief Line stroke transparency. + * @sa PageItem::lineTransparency(), PageItem::setLineTransparency() + */ + double lineTransparencyVal; /** * @brief Is the image in this image item flipped horizontally? Index: scribus.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribus.cpp,v retrieving revision 1.228.2.145 diff -u -r1.228.2.145 scribus.cpp --- scribus.cpp 2 Feb 2005 18:35:00 -0000 1.228.2.145 +++ scribus.cpp 2 Feb 2005 18:52:54 -0000 @@ -3873,7 +3873,7 @@ scrActions["extrasInsertSpecial"]->setEnabled(true); view->HR->ItemPos = b->Xpos; view->HR->ItemEndPos = b->Xpos+b->Width; - if (b->Pcolor2 != "None") + if (b->lineColor() != "None") view->HR->lineCorr = b->Pwidth / 2.0; else view->HR->lineCorr = 0; @@ -7367,10 +7367,10 @@ ite->itemText.at(d)->cstroke = it.data(); } } - if (it.key() == ite->Pcolor) - ite->Pcolor = it.data(); - if (it.key() == ite->Pcolor2) - ite->Pcolor2 = it.data(); + if (it.key() == ite->fillColor()) + ite->setFillColor(it.data()); + if (it.key() == ite->lineColor()) + ite->setLineColor(it.data()); QPtrVector cstops = ite->fill_gradient.colorStops(); for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst) { @@ -7398,10 +7398,10 @@ ite->itemText.at(d)->cstroke = it.data(); } } - if (it.key() == ite->Pcolor) - ite->Pcolor = it.data(); - if (it.key() == ite->Pcolor2) - ite->Pcolor2 = it.data(); + if (it.key() == ite->fillColor()) + ite->setFillColor(it.data()); + if (it.key() == ite->lineColor()) + ite->setLineColor(it.data()); QPtrVector cstops = ite->fill_gradient.colorStops(); for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst) { @@ -10370,7 +10370,8 @@ itemError.clear(); if (((it->isAnnotation) || (it->isBookmark)) && (checkerSettings.checkAnnotations)) itemError.insert(7, 0); - if (((it->TranspStroke != 0.0) || (it->TranspStroke != 0.0)) && (checkerSettings.checkTransparency)) + // XXX PROBABLE BUG: The first in this clause should probably be Transparency not lineTransparency() + if (((it->lineTransparency() != 0.0) || (it->lineTransparency() != 0.0)) && (checkerSettings.checkTransparency)) itemError.insert(6, 0); if ((it->OwnPage == -1) && (checkerSettings.checkOrphans)) itemError.insert(3, 0); @@ -10425,7 +10426,7 @@ { it = doc->DocItems.at(d); itemError.clear(); - if (((it->Transparency != 0.0) || (it->TranspStroke != 0.0)) && (checkerSettings.checkTransparency)) + if (((it->fillTransparency() != 0.0) || (it->lineTransparency() != 0.0)) && (checkerSettings.checkTransparency)) itemError.insert(6, 0); if (((it->isAnnotation) || (it->isBookmark)) && (checkerSettings.checkAnnotations)) itemError.insert(7, 0); Index: scribusXml.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribusXml.cpp,v retrieving revision 1.83.2.43 diff -u -r1.83.2.43 scribusXml.cpp --- scribusXml.cpp 2 Feb 2005 18:35:05 -0000 1.83.2.43 +++ scribusXml.cpp 2 Feb 2005 18:52:56 -0000 @@ -195,8 +195,8 @@ ob->setAttribute("FRTYPE", item->FrameType); ob->setAttribute("CLIPEDIT", item->ClipEdited ? 1 : 0); ob->setAttribute("PWIDTH",item->Pwidth); - ob->setAttribute("PCOLOR",item->Pcolor); - ob->setAttribute("PCOLOR2",item->Pcolor2); + ob->setAttribute("PCOLOR",item->fillColor()); + ob->setAttribute("PCOLOR2",item->lineColor()); ob->setAttribute("TXTFILL",item->TxtFill); ob->setAttribute("TXTSTROKE",item->TxtStroke); ob->setAttribute("TXTSTRSH",item->ShTxtStroke); @@ -206,8 +206,8 @@ ob->setAttribute("COLUMNS", item->Cols); ob->setAttribute("COLGAP", item->ColGap); ob->setAttribute("NAMEDLST",item->NamedLStyle); - ob->setAttribute("SHADE",item->Shade); - ob->setAttribute("SHADE2",item->Shade2); + ob->setAttribute("SHADE",item->fillShade()); + ob->setAttribute("SHADE2",item->lineShade()); ob->setAttribute("GRTYP",item->GrType); ob->setAttribute("ROT",item->Rot); ob->setAttribute("PLINEART",item->PLineArt); @@ -302,8 +302,8 @@ ob->setAttribute("LOCKR", item->sizeLocked() ? 1 : 0); ob->setAttribute("REVERS", item->Reverse ? 1 : 0); ob->setAttribute("INVERS", item->InvPict ? 1 : 0); - ob->setAttribute("TransValue", item->Transparency); - ob->setAttribute("TransValueS", item->TranspStroke); + ob->setAttribute("TransValue", item->fillTransparency()); + ob->setAttribute("TransValueS", item->lineTransparency()); ob->setAttribute("isTableItem", static_cast(item->isTableItem)); ob->setAttribute("TopLine", static_cast(item->TopLine)); ob->setAttribute("LeftLine", static_cast(item->LeftLine)); Index: scribusview.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribusview.cpp,v retrieving revision 1.76.2.86 diff -u -r1.76.2.86 scribusview.cpp --- scribusview.cpp 2 Feb 2005 18:35:04 -0000 1.76.2.86 +++ scribusview.cpp 2 Feb 2005 18:52:59 -0000 @@ -539,10 +539,10 @@ painter->save(); painter->translate(b->Xpos*Scale, b->Ypos*Scale); painter->rotate(b->Rot); - if (b->Pcolor2 != "None") + if (b->lineColor() != "None") { QColor tmp; - b->SetFarbe(&tmp, b->Pcolor2, b->Shade2); + b->SetFarbe(&tmp, b->lineColor(), b->lineShade()); if ((b->TopLine) || (b->RightLine) || (b->BottomLine) || (b->LeftLine)) { painter->setPen(tmp, b->Pwidth, b->PLineArt, Qt::SquareCap, b->PLineJoin); @@ -623,7 +623,7 @@ { HR->ItemPos = b->Xpos - Doc->ScratchLeft; HR->ItemEndPos = (b->Xpos+b->Width) - Doc->ScratchLeft; - if (b->Pcolor2 != "None") + if (b->lineColor() != "None") HR->lineCorr = b->Pwidth / 2.0; else HR->lineCorr = 0; @@ -662,10 +662,10 @@ painter->save(); painter->translate(b->Xpos*Scale, b->Ypos*Scale); painter->rotate(b->Rot); - if (b->Pcolor2 != "None") + if (b->lineColor() != "None") { QColor tmp; - b->SetFarbe(&tmp, b->Pcolor2, b->Shade2); + b->SetFarbe(&tmp, b->lineColor(), b->lineShade()); if ((b->TopLine) || (b->RightLine) || (b->BottomLine) || (b->LeftLine)) { painter->setPen(tmp, b->Pwidth, b->PLineArt, Qt::SquareCap, b->PLineJoin); @@ -1374,9 +1374,9 @@ emit ItemPos(b->Xpos, b->Ypos); emit SetSizeValue(b->Pwidth); emit SetLineArt(b->PLineArt, b->PLineEnd, b->PLineJoin); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); emit ItemGradient(b->GrType); - emit ItemTrans(b->Transparency, b->TranspStroke); + emit ItemTrans(b->fillTransparency(), b->lineTransparency()); emit HaveSel(7); } updateContents(); @@ -3709,7 +3709,7 @@ else { cli.putPoints(0, EndInd-StartInd, Clip, StartInd); - z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->Pcolor, b->Pcolor2); + z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->fillColor(), b->lineColor()); bb = Doc->Items.at(z); if (EditContour) bb->ContourLine.resize(0); @@ -3763,7 +3763,7 @@ { if ((ClRe > 1) && (ClRe < static_cast(Clip.size()-2))) { - z = PaintPolyLine(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->Pcolor, b->Pcolor2); + z = PaintPolyLine(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->fillColor(), b->lineColor()); bb = Doc->Items.at(z); if (EditContour) bb->ContourLine.putPoints(0, Clip.size()-(ClRe+2), Clip, ClRe+2); @@ -4125,9 +4125,9 @@ emit ItemPos(b->Xpos, b->Ypos); emit SetSizeValue(b->Pwidth); emit SetLineArt(b->PLineArt, b->PLineEnd, b->PLineJoin); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); emit ItemGradient(b->GrType); - emit ItemTrans(b->Transparency, b->TranspStroke); + emit ItemTrans(b->fillTransparency(), b->lineTransparency()); emit HaveSel(5); break; case Rotation: @@ -4268,9 +4268,9 @@ emit ItemPos(b->Xpos, b->Ypos); emit SetSizeValue(b->Pwidth); emit SetLineArt(b->PLineArt, b->PLineEnd, b->PLineJoin); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); emit ItemGradient(b->GrType); - emit ItemTrans(b->Transparency, b->TranspStroke); + emit ItemTrans(b->fillTransparency(), b->lineTransparency()); emit HaveSel(6); break; } @@ -4311,9 +4311,9 @@ emit ItemPos(b->Xpos, b->Ypos); emit SetSizeValue(b->Pwidth); emit SetLineArt(b->PLineArt, b->PLineEnd, b->PLineJoin); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); emit ItemGradient(b->GrType); - emit ItemTrans(b->Transparency, b->TranspStroke); + emit ItemTrans(b->fillTransparency(), b->lineTransparency()); emit HaveSel(7); break; case InsertPDFButton: @@ -6429,7 +6429,7 @@ if (b->itemText.count() == 0) { double lineCorr; - if (b->Pcolor2 != "None") + if (b->lineColor() != "None") lineCorr = b->Pwidth / 2.0; else lineCorr = 0; @@ -6443,7 +6443,7 @@ if (b->itemText.at(b->CPos)->ch == QChar(9)) { double lineCorr; - if (b->Pcolor2 != "None") + if (b->lineColor() != "None") lineCorr = b->Pwidth / 2.0; else lineCorr = 0; @@ -7278,9 +7278,9 @@ emit SetSizeValue(b->Pwidth); emit SetLineArt(b->PLineArt, b->PLineEnd, b->PLineJoin); emit SetLocalValues(b->LocalScX, b->LocalScY, b->LocalX, b->LocalY ); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); emit ItemGradient(b->GrType); - emit ItemTrans(b->Transparency, b->TranspStroke); + emit ItemTrans(b->fillTransparency(), b->lineTransparency()); emit ItemTextAttr(b->LineSp); emit ItemTextUSval(b->ExtraV); emit SetDistValues(b->Extra, b->TExtra, b->BExtra, b->RExtra); @@ -7887,8 +7887,8 @@ b->EmProfile = ""; b->ScaleType = true; b->AspectRatio = true; - b->Transparency = 0.0; - b->TranspStroke = 0.0; + b->setFillTransparency(0.0); + b->setLineTransparency(0.0); b->InvPict = false; emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr); } @@ -9051,8 +9051,8 @@ else Doc->DocItems = Doc->Items; ite->PLineArt = PenStyle(Doc->toolSettings.dLineArt); - ite->Shade = Doc->toolSettings.dShade; - ite->Shade2 = Doc->toolSettings.dShade2; + ite->setFillShade(Doc->toolSettings.dShade); + ite->setLineShade(Doc->toolSettings.dShade2); ite->ItemNr = Doc->Items.count()-1; SetOvalFrame(ite); ite->ContourLine = ite->PoLine.copy(); @@ -9092,7 +9092,7 @@ Doc->MasterItems = Doc->Items; else Doc->DocItems = Doc->Items; - ite->Shade = Doc->toolSettings.shadePict; + ite->setFillShade(Doc->toolSettings.shadePict); ite->LocalScX = Doc->toolSettings.scaleX; ite->LocalScY = Doc->toolSettings.scaleY; ite->ScaleType = Doc->toolSettings.scaleType; @@ -9139,8 +9139,8 @@ else Doc->DocItems = Doc->Items; ite->PLineArt = PenStyle(Doc->toolSettings.dLineArt); - ite->Shade = Doc->toolSettings.dShade; - ite->Shade2 = Doc->toolSettings.dShade2; + ite->setFillShade(Doc->toolSettings.dShade); + ite->setLineShade(Doc->toolSettings.dShade2); ite->ItemNr = Doc->Items.count()-1; SetRectFrame(ite); ite->ContourLine = ite->PoLine.copy(); @@ -9181,8 +9181,8 @@ else Doc->DocItems = Doc->Items; ite->PLineArt = PenStyle(Doc->toolSettings.dLineArt); - ite->Shade = Doc->toolSettings.dShade; - ite->Shade2 = Doc->toolSettings.dShade2; + ite->setFillShade(Doc->toolSettings.dShade); + ite->setLineShade(Doc->toolSettings.dShade2); ite->ItemNr =Doc-> Items.count()-1; ite->ClipEdited = true; ite->FrameType = 3; @@ -9223,8 +9223,8 @@ else Doc->DocItems = Doc->Items; ite->PLineArt = PenStyle(Doc->toolSettings.dLineArt); - ite->Shade = Doc->toolSettings.dShade; - ite->Shade2 = Doc->toolSettings.dShade2; + ite->setFillShade(Doc->toolSettings.dShade); + ite->setLineShade(Doc->toolSettings.dShade2); ite->ItemNr = Doc->Items.count()-1; ite->ClipEdited = true; if (!Doc->loading) @@ -9305,7 +9305,7 @@ else Doc->DocItems = Doc->Items; ite->PLineArt = PenStyle(Doc->toolSettings.dLstyleLine); - ite->Shade2 = Doc->toolSettings.dShadeLine; + ite->setLineShade(Doc->toolSettings.dShadeLine); ite->ItemNr = Doc->Items.count()-1; if (!Doc->loading) { @@ -9524,7 +9524,7 @@ continue; i->setLineColor(farbe); RefreshItem(i); - emit ItemFarben(i->Pcolor2, i->Pcolor, i->Shade2, i->Shade); + emit ItemFarben(i->lineColor(), i->fillColor(), i->lineShade(), i->fillShade()); } if (SelItem.count() > 1) undoManager->commit(); @@ -9557,7 +9557,7 @@ } } RefreshItem(b); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); } } } @@ -9587,7 +9587,7 @@ } } RefreshItem(b); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); } } } @@ -9694,7 +9694,7 @@ b = SelItem.at(a); b->setFillColor(farbe); RefreshItem(b); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); } if (SelItem.count() > 1) undoManager->commit(); @@ -9714,7 +9714,7 @@ { b = SelItem.at(a); b->setFillShade(sha); - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); RefreshItem(b); } if (SelItem.count() > 1) @@ -10684,10 +10684,10 @@ b->RadRect = Buffer->RadRect; b->FrameType = Buffer->FrameType; b->ClipEdited = Buffer->ClipEdited; - b->Pcolor = Buffer->Pcolor; - b->Pcolor2 = Buffer->Pcolor2; - b->Shade = Buffer->Shade; - b->Shade2 = Buffer->Shade2; + b->setFillColor(Buffer->Pcolor); + b->setLineColor(Buffer->Pcolor2); + b->setFillShade(Buffer->Shade); + b->setLineShade(Buffer->Shade2); b->TxtStroke = Buffer->TxtStroke; b->TxtFill = Buffer->TxtFill; b->ShTxtStroke = Buffer->ShTxtStroke; @@ -10795,8 +10795,8 @@ b->DashOffset = Buffer->DashOffset; b->setLocked(Buffer->Locked); b->setSizeLocked(Buffer->LockRes); - b->Transparency = Buffer->Transparency; - b->TranspStroke = Buffer->TranspStroke; + b->setFillTransparency(Buffer->Transparency); + b->setLineTransparency(Buffer->TranspStroke); b->Reverse = Buffer->Reverse; b->InvPict = Buffer->InvPict; b->NamedLStyle = Buffer->NamedLStyle; @@ -11134,9 +11134,9 @@ PageItem *b; if (GetItem(&b)) { - emit ItemFarben(b->Pcolor2, b->Pcolor, b->Shade2, b->Shade); + emit ItemFarben(b->lineColor(), b->fillColor(), b->lineShade(), b->fillShade()); emit ItemGradient(b->GrType); - emit ItemTrans(b->Transparency, b->TranspStroke); + emit ItemTrans(b->fillTransparency(), b->lineTransparency()); } } @@ -11160,7 +11160,7 @@ b->PType = 8; b->PoLine = bb->PoLine.copy(); b->Pwidth = bb->Pwidth; - b->Pcolor2 = bb->Pcolor2; + b->setLineColor(bb->lineColor()); b->PLineArt = bb->PLineArt; b->PLineEnd = bb->PLineEnd; b->PLineJoin = bb->PLineJoin; @@ -11185,7 +11185,7 @@ PageItem *b; if (GetItem(&b)) { - uint z = PaintPolyLine(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, "None", b->Pcolor2); + uint z = PaintPolyLine(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, "None", b->lineColor()); PageItem *bb = Doc->Items.at(z); bb->PoLine = b->PoLine.copy(); bb->ClipEdited = true; @@ -11194,7 +11194,7 @@ SetPolyClip(bb, qRound(QMAX(bb->Pwidth / 2, 1))); AdjustItemSize(bb); b->PType = 4; - b->Pcolor2 = "None"; + b->setLineColor("None"); b->Frame = true; SetRectFrame(b); SelectItemNr(b->ItemNr); @@ -11258,7 +11258,7 @@ if (b->imageFlippedV()) chma.scale(1, -1); pts.map(chma); - uint z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->Pcolor2, b->Pcolor); + uint z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->lineColor(), b->fillColor()); bb = Doc->Items.at(z); bb->Textflow = b->Textflow; bb->Textflow2 = b->Textflow2; @@ -11269,17 +11269,17 @@ bb->AutoName = false; bb->PoLine = pts.copy(); bb->Rot = b->Rot; - bb->Pcolor = b->itemText.at(a)->ccolor; - bb->Shade = b->itemText.at(a)->cshade; + bb->setFillColor(b->itemText.at(a)->ccolor); + bb->setFillShade(b->itemText.at(a)->cshade); if (b->itemText.at(a)->cstyle & 4) { - bb->Pcolor2 = b->itemText.at(a)->cstroke; - bb->Shade2 = b->itemText.at(a)->cshade2; + bb->lineColor() = b->itemText.at(a)->cstroke; + bb->setLineShade(b->itemText.at(a)->cshade2); } else { - bb->Pcolor2 = "None"; - bb->Shade2 = 100; + bb->lineColor() = "None"; + bb->setLineShade(100); } bb->Pwidth = QMAX((*Doc->AllFonts)[b->itemText.at(a)->cfont]->strokeWidth * chs / 2.0, 1); FPoint tp2 = getMinClipF(&bb->PoLine); @@ -11376,7 +11376,7 @@ if (b->PoLine.point(a).x() > 900000) { StartInd = a + 1; - z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->Pcolor, b->Pcolor2); + z = PaintPoly(b->Xpos, b->Ypos, b->Width, b->Height, b->Pwidth, b->fillColor(), b->lineColor()); bb = Doc->Items.at(z); bb->PoLine.resize(0); bb->PoLine.putPoints(0, EndInd - StartInd, b->PoLine, StartInd); Index: util.cpp =================================================================== RCS file: /cvs/Scribus/scribus/util.cpp,v retrieving revision 1.52.2.17 diff -u -r1.52.2.17 util.cpp --- util.cpp 2 Feb 2005 18:35:06 -0000 1.52.2.17 +++ util.cpp 2 Feb 2005 18:53:00 -0000 @@ -1786,10 +1786,10 @@ Buffer->FrameType = b->FrameType; Buffer->ClipEdited = b->ClipEdited; Buffer->Pwidth = b->Pwidth; - Buffer->Pcolor = b->Pcolor; - Buffer->Pcolor2 = b->Pcolor2; - Buffer->Shade = b->Shade; - Buffer->Shade2 = b->Shade2; + Buffer->Pcolor = b->fillColor(); + Buffer->Pcolor2 = b->lineColor(); + Buffer->Shade = b->fillShade(); + Buffer->Shade2 = b->lineShade(); Buffer->GrColor = ""; Buffer->GrColor2 = ""; Buffer->GrShade = 100; @@ -1914,8 +1914,8 @@ Buffer->AspectRatio = b->AspectRatio; Buffer->Locked = b->locked(); Buffer->LockRes = b->sizeLocked(); - Buffer->Transparency = b->Transparency; - Buffer->TranspStroke = b->TranspStroke; + Buffer->Transparency = b->fillTransparency(); + Buffer->TranspStroke = b->lineTransparency(); Buffer->Reverse = b->Reverse; Buffer->InvPict = b->InvPict; Buffer->NamedLStyle = b->NamedLStyle; @@ -2086,7 +2086,7 @@ OB->ClipEdited = QStoInt(obj->attribute("CLIPEDIT", "0")); OB->FrameType = QStoInt(obj->attribute("FRTYPE", "0")); OB->Pwidth=QStodouble(obj->attribute("PWIDTH")); - OB->Pcolor=obj->attribute("PCOLOR"); + OB->Pcolor = obj->attribute("PCOLOR"); if ((!newVersion) && (OB->PType == 4)) { OB->TxtFill = obj->attribute("PCOLOR2"); @@ -2097,8 +2097,8 @@ OB->Pcolor2 = obj->attribute("PCOLOR2"); OB->TxtFill = obj->attribute("TXTFILL", "Black"); } - OB->Shade=QStoInt(obj->attribute("SHADE")); - OB->Shade2=QStoInt(obj->attribute("SHADE2")); + OB->Shade = QStoInt(obj->attribute("SHADE")); + OB->Shade2 = QStoInt(obj->attribute("SHADE2")); OB->TxtStroke=obj->attribute("TXTSTROKE", "None"); OB->ShTxtFill=QStoInt(obj->attribute("TXTFILLSH", "100")); OB->ShTxtStroke=QStoInt(obj->attribute("TXTSTRSH", "100")); Index: libpdf/pdflib.cpp =================================================================== RCS file: /cvs/Scribus/scribus/libpdf/pdflib.cpp,v retrieving revision 1.78.2.23 diff -u -r1.78.2.23 pdflib.cpp --- libpdf/pdflib.cpp 2 Feb 2005 18:34:59 -0000 1.78.2.23 +++ libpdf/pdflib.cpp 2 Feb 2005 18:53:01 -0000 @@ -918,7 +918,7 @@ if ((pag->PageNam != "") && (ite->OwnPage != static_cast(pag->PageNr)) && (ite->OwnPage != -1)) continue; PutPage("q\n"); - if (((ite->Transparency != 0) || (ite->TranspStroke != 0)) && (Options->Version == 14)) + if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version == 14)) PDF_Transparenz(ite); if ((ite->isBookmark) && (Options->Bookmarks)) PDF_Bookmark(ite->BMnr, doc->PageH - ite->Ypos); @@ -929,10 +929,10 @@ } if (Options->UseRGB) { - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" rg\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" RG\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" rg\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" RG\n"); } else { @@ -944,18 +944,18 @@ PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" CS\n"); - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" scn\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" SCN\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" scn\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" SCN\n"); } else { #endif - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" k\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" K\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" k\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" K\n"); } #ifdef HAVE_CMS } @@ -1043,7 +1043,7 @@ switch (ite->PType) { case 2: - if ((ite->Pcolor != "None") || (ite->GrType != 0)) + if ((ite->fillColor() != "None") || (ite->GrType != 0)) { if (ite->GrType != 0) PDF_Gradient(ite); @@ -1066,7 +1066,7 @@ false, ite->IProfile, ite->UseEmbedded, ite->IRender); PutPage("Q\n"); - if (((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) + if (((ite->lineColor() != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -1113,7 +1113,7 @@ arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrowTrans.scale(-1,1); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -1121,13 +1121,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -1137,12 +1137,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -1157,7 +1157,7 @@ arrowTrans.translate(ite->Width, 0); arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -1165,13 +1165,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -1181,12 +1181,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -1202,13 +1202,13 @@ PDF_Gradient(ite); else { - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { PutPage(SetClipPath(ite)); PutPage("h\nf*\n"); } } - if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) + if ((ite->lineColor() != "None") || (ite->NamedLStyle != "")) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -1234,14 +1234,14 @@ PDF_Gradient(ite); else { - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { PutPage(SetClipPath(ite)); PutPage("h\nf*\n"); } } } - if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) + if ((ite->lineColor() != "None") || (ite->NamedLStyle != "")) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -1274,7 +1274,7 @@ arrowTrans.rotate(r); arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -1282,13 +1282,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -1298,12 +1298,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -1329,7 +1329,7 @@ arrowTrans.rotate(r); arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -1337,13 +1337,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -1353,12 +1353,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -1376,7 +1376,7 @@ if (ite->PoLine.size() > 3) { PutPage("q\n"); - if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) + if ((ite->lineColor() != "None") || (ite->NamedLStyle != "")) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -1668,14 +1668,14 @@ ite->BoundingY = OldBY; } PutPage("q\n"); - if (((ite->Transparency != 0) || (ite->TranspStroke != 0)) && (Options->Version == 14)) + if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version == 14)) PDF_Transparenz(ite); if (Options->UseRGB) { - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" rg\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" RG\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" rg\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" RG\n"); } else { @@ -1700,18 +1700,18 @@ PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" CS\n"); - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" scn\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" SCN\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" scn\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" SCN\n"); } else { #endif - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" k\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" K\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" k\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" K\n"); } #ifdef HAVE_CMS } @@ -1782,7 +1782,7 @@ sr = 0; PutPage(FToStr(cr)+" "+FToStr(sr)+" "+FToStr(-sr)+" "+FToStr(cr)+" 0 0 cm\n"); } - if ((ite->Pcolor != "None") || (ite->GrType != 0)) + if ((ite->fillColor() != "None") || (ite->GrType != 0)) { if (ite->GrType != 0) PDF_Gradient(ite); @@ -1799,7 +1799,7 @@ PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n"); PutPage(setTextSt(ite, PNr)); PutPage("Q\n"); - if (((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) + if (((ite->lineColor() != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -1832,14 +1832,14 @@ if (!ite->isTableItem) continue; PutPage("q\n"); - if (((ite->Transparency != 0) || (ite->TranspStroke != 0)) && (Options->Version == 14)) + if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version == 14)) PDF_Transparenz(ite); if (Options->UseRGB) { - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" rg\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" RG\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" rg\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" RG\n"); } else { @@ -1851,18 +1851,18 @@ PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" CS\n"); - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" scn\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" SCN\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" scn\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" SCN\n"); } else { #endif - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" k\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" K\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" k\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" K\n"); } #ifdef HAVE_CMS } @@ -1995,7 +1995,7 @@ if ((pag->PageNam != "") && (ite->OwnPage != static_cast(pag->PageNr)) && (ite->OwnPage != -1)) continue; PutPage("q\n"); - if (((ite->Transparency != 0) || (ite->TranspStroke != 0)) && (Options->Version == 14)) + if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version == 14)) PDF_Transparenz(ite); if ((ite->isBookmark) && (Options->Bookmarks)) PDF_Bookmark(ite->BMnr, doc->PageH - ite->Ypos); @@ -2006,10 +2006,10 @@ } if (Options->UseRGB) { - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" rg\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" RG\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" rg\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" RG\n"); } else { @@ -2021,18 +2021,18 @@ PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" CS\n"); - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" scn\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" SCN\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" scn\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" SCN\n"); } else { #endif - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" k\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" K\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" k\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" K\n"); } #ifdef HAVE_CMS } @@ -2120,7 +2120,7 @@ switch (ite->PType) { case 2: - if ((ite->Pcolor != "None") || (ite->GrType != 0)) + if ((ite->fillColor() != "None") || (ite->GrType != 0)) { if (ite->GrType != 0) PDF_Gradient(ite); @@ -2143,7 +2143,7 @@ false, ite->IProfile, ite->UseEmbedded, ite->IRender); PutPage("Q\n"); - if (((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) + if (((ite->lineColor() != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -2168,7 +2168,7 @@ PDF_Annotation(ite, PNr); break; } - if ((ite->Pcolor != "None") || (ite->GrType != 0)) + if ((ite->fillColor() != "None") || (ite->GrType != 0)) { if (ite->GrType != 0) PDF_Gradient(ite); @@ -2185,7 +2185,7 @@ PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n"); PutPage(setTextSt(ite, PNr)); PutPage("Q\n"); - if (((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) + if (((ite->lineColor() != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -2230,7 +2230,7 @@ arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrowTrans.scale(-1,1); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -2238,13 +2238,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -2254,12 +2254,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -2274,7 +2274,7 @@ arrowTrans.translate(ite->Width, 0); arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -2282,13 +2282,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -2298,12 +2298,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -2319,13 +2319,13 @@ PDF_Gradient(ite); else { - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { PutPage(SetClipPath(ite)); PutPage("h\nf*\n"); } } - if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) + if ((ite->lineColor() != "None") || (ite->NamedLStyle != "")) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -2351,14 +2351,14 @@ PDF_Gradient(ite); else { - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { PutPage(SetClipPath(ite)); PutPage("h\nf*\n"); } } } - if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) + if ((ite->lineColor() != "None") || (ite->NamedLStyle != "")) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -2391,7 +2391,7 @@ arrowTrans.rotate(r); arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -2399,13 +2399,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -2415,12 +2415,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -2446,7 +2446,7 @@ arrowTrans.rotate(r); arrowTrans.scale(ite->Pwidth, ite->Pwidth); arrow.map(arrowTrans); - if ((ite->TranspStroke != 0) && (Options->Version == 14)) + if ((ite->lineTransparency() != 0) && (Options->Version == 14)) { StartObj(ObjCounter); QString ShName = ResNam+IToStr(ResCount); @@ -2454,13 +2454,13 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - ite->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - ite->TranspStroke)+"\n"); + PutDoc("/CA "+FToStr(1.0 - ite->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - ite->lineTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } if (Options->UseRGB) - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" rg\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" rg\n"); else { #ifdef HAVE_CMS @@ -2470,12 +2470,12 @@ PutPage(tmp[Options->Intent]); PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" scn\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" scn\n"); } else { #endif - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" k\n"); + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" k\n"); } #ifdef HAVE_CMS } @@ -2493,7 +2493,7 @@ if (ite->PoLine.size() > 3) { PutPage("q\n"); - if ((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) + if ((ite->lineColor() != "None") || (ite->NamedLStyle != "")) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { @@ -2542,7 +2542,7 @@ if ((pag->PageNam != "") && (ite->OwnPage != static_cast(pag->PageNr)) && (ite->OwnPage != -1)) continue; PutPage("q\n"); - if (((ite->Transparency != 0) || (ite->TranspStroke != 0)) && + if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version == 14)) PDF_Transparenz(ite); if (!ite->isPrintable) @@ -2552,10 +2552,10 @@ } if (Options->UseRGB) { - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" rg\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" RG\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" rg\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" RG\n"); } else { @@ -2568,18 +2568,18 @@ PutPage(" ri\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" cs\n"); PutPage("/"+ICCProfiles[Options->SolidProf].ResName+" CS\n"); - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" scn\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" SCN\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" scn\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" SCN\n"); } else { #endif - if (ite->Pcolor != "None") - PutPage(SetFarbe(ite->Pcolor, ite->Shade)+" k\n"); - if (ite->Pcolor2 != "None") - PutPage(SetFarbe(ite->Pcolor2, ite->Shade2)+" K\n"); + if (ite->fillColor() != "None") + PutPage(SetFarbe(ite->fillColor(), ite->fillShade())+" k\n"); + if (ite->lineColor() != "None") + PutPage(SetFarbe(ite->lineColor(), ite->lineShade())+" K\n"); } #ifdef HAVE_CMS } @@ -3279,8 +3279,8 @@ ResCount++; ObjCounter++; PutDoc("<< /Type /ExtGState\n"); - PutDoc("/CA "+FToStr(1.0 - b->TranspStroke)+"\n"); - PutDoc("/ca "+FToStr(1.0 - b->Transparency)+"\n"); + PutDoc("/CA "+FToStr(1.0 - b->lineTransparency())+"\n"); + PutDoc("/ca "+FToStr(1.0 - b->fillTransparency())+"\n"); PutDoc("/BM /Normal\n>>\nendobj\n"); PutPage("/"+ShName+" gs\n"); } @@ -3623,8 +3623,8 @@ { if (ite->TxtFill != "None") cnx += " "+SetFarbe(ite->TxtFill, ite->ShTxtFill)+" rg\n"; - if (ite->Pcolor != "None") - cnx += " "+SetFarbe(ite->Pcolor, ite->Shade)+" RG\n"; + if (ite->fillColor() != "None") + cnx += " "+SetFarbe(ite->fillColor(), ite->fillShade())+" RG\n"; } else { @@ -3633,8 +3633,8 @@ { cnx += " /"+ICCProfiles[Options->SolidProf].ResName+" cs\n"; cnx += " /"+ICCProfiles[Options->SolidProf].ResName+" CS\n"; - if (ite->Pcolor != "None") - cnx += SetFarbe(ite->Pcolor, ite->Shade)+" SCN\n"; + if (ite->fillColor() != "None") + cnx += SetFarbe(ite->fillColor(), ite->fillShade())+" SCN\n"; if (ite->TxtFill != "None") cnx += SetFarbe(ite->TxtFill, ite->ShTxtFill)+" scn\n"; } @@ -3643,8 +3643,8 @@ #endif if (ite->TxtFill != "None") cnx += " "+SetFarbe(ite->TxtFill, ite->ShTxtFill)+" k"; - if (ite->Pcolor != "None") - cnx += " "+SetFarbe(ite->Pcolor, ite->Shade)+" K"; + if (ite->fillColor() != "None") + cnx += " "+SetFarbe(ite->fillColor(), ite->fillShade())+" K"; } #ifdef HAVE_CMS } @@ -3707,8 +3707,8 @@ } else { - if (ite->Pcolor != "None") - PutDoc("/BG [ "+SetFarbe(ite->Pcolor, ite->Shade)+" ] "); + if (ite->fillColor() != "None") + PutDoc("/BG [ "+SetFarbe(ite->fillColor(), ite->fillShade())+" ] "); if (ite->AnBColor != "None") PutDoc("/BC [ "+SetFarbe(ite->AnBColor, 100)+" ] "); } @@ -3911,26 +3911,26 @@ cc = ""; if (Options->UseRGB) { - if (ite->Pcolor != "None") - cc += SetFarbe(ite->Pcolor, ite->Shade)+" RG\n"; + if (ite->fillColor() != "None") + cc += SetFarbe(ite->fillColor(), ite->fillShade())+" RG\n"; } else { #ifdef HAVE_CMS if ((CMSuse) && (Options->UseProfiles)) { - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { cc += " /"+ICCProfiles[Options->SolidProf].ResName+" cs\n"; cc += " /"+ICCProfiles[Options->SolidProf].ResName+" CS\n"; - cc += SetFarbe(ite->Pcolor, ite->Shade)+" SCN\n"; + cc += SetFarbe(ite->fillColor(), ite->fillShade())+" SCN\n"; } } else { #endif - if (ite->Pcolor != "None") - cc += SetFarbe(ite->Pcolor, ite->Shade)+" K\n"; + if (ite->fillColor() != "None") + cc += SetFarbe(ite->fillColor(), ite->fillShade())+" K\n"; } #ifdef HAVE_CMS } Index: libpostscript/pslib.cpp =================================================================== RCS file: /cvs/Scribus/scribus/libpostscript/pslib.cpp,v retrieving revision 1.24.2.16 diff -u -r1.24.2.16 pslib.cpp --- libpostscript/pslib.cpp 2 Feb 2005 18:35:00 -0000 1.24.2.16 +++ libpostscript/pslib.cpp 2 Feb 2005 18:53:02 -0000 @@ -1152,9 +1152,9 @@ PS_translate(ite->Xpos - mPage->Xoffset, Doc->PageH -(ite->Ypos) - mPage->Yoffset); if (ite->Rot != 0) PS_rotate(-ite->Rot); - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { - SetFarbe(Doc, ite->Pcolor, ite->Shade, &h, &s, &v, &k, gcr); + SetFarbe(Doc, ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); SetClipPath(&ite->PoLine); PS_closepath(); @@ -1185,11 +1185,11 @@ PS_image(ite->InvPict, -ite->BBoxX+ite->LocalX, -ite->LocalY, ite->Pfile, ite->LocalScX, ite->LocalScY, ite->IProfile, ite->UseEmbedded, Ic); } PS_restore(); - if (((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) + if (((ite->lineColor() != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { - SetFarbe(Doc, ite->Pcolor2, ite->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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_setcapjoin(ite->PLineEnd, ite->PLineJoin); @@ -1229,15 +1229,15 @@ view->Scale = savScale; delete painter; PS_save(); - if (ite->Pcolor != "None") + if (ite->fillColor() != "None") { - SetFarbe(Doc, ite->Pcolor, ite->Shade, &h, &s, &v, &k, gcr); + SetFarbe(Doc, ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); } PS_translate(ite->Xpos - mPage->Xoffset, Doc->PageH - (ite->Ypos - mPage->Yoffset)); if (ite->Rot != 0) PS_rotate(-ite->Rot); - if ((ite->Pcolor != "None") || (ite->GrType != 0)) + if ((ite->fillColor() != "None") || (ite->GrType != 0)) { SetClipPath(&ite->PoLine); PS_closepath(); @@ -1489,11 +1489,11 @@ } } } - if (((ite->Pcolor2 != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) + if (((ite->lineColor() != "None") || (ite->NamedLStyle != "")) && (!ite->isTableItem)) { if ((ite->NamedLStyle == "") && (ite->Pwidth != 0.0)) { - SetFarbe(Doc, ite->Pcolor2, ite->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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_setcapjoin(ite->PLineEnd, ite->PLineJoin); @@ -1530,9 +1530,9 @@ if (ite->isPrintable) { PS_save(); - if (ite->Pcolor2 != "None") + if (ite->lineColor() != "None") { - SetFarbe(Doc, ite->Pcolor2, ite->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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); @@ -1607,14 +1607,14 @@ if (c->isPrintable) { PS_save(); - if (c->Pcolor != "None") + if (c->fillColor() != "None") { - SetFarbe(Doc, c->Pcolor, c->Shade, &h, &s, &v, &k, gcr); + SetFarbe(Doc, c->fillColor(), c->fillShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); } - if (c->Pcolor2 != "None") + if (c->lineColor() != "None") { - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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); @@ -1628,7 +1628,7 @@ case 2: if (master) break; - if ((c->Pcolor != "None") || (c->GrType != 0)) + if ((c->fillColor() != "None") || (c->GrType != 0)) { SetClipPath(&c->PoLine); PS_closepath(); @@ -1661,11 +1661,11 @@ PS_image(c->InvPict, -c->BBoxX+c->LocalX, -c->LocalY, c->Pfile, c->LocalScX, c->LocalScY, c->IProfile, c->UseEmbedded, ic); } PS_restore(); - if (((c->Pcolor2 != "None") || (c->NamedLStyle != "")) && (!c->isTableItem)) + if (((c->lineColor() != "None") || (c->NamedLStyle != "")) && (!c->isTableItem)) { if ((c->NamedLStyle == "") && (c->Pwidth != 0.0)) { - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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_setcapjoin(c->PLineEnd, c->PLineJoin); @@ -1717,7 +1717,7 @@ PDF_Annotation(bm, 0, 0, c->Width, -c->Height); break; } - if ((c->Pcolor != "None") || (c->GrType != 0)) + if ((c->fillColor() != "None") || (c->GrType != 0)) { SetClipPath(&c->PoLine); PS_closepath(); @@ -1972,9 +1972,9 @@ } } } - if (((c->Pcolor2 != "None") || (c->NamedLStyle != "")) && (!c->isTableItem)) + if (((c->lineColor() != "None") || (c->NamedLStyle != "")) && (!c->isTableItem)) { - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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_setcapjoin(c->PLineEnd, c->PLineJoin); @@ -2032,7 +2032,7 @@ arrowTrans.scale(c->Pwidth, c->Pwidth); arrowTrans.scale(-1,1); arrow.map(arrowTrans); - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); PS_newpath(); SetClipPath(&arrow); @@ -2046,7 +2046,7 @@ arrowTrans.translate(c->Width, 0); arrowTrans.scale(c->Pwidth, c->Pwidth); arrow.map(arrowTrans); - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); PS_newpath(); SetClipPath(&arrow); @@ -2057,7 +2057,7 @@ case 1: case 3: case 6: - if ((c->Pcolor != "None") || (c->GrType != 0)) + if ((c->fillColor() != "None") || (c->GrType != 0)) { SetClipPath(&c->PoLine); PS_closepath(); @@ -2066,7 +2066,7 @@ else PS_fill(); } - if ((c->Pcolor2 != "None") || (c->NamedLStyle != "")) + if ((c->lineColor() != "None") || (c->NamedLStyle != "")) { if ((c->NamedLStyle == "") && (c->Pwidth != 0.0)) { @@ -2092,7 +2092,7 @@ } break; case 7: - if ((c->Pcolor != "None") || (c->GrType != 0)) + if ((c->fillColor() != "None") || (c->GrType != 0)) { SetClipPath(&c->PoLine); PS_closepath(); @@ -2136,7 +2136,7 @@ arrowTrans.rotate(r); arrowTrans.scale(c->Pwidth, c->Pwidth); arrow.map(arrowTrans); - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); PS_newpath(); SetClipPath(&arrow); @@ -2161,7 +2161,7 @@ arrowTrans.rotate(r); arrowTrans.scale(c->Pwidth, c->Pwidth); arrow.map(arrowTrans); - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, c->lineColor(), c->lineShade(), &h, &s, &v, &k, gcr); PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0); PS_newpath(); SetClipPath(&arrow); @@ -2362,9 +2362,9 @@ if (c->isPrintable) { PS_save(); - if (c->Pcolor2 != "None") + if (c->lineColor() != "None") { - SetFarbe(Doc, c->Pcolor2, c->Shade2, &h, &s, &v, &k, gcr); + SetFarbe(Doc, 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); Index: plugins/fileloader/oodraw/oodrawimp.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp,v retrieving revision 1.1.2.20 diff -u -r1.1.2.20 oodrawimp.cpp --- plugins/fileloader/oodraw/oodrawimp.cpp 1 Feb 2005 10:40:56 -0000 1.1.2.20 +++ plugins/fileloader/oodraw/oodrawimp.cpp 2 Feb 2005 18:53:03 -0000 @@ -620,8 +620,8 @@ if (ite->PType != 7) ite->PType = 4; } - ite->Transparency = FillTrans; - ite->TranspStroke = StrokeTrans; + ite->setFillTransparency(FillTrans); + ite->setLineTransparency(StrokeTrans); if (dashes.count() != 0) ite->DashValues = dashes; if (drawID != "") Index: plugins/psimport/importps.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/psimport/importps.cpp,v retrieving revision 1.7.2.10 diff -u -r1.7.2.10 importps.cpp --- plugins/psimport/importps.cpp 19 Jan 2005 19:29:23 -0000 1.7.2.10 +++ plugins/psimport/importps.cpp 2 Feb 2005 18:53:03 -0000 @@ -412,8 +412,8 @@ if ((Elements.count() != 0) && (lastPath == currPath)) { ite = Elements.at(Elements.count()-1); - ite->Pcolor = CurrColor; - ite->Transparency = 1.0 - Opacity; + ite->setFillColor(CurrColor); + ite->setFillTransparency(1.0 - Opacity); } else { @@ -430,7 +430,7 @@ ite->Width = wh.x(); ite->Height = wh.y(); ite->Clip = FlattenPath(ite->PoLine, ite->Segments); - ite->Transparency = 1.0 - Opacity; + ite->setFillTransparency(1.0 - Opacity); Prog->view->AdjustItemSize(ite); Elements.append(ite); } @@ -446,11 +446,11 @@ if ((Elements.count() != 0) && (lastPath == currPath)) { ite = Elements.at(Elements.count()-1); - ite->Pcolor2 = CurrColor; + ite->setLineColor(CurrColor); ite->Pwidth = LineW; ite->PLineEnd = CapStyle; ite->PLineJoin = JoinStyle; - ite->TranspStroke = 1.0 - Opacity; + ite->setLineTransparency(1.0 - Opacity); ite->DashOffset = DashOffset; ite->DashValues = DashPattern; } @@ -473,7 +473,7 @@ ite->Width = wh.x(); ite->Height = wh.y(); ite->Clip = FlattenPath(ite->PoLine, ite->Segments); - ite->TranspStroke = 1.0 - Opacity; + ite->setLineTransparency(1.0 - Opacity); Prog->view->AdjustItemSize(ite); Elements.append(ite); } Index: plugins/scriptplugin/cmdgetprop.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp,v retrieving revision 1.8.2.14 diff -u -r1.8.2.14 cmdgetprop.cpp --- plugins/scriptplugin/cmdgetprop.cpp 1 Feb 2005 10:41:40 -0000 1.8.2.14 +++ plugins/scriptplugin/cmdgetprop.cpp 2 Feb 2005 18:53:03 -0000 @@ -9,7 +9,7 @@ if(!checkHaveDocument()) return NULL; PageItem *i = GetUniqueItem(QString::fromUtf8(Name)); - return i != NULL ? PyString_FromString(i->Pcolor.utf8()) : NULL; + return i != NULL ? PyString_FromString(i->fillColor().utf8()) : NULL; } PyObject *scribus_getlinecolor(PyObject */*self*/, PyObject* args) @@ -32,7 +32,7 @@ } } else - return PyString_FromString(it->Pcolor2.utf8()); + return PyString_FromString(it->lineColor().utf8()); PyErr_SetString(NotFoundError, QObject::tr("Color not found - python error", "python error")); return NULL; } @@ -68,7 +68,7 @@ } } else - return PyInt_FromLong(static_cast(it->Shade2)); + return PyInt_FromLong(static_cast(it->lineShade())); return PyInt_FromLong(0L); } @@ -113,7 +113,7 @@ if(!checkHaveDocument()) return NULL; PageItem *i = GetUniqueItem(QString::fromUtf8(Name)); - return i != NULL ? PyInt_FromLong(static_cast(i->Shade)) : NULL; + return i != NULL ? PyInt_FromLong(static_cast(i->fillShade())) : NULL; } PyObject *scribus_getcornerrad(PyObject */*self*/, PyObject* args) Index: plugins/scriptplugin/cmdobj.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp,v retrieving revision 1.11.2.19 diff -u -r1.11.2.19 cmdobj.cpp --- plugins/scriptplugin/cmdobj.cpp 1 Feb 2005 10:41:40 -0000 1.11.2.19 +++ plugins/scriptplugin/cmdobj.cpp 2 Feb 2005 18:53:03 -0000 @@ -560,11 +560,11 @@ PyObject* scribus_getframetype(PyObject */*self*/, PyObject* args, PyObject* kw) { char* frameName = const_cast(""); - char* kwds[] = {const_cast("frame="), const_cast("")}; - if (!PyArg_ParseTupleAndKeywords(args, kw, "|s", kwds, &frameName)) - return NULL; - PageItem *it = GetUniqueItem(QString(frameName)); - if (it == NULL) - return NULL; - return PyInt_FromLong( (long)(it->PType) ); + char* kwds[] = {const_cast("name"), NULL}; + if (!PyArg_ParseTupleAndKeywords(args, kw, "|es", kwds, "utf-8", &frameName)) + return NULL; + PageItem *it = GetUniqueItem(QString(frameName)); + if (it == NULL) + return NULL; + return PyInt_FromLong( (long)(it->PType) ); } Index: plugins/scriptplugin/cmdsetprop.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdsetprop.cpp,v retrieving revision 1.8.2.11 diff -u -r1.8.2.11 cmdsetprop.cpp --- plugins/scriptplugin/cmdsetprop.cpp 20 Dec 2004 13:10:00 -0000 1.8.2.11 +++ plugins/scriptplugin/cmdsetprop.cpp 2 Feb 2005 18:53:03 -0000 @@ -40,7 +40,7 @@ PageItem *i = GetUniqueItem(QString::fromUtf8(Name)); if (i == NULL) return NULL; - i->Pcolor = QString::fromUtf8(Color); + i->setFillColor(QString::fromUtf8(Color)); Py_INCREF(Py_None); return Py_None; } @@ -56,7 +56,7 @@ PageItem *it = GetUniqueItem(QString::fromUtf8(Name)); if (it == NULL) return NULL; - it->Pcolor2 = QString::fromUtf8(Color); + it->setLineColor(QString::fromUtf8(Color)); Py_INCREF(Py_None); return Py_None; } @@ -98,7 +98,7 @@ PageItem *it = GetUniqueItem(QString::fromUtf8(Name)); if (it == NULL) return NULL; - it->Shade2 = w; + it->setLineShade(w); Py_INCREF(Py_None); return Py_None; } @@ -119,7 +119,7 @@ PageItem *i = GetUniqueItem(QString::fromUtf8(Name)); if (i == NULL) return NULL; - i->Shade = w; + i->setFillShade(w); Py_INCREF(Py_None); return Py_None; } Index: plugins/scriptplugin/cmdutil.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp,v retrieving revision 1.6.2.10 diff -u -r1.6.2.10 cmdutil.cpp --- plugins/scriptplugin/cmdutil.cpp 1 Feb 2005 10:41:40 -0000 1.6.2.10 +++ plugins/scriptplugin/cmdutil.cpp 2 Feb 2005 18:53:03 -0000 @@ -100,10 +100,10 @@ ite->itemText.at(d)->cstroke = rep; } } - if (col == ite->Pcolor) - ite->Pcolor = rep; - if (col == ite->Pcolor2) - ite->Pcolor2 = rep; + if (col == ite->fillColor()) + ite->setFillColor(rep); + if (col == ite->lineColor()) + ite->setLineColor(rep); QPtrVector cstops = ite->fill_gradient.colorStops(); for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst) { @@ -128,10 +128,10 @@ ite->itemText.at(d)->cstroke = rep; } } - if (col == ite->Pcolor) - ite->Pcolor = rep; - if (col == ite->Pcolor2) - ite->Pcolor2 = rep; + if (col == ite->fillColor()) + ite->setFillColor(rep); + if (col == ite->lineColor()) + ite->setLineColor(rep); QPtrVector cstops = ite->fill_gradient.colorStops(); for (uint cst = 0; cst < ite->fill_gradient.Stops(); ++cst) { Index: plugins/svgexplugin/svgexplugin.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp,v retrieving revision 1.25.2.6 diff -u -r1.25.2.6 svgexplugin.cpp --- plugins/svgexplugin/svgexplugin.cpp 19 Jan 2005 19:29:23 -0000 1.25.2.6 +++ plugins/svgexplugin/svgexplugin.cpp 2 Feb 2005 18:53:04 -0000 @@ -253,9 +253,9 @@ int h2 = static_cast(Item->BoundingH); if (!QRect(x, y, w, h).intersects(QRect(x2, y2, w2, h2))) continue; - if ((Item->Pcolor != "None") || (Item->GrType != 0)) + if ((Item->fillColor() != "None") || (Item->GrType != 0)) { - fill = "fill:"+SetFarbe(Item->Pcolor, Item->Shade, plug)+";"; + fill = "fill:"+SetFarbe(Item->fillColor(), Item->fillShade(), plug)+";"; if (Item->GrType != 0) { defi = docu->createElement("defs"); @@ -322,16 +322,16 @@ GradCount++; } fill += " fill-rule:evenodd;"; - if (Item->Transparency != 0) - fill += " fill-opacity:"+FToStr(1.0 - Item->Transparency)+";"; + if (Item->fillTransparency() != 0) + fill += " fill-opacity:"+FToStr(1.0 - Item->fillTransparency())+";"; } else fill = "fill:none;"; - if (Item->Pcolor2 != "None") + if (Item->lineColor() != "None") { - stroke = "stroke:"+SetFarbe(Item->Pcolor2, Item->Shade2, plug)+";"; - if (Item->TranspStroke != 0) - stroke += " stroke-opacity:"+FToStr(1.0 - Item->TranspStroke)+";"; + stroke = "stroke:"+SetFarbe(Item->lineColor(), Item->lineShade(), plug)+";"; + if (Item->lineTransparency() != 0) + stroke += " stroke-opacity:"+FToStr(1.0 - Item->lineTransparency())+";"; } else stroke = "stroke:none;"; @@ -446,7 +446,7 @@ } break; case 2: - if ((Item->Pcolor != "None") || (Item->GrType != 0)) + if ((Item->fillColor() != "None") || (Item->GrType != 0)) { ob = docu->createElement("path"); ob.setAttribute("d", SetClipPath(Item)+"Z"); @@ -513,7 +513,7 @@ } break; case 4: - if ((Item->Pcolor != "None") || (Item->GrType != 0)) + if ((Item->fillColor() != "None") || (Item->GrType != 0)) { ob = docu->createElement("path"); ob.setAttribute("d", SetClipPath(Item)+"Z"); @@ -767,8 +767,8 @@ { QString tmp = "fill:none; "; tmp += "stroke:"+SetFarbe(sl->Color, sl->Shade, plug)+"; "; - if (Item->Transparency != 0) - tmp += " stroke-opacity:"+FToStr(1.0 - Item->Transparency)+"; "; + if (Item->fillTransparency() != 0) + tmp += " stroke-opacity:"+FToStr(1.0 - Item->fillTransparency())+"; "; tmp += "stroke-width:"+FToStr(sl->Width)+"pt; "; tmp += "stroke-linecap:"; switch (static_cast(sl->LineEnd)) Index: plugins/svgimplugin/svgplugin.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp,v retrieving revision 1.31.2.21 diff -u -r1.31.2.21 svgplugin.cpp --- plugins/svgimplugin/svgplugin.cpp 1 Feb 2005 10:42:16 -0000 1.31.2.21 +++ plugins/svgimplugin/svgplugin.cpp 2 Feb 2005 18:53:04 -0000 @@ -588,8 +588,8 @@ } if( !b.attribute("id").isEmpty() ) ite->setItemName(" "+b.attribute("id")); - ite->Transparency = gc->Transparency; - ite->TranspStroke = gc->TranspStroke; + ite->setFillTransparency(gc->Transparency); + ite->setLineTransparency(gc->TranspStroke); ite->PLineEnd = gc->PLineEnd; ite->PLineJoin = gc->PLineJoin; ite->Textflow = false; @@ -1453,7 +1453,7 @@ void SVGPlug::parsePA( SvgStyle *obj, const QString &command, const QString ¶ms ) { if( command == "stroke-opacity" ) - obj->TranspStroke = 1.0 - fromPercentage(params); + obj->TranspStroke = 1.0 - fromPercentage(params); else if( command == "fill-opacity" ) obj->Transparency = 1.0 - fromPercentage(params); else if( command == "opacity" ) @@ -1977,8 +1977,8 @@ ite->Ypos -= asce * mm.m22(); if( !e.attribute("id").isEmpty() ) ite->setItemName(" "+e.attribute("id")); - ite->Transparency = gc->Transparency; - ite->TranspStroke = gc->TranspStroke; + ite->setFillTransparency(gc->Transparency); + ite->setLineTransparency(gc->TranspStroke); ite->PLineEnd = gc->PLineEnd; ite->PLineJoin = gc->PLineJoin; ite->Textflow = false; @@ -2045,8 +2045,8 @@ Prog->view->SetRectFrame(ite); if( !e.attribute("id").isEmpty() ) ite->setItemName(" "+e.attribute("id")); - ite->Transparency = gc->Transparency; - ite->TranspStroke = gc->TranspStroke; + ite->setFillTransparency(gc->Transparency); + ite->setLineTransparency(gc->TranspStroke); ite->PLineEnd = gc->PLineEnd; ite->PLineJoin = gc->PLineJoin; ite->Textflow = false;