View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001623 | Scribus | Internal | public | 2005-02-02 09:41 | 2005-02-02 18:23 |
Reporter | Assigned To | cbradney | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86 Linux | OS | Fedora Core | OS Version | 1 |
Product Version | 1.3.0cvs | ||||
Fixed in Version | 1.3.0cvs | ||||
Summary | 0001623: PATCH: Convert more PageItem members to protected | ||||
Description | The attached patch converts the following members of PageItem to protected and renames some of them. It includes the changes of the original patch on this bug, which cbradney has already merged. If that code gets committed I'll clean up any conflicts between it and this patch if required. This applies cleanly to 1.3cvs 2004-02-02 18:24:15 UTC. The member names are now only used in the getter, setter, and PageItem constructor anyway (everything else uses the getter and setter) so they're trivial to change if desired. I sometimes chose slightly clumsy names in order to free up the more obvious name for the getter (getters follow the Qt style: size() and setSize() not getSize() and setSize() ). Generally I've just appended 'Val' to the actual member, eg sizeVal. Locked LockRes flippedV -> imageIsFlippedV flippedH -> imageIsFlippedH Shade -> fillShadeVal Shade2 -> lineShadeVal Transparency -> fillTransparencyVal TranspStroke -> lineTransparencyVal Pcolor -> fillColorVal Pcolor2 -> lineColorVal It converts all users of these members to use the provided getter and setter functions, except for the PageItem constructor. This patch does not rename the equivalent members of the CopyPasteBuffer struct, nor rename the undo actions if it changes the variable name. I'm not sure whether or not this is necessary. flippedH and flippedV are also converted from ints to bools. Getters and properties are also added for all Tsoots' setters to date (though the "all" bit will no doubt not last long at the rate he's working!). You may note the use of the Q_ENUM macro. That registers an enumerated type with QMetaObject so that it can be used in a property. Like the other property stuff, it has no impact on the rest of the code, and enables all sorts of interesting things I plan to demonstrate ... when I catch up with all this. | ||||
Additional Information | P.S: Vim macros and the shell are magic. Most of the conversion was done by stepping through files and using macros to make the changes after checking. Files that needed changing were located with (eg):vim $(egrep 'flipped[HV]' $(find -name \*.cpp -or -name \*.h) | cut -f 1 -d : | uniq) | ||||
Tags | No tags attached. | ||||
Patch | |||||
child of | 0001653 | confirmed | Convert all PageItem direct member access to use getters and setters |
|
Tsoots changes caused a bunch of conflicts with this patch. New version pending. |
|
Patch updated, and now includes changes to make line stroke transparency private too. I'm still testing this, but I wanted to put it up here quickly in the hope of avoiding another round of merging. |
2005-02-02 17:54
|
pageitem_privacy4.diff (91,985 bytes)
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<double>(*(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<int> Groups; bool InvPict; QValueList<double> 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<VColorStop> 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<VColorStop> 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<int>(item->isTableItem)); ob->setAttribute("TopLine", static_cast<int>(item->TopLine)); ob->setAttribute("LeftLine", static_cast<int>(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<int>(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<int>(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<int>(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<int>(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<long>(it->Shade2)); + return PyInt_FromLong(static_cast<long>(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<long>(i->Shade)) : NULL; + return i != NULL ? PyInt_FromLong(static_cast<long>(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*>(""); - char* kwds[] = {const_cast<char*>("frame="), const_cast<char*>("")}; - 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<char*>("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<VColorStop> 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<VColorStop> 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<int>(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<PenCapStyle>(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; |
2005-02-02 17:55
|
pageitem_member_privacy1.diff (38,563 bytes)
? doc/en/tutorials/Makefile ? doc/en/tutorials/Makefile.in ? doc/en/tutorials/freedomyug/Makefile ? doc/en/tutorials/freedomyug/Makefile.in ? icons/Makefile ? icons/Makefile.in ? plugins/Makefile ? plugins/Makefile.in ? plugins/libchar/.deps ? plugins/libchar/.libs ? plugins/libchar/Makefile ? plugins/libchar/Makefile.in ? plugins/libchar/charselect.lo ? plugins/libchar/charselect.moc ? plugins/libchar/libcharselect.la ? plugins/scriptplugin/diffs ? plugins/scriptplugin/samples/Makefile ? plugins/scriptplugin/samples/Makefile.in ? plugins/scriptplugin/scripts/Makefile ? plugins/scriptplugin/scripts/Makefile.in Index: mpalette.cpp =================================================================== RCS file: /cvs/Scribus/scribus/mpalette.cpp,v retrieving revision 1.110.2.22 diff -u -r1.110.2.22 mpalette.cpp --- mpalette.cpp 1 Feb 2005 10:38:38 -0000 1.110.2.22 +++ mpalette.cpp 2 Feb 2005 10:14:18 -0000 @@ -1104,8 +1104,8 @@ connect(Textflow3, SIGNAL(clicked()), this, SLOT(DoFlow3())); disconnect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH())); disconnect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV())); - FlipH->setOn((i->flippedH % 2 != 0)); - FlipV->setOn((i->flippedV % 2 != 0)); + FlipH->setOn(i->imageFlippedH()); + FlipV->setOn(i->imageFlippedV()); connect(FlipH, SIGNAL(clicked()), this, SLOT(DoFlipH())); connect(FlipV, SIGNAL(clicked()), this, SLOT(DoFlipV())); ToggleFlow(); @@ -1130,7 +1130,7 @@ connect(startArrow, SIGNAL(activated(int)), this, SLOT(setStartArrow(int ))); connect(endArrow, SIGNAL(activated(int)), this, SLOT(setEndArrow(int ))); NoPrint->setOn(!i->isPrintable); - setter = i->Locked; + setter = i->locked(); Kette2->setOn(false); Width->setReadOnly(setter); Height->setReadOnly(setter); @@ -1154,14 +1154,14 @@ Xpos->setReadOnly(setter); Ypos->setReadOnly(setter); Rot->setReadOnly(setter); - setter = i->LockRes; + setter = i->sizeLocked(); NoResize->setOn(setter); - if (!i->Locked) + if (!i->locked()) { Width->setReadOnly(setter); Height->setReadOnly(setter); } - if (i->Locked) + if (i->locked()) { HaveItem = true; return; @@ -2863,12 +2863,12 @@ { if (Revert->isOn()) { - CurItem->flippedH = 1; + CurItem->setImageFlippedH(true); CurItem->Reverse = true; } else { - CurItem->flippedH = 0; + CurItem->setImageFlippedV(false); CurItem->Reverse = false; } ScApp->view->RefreshItem(CurItem); @@ -3133,7 +3133,7 @@ { if (ScApp->view->SelItem.count() > 1) { - if (ScApp->view->SelItem.at(0)->Locked) + if (ScApp->view->SelItem.at(0)->locked()) ScApp->view->undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::UnLock, 0, Um::IUnLock); else @@ -3179,7 +3179,7 @@ { if (ScApp->view->SelItem.count() > 1) { - if (ScApp->view->SelItem.at(0)->LockRes) + if (ScApp->view->SelItem.at(0)->sizeLocked()) ScApp->view->undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::SizeUnLock, 0, Um::IUnLock); else Index: pageitem.cpp =================================================================== RCS file: /cvs/Scribus/scribus/pageitem.cpp,v retrieving revision 1.121.2.45 diff -u -r1.121.2.45 pageitem.cpp --- pageitem.cpp 2 Feb 2005 09:20:07 -0000 1.121.2.45 +++ pageitem.cpp 2 Feb 2005 10:14:18 -0000 @@ -134,8 +134,8 @@ dpiY = 72.0; LocalX = 0; LocalY = 0; - flippedH = 0; - flippedV = 0; + imageIsFlippedH = 0; + imageIsFlippedV = 0; BBoxX = 0; BBoxH = 0; RadRect = 0; @@ -448,12 +448,12 @@ p->setupPolygon(&PoLine); p->setClipPath(); p->save(); - if (flippedH % 2 != 0) + if (imageFlippedH()) { p->translate(Width * sc, 0); p->scale(-1, 1); } - if (flippedV % 2 != 0) + if (imageFlippedV()) { p->translate(0, Height * sc); p->scale(1, -1); @@ -667,12 +667,12 @@ } if ((itemText.count() != 0) && (Dirty)) { - if (flippedH % 2 != 0) + if (imageFlippedH()) { p->translate(Width * sc, 0); p->scale(-1, 1); } - if (flippedV % 2 != 0) + if (imageFlippedV()) { p->translate(0, Height * sc); p->scale(1, -1); @@ -807,14 +807,14 @@ } } } - if (flippedH % 2 != 0) + if (imageFlippedH()) { p->translate(Width * sc, 0); p->scale(-1, 1); pf2.translate(Width, 0); pf2.scale(-1, 1); } - if (flippedV % 2 != 0) + if (imageFlippedV()) { p->translate(0, Height * sc); p->scale(1, -1); @@ -2392,6 +2392,17 @@ TranspStroke = newTransparency; } +bool PageItem::imageFlippedH() const +{ + return imageIsFlippedH; +} + +void PageItem::setImageFlippedH(bool flipped) +{ + if (flipped != imageIsFlippedH) + flipImageH(); +} + void PageItem::flipImageH() { if (UndoManager::undoEnabled()) @@ -2400,7 +2411,18 @@ ss->set("IMAGEFLIPH", "imagefliph"); undoManager->action(this, ss); } - flippedH += 1; + imageIsFlippedH = !imageIsFlippedH; +} + +bool PageItem::imageFlippedV() const +{ + return imageIsFlippedV; +} + +void PageItem::setImageFlippedV(bool flipped) +{ + if (flipped != imageIsFlippedV) + flipImageV(); } void PageItem::flipImageV() @@ -2411,7 +2433,7 @@ ss->set("IMAGEFLIPV", "imageflipv"); undoManager->action(this, ss); } - flippedV += 1; + imageIsFlippedV = !imageIsFlippedV; } void PageItem::toggleLock() Index: pageitem.h =================================================================== RCS file: /cvs/Scribus/scribus/pageitem.h,v retrieving revision 1.26.2.22 diff -u -r1.26.2.22 pageitem.h --- pageitem.h 2 Feb 2005 09:20:08 -0000 1.26.2.22 +++ pageitem.h 2 Feb 2005 10:14:18 -0000 @@ -49,6 +49,8 @@ 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) public: PageItem(ScribusDoc *pa, int art, double x, double y, double w, double h, double w2, QString fill, QString outline); ~PageItem() {}; @@ -76,8 +78,6 @@ void DrawZeichenS(ScPainter *p, struct ZZ *hl); void DrawPolyL(QPainter *p, QPointArray pts); QString ExpandToken(uint base); - bool Locked; - bool LockRes; bool Reverse; /** X-Position auf der Seite */ double Xpos; @@ -183,10 +183,6 @@ int OrigH; double dpiX; double dpiY; - /** Anzahl horizontaler Spiegelungen */ - int flippedH; - /** Anzahl vertikaler Spiegelungen */ - int flippedV; /** BoundigBox-X */ double BBoxX; /** BoundingBox-H */ @@ -379,8 +375,17 @@ */ void setLineTransparency(double newTransparency); + /** @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(); + + /** @brief Is the image flipped vertically? */ + bool imageFlippedV() const; + /** @brief Vertically flip / unflip the image */ + void setImageFlippedV(bool flipped); /** @brief Flip an image vertically */ void flipImageV(); @@ -454,10 +459,35 @@ /** * @brief Item name. Unicode. User visible (outline, property palette, etc). - * - * See PageItem::itemName(), PageItem::setItemName() - * */ + * @sa PageItem::itemName(), PageItem::setItemName() + */ QString AnName; + + /** + * @brief Is the image in this image item flipped horizontally? + * @sa PageItem::isImageFlippedH(), PageItem::setImageFlippedH(), + * PageItem::flipImageH(), PageItem::flippedV + */ + bool imageIsFlippedH; + + /** + * @brief Is the image in this image item flipped vertically? + * @sa PageItem::isImageFlippedV(), PageItem::setImageFlippedV(), + * PageItem::flipImageV(), PageItem::flippedH + */ + bool imageIsFlippedV; + + /** + * @brief Is the item locked (cannot be moved, resized, etc)? + * @sa PageItem::locked(), PageItem::setLocked(), PageItem::toggleLock() + */ + bool Locked; + + /** + * @brief Is the item's size locked? + * @sa PageItem::sizeLocked(), PageItem::setSizeLocked(), PageItem::toggleSizeLock() + */ + bool LockRes; }; #endif Index: scribus.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribus.cpp,v retrieving revision 1.228.2.144 diff -u -r1.228.2.144 scribus.cpp --- scribus.cpp 2 Feb 2005 00:03:04 -0000 1.228.2.144 +++ scribus.cpp 2 Feb 2005 10:14:19 -0000 @@ -2002,15 +2002,15 @@ view->DeleteItem(); break; case Key_Prior: - if (!b->Locked) + if (!b->locked()) view->RaiseItem(); break; case Key_Next: - if (!b->Locked) + if (!b->locked()) view->LowerItem(); break; case Key_Left: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->moveGroup(-10, 0); @@ -2021,7 +2021,7 @@ } break; case Key_Right: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->moveGroup(10, 0); @@ -2032,7 +2032,7 @@ } break; case Key_Up: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->moveGroup(0, -10); @@ -2043,7 +2043,7 @@ } break; case Key_Down: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->moveGroup(0, 10); @@ -2087,7 +2087,7 @@ switch (kk) { case Key_Left: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->MoveItemI(-10, 0, b->ItemNr, true); @@ -2098,7 +2098,7 @@ } break; case Key_Right: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->MoveItemI(10, 0, b->ItemNr, true); @@ -2109,7 +2109,7 @@ } break; case Key_Up: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->MoveItemI(0, -10, b->ItemNr, true); @@ -2120,7 +2120,7 @@ } break; case Key_Down: - if (!b->Locked) + if (!b->locked()) { if ( buttonState & ShiftButton ) view->MoveItemI(0, 10, b->ItemNr, true); @@ -3872,7 +3872,7 @@ view->HR->RExtra = b->RExtra; view->HR->First = doc->docParagraphStyles[doc->currentParaStyle].First; view->HR->Indent = doc->docParagraphStyles[doc->currentParaStyle].Indent; - if ((b->flippedH % 2 != 0) || (b->Reverse)) + if (b->imageFlippedH() || (b->Reverse)) view->HR->Revers = true; else view->HR->Revers = false; @@ -4028,7 +4028,7 @@ scrActions["itemUngroup"]->setEnabled(false); scrActions["itemSplitPolygons"]->setEnabled( (b->PType == 6) && (b->Segments.count() != 0) ); } - if (b->Locked) + if (b->locked()) { scrMenuMgr->setMenuEnabled("ItemShapes", false); scrActions["itemAlignDist"]->setEnabled(false); @@ -4109,7 +4109,7 @@ if (view->SelItem.count() != 0) { PageItem* b = view->SelItem.at(0); - scrActions["itemLock"]->setOn(b->Locked); + scrActions["itemLock"]->setOn(b->locked()); } } @@ -7544,7 +7544,7 @@ slotEditPaste(); for (uint b=0; b<view->SelItem.count(); ++b) { - view->SelItem.at(b)->Locked = false; + view->SelItem.at(b)->setLocked(false); view->MoveItem(DispX, DispY, view->SelItem.at(b)); } } @@ -7571,7 +7571,7 @@ slotEditPaste(); for (uint b=0; b<view->SelItem.count(); ++b) { - view->SelItem.at(b)->Locked = false; + view->SelItem.at(b)->setLocked(false); view->MoveItem(dH2, dV2, view->SelItem.at(b), true); } dH2 += dH; @@ -8913,7 +8913,7 @@ { for (uint a=0; a<view->SelItem.count(); ++a) { - if (t == -1 && view->SelItem.at(a)->Locked) + if (t == -1 && view->SelItem.at(a)->locked()) t = QMessageBox::warning(this, tr("Warning"), tr("Some Objects are locked."), tr("&Cancel"), @@ -8928,7 +8928,7 @@ for (uint a=0; a<view->SelItem.count(); ++a) { b = view->SelItem.at(a); - if (b->Locked) + if (b->locked()) { for (uint c=0; c<view->SelItem.count(); ++c) { @@ -9680,7 +9680,7 @@ if (dl) { view->SelItem.append(doc->MasterItems.at(b)); - doc->DocItems.at(b)->Locked = false; + doc->DocItems.at(b)->setLocked(false); } else doc->MasterItems.at(b)->LayerNr = 0; @@ -9696,7 +9696,7 @@ if (dl) { view->SelItem.append(doc->DocItems.at(b)); - doc->DocItems.at(b)->Locked = false; + doc->DocItems.at(b)->setLocked(false); } else doc->DocItems.at(b)->LayerNr = 0; Index: scribusXml.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribusXml.cpp,v retrieving revision 1.83.2.42 diff -u -r1.83.2.42 scribusXml.cpp --- scribusXml.cpp 1 Feb 2005 10:38:38 -0000 1.83.2.42 +++ scribusXml.cpp 2 Feb 2005 10:14:20 -0000 @@ -222,8 +222,8 @@ ob->setAttribute("PICART", item->PicArt ? 1 : 0); ob->setAttribute("PLTSHOW", item->PoShow ? 1 : 0); ob->setAttribute("BASEOF", item->BaseOffs); - ob->setAttribute("FLIPPEDH",item->flippedH); - ob->setAttribute("FLIPPEDV",item->flippedV); + ob->setAttribute("FLIPPEDH", item->imageFlippedH()); + ob->setAttribute("FLIPPEDV", item->imageFlippedV()); ob->setAttribute("BBOXX",item->BBoxX); ob->setAttribute("BBOXH",item->BBoxH); ob->setAttribute("IFONT",item->IFont); @@ -298,8 +298,8 @@ ob->setAttribute("EPROF", item->EmProfile); ob->setAttribute("IRENDER",item->IRender); ob->setAttribute("EMBEDDED", item->UseEmbedded ? 1 : 0); - ob->setAttribute("LOCK", item->Locked ? 1 : 0); - ob->setAttribute("LOCKR", item->LockRes ? 1 : 0); + ob->setAttribute("LOCK", item->locked() ? 1 : 0); + 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); Index: scribusstructs.h =================================================================== RCS file: /cvs/Scribus/scribus/Attic/scribusstructs.h,v retrieving revision 1.1.2.15 diff -u -r1.1.2.15 scribusstructs.h --- scribusstructs.h 29 Jan 2005 16:44:00 -0000 1.1.2.15 +++ scribusstructs.h 2 Feb 2005 10:14:20 -0000 @@ -83,8 +83,8 @@ double LocalX; double LocalY; bool PicArt; - int flippedH; - int flippedV; + bool flippedH; + bool flippedV; double BBoxX; double BBoxH; bool isPrintable; Index: scribusview.cpp =================================================================== RCS file: /cvs/Scribus/scribus/scribusview.cpp,v retrieving revision 1.76.2.83 diff -u -r1.76.2.83 scribusview.cpp --- scribusview.cpp 1 Feb 2005 16:24:52 -0000 1.76.2.83 +++ scribusview.cpp 2 Feb 2005 10:14:21 -0000 @@ -633,7 +633,7 @@ HR->RExtra = b->RExtra; HR->First = Doc->docParagraphStyles[Doc->currentParaStyle].First; HR->Indent = Doc->docParagraphStyles[Doc->currentParaStyle].Indent; - if ((b->flippedH % 2 != 0) || (b->Reverse)) + if (b->imageFlippedH() || (b->Reverse)) HR->Revers = true; else HR->Revers = false; @@ -1151,7 +1151,7 @@ { if ((b->PType == 6) || (b->PType == 7) || (b->PType == 2) || (b->PType == 8)) { - if ((b->Locked) || (!b->ScaleType)) + if ((b->locked()) || (!b->ScaleType)) { contentsMousePressEvent(m); return; @@ -1640,11 +1640,11 @@ } if (b->PType == 8) pmen->insertItem( tr("Edit Text..."), this, SIGNAL(EditText())); - if (!b->Locked) + if (!b->locked()) pmen->insertItem( tr("&Lock"), this, SLOT(ToggleLock())); else pmen->insertItem( tr("Un&lock"), this, SLOT(ToggleLock())); - if (!b->LockRes) + if (!b->sizeLocked()) pmen->insertItem( tr("Lock Object &Size"), this, SLOT(ToggleResize())); else pmen->insertItem( tr("Unlock Object &Size"), this, SLOT(ToggleResize())); @@ -1665,7 +1665,7 @@ } if (b->PType == 4) pmen->insertItem( tr("&Insert Sample Text"), this, SLOT(LoremIpsum())); - if (!b->Locked) + if (!b->locked()) { if (SelItem.count() > 1) { @@ -1723,13 +1723,13 @@ pmen->insertItem( tr("Conve&rt to"), pmen2); } pmen->insertSeparator(); - if (!b->Locked && !(b->isTableItem && b->isSingleSel)) + if (!b->locked() && !(b->isTableItem && b->isSingleSel)) ScApp->scrActions["editCut"]->addTo(pmen); if (!(b->isTableItem && b->isSingleSel)) ScApp->scrActions["editCopy"]->addTo(pmen); if ((Doc->appMode == EditMode) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (b->PType == 4)) ScApp->scrActions["editPaste"]->addTo(pmen); - if (!b->Locked && (Doc->appMode != 7) && (!(b->isTableItem && b->isSingleSel))) + if (!b->locked() && (Doc->appMode != 7) && (!(b->isTableItem && b->isSingleSel))) pmen->insertItem( tr("&Delete"), this, SLOT(DeleteItem())); if ((b->PType == 2) || (b->PType == 4)) pmen->insertItem( tr("C&lear Contents"), this, SLOT(ClearItem())); @@ -1974,9 +1974,9 @@ if (bb != b) MoveSizeItem(FPoint(0, 0), FPoint(-dist, 0), bb->ItemNr); } - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); } else @@ -2058,9 +2058,9 @@ else MoveSizeItem(npx, npx, b->ItemNr); b->Sizing = false; - if (b->flippedH % 2 == 0) + if (!b->imageFlippedH()) MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr); - if (b->flippedV % 2 == 0) + if (!b->imageFlippedV()) MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr); } else @@ -2147,9 +2147,9 @@ else MoveSizeItem(FPoint(0, npx.y()), FPoint(b->Width - npx.x(), npx.y()), b->ItemNr); b->Sizing = false; - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 == 0) + if (!b->imageFlippedV()) MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); break; case 4: @@ -2207,9 +2207,9 @@ else MoveSizeItem(FPoint(npx.x(), 0), FPoint(npx.x(), b->Height - npx.y()), b->ItemNr); b->Sizing = false; - if (b->flippedH % 2 == 0) + if (!b->imageFlippedH()) MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); break; case 5: @@ -2243,7 +2243,7 @@ } else MoveSizeItem(FPoint(0, 0), FPoint(0, b->Height - npx.y()), b->ItemNr); - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); b->Sizing = false; break; @@ -2278,7 +2278,7 @@ } else MoveSizeItem(FPoint(0, 0), FPoint(b->Width - npx.x(), 0), b->ItemNr); - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); b->Sizing = false; break; @@ -2313,9 +2313,9 @@ else MoveSizeItem(FPoint(npx.x(), 0), FPoint(npx.x(), 0), b->ItemNr); b->Sizing = false; - if (b->flippedH % 2 == 0) + if (!b->imageFlippedH()) MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); break; case 8: @@ -2349,9 +2349,9 @@ else MoveSizeItem(FPoint(0, npx.y()), FPoint(0, npx.y()), b->ItemNr); b->Sizing = false; - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 == 0) + if (!b->imageFlippedV()) MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); break; } @@ -2827,7 +2827,7 @@ { newX = static_cast<int>(m->x()/sc); newY = static_cast<int>(m->y()/sc); - if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode) && (!b->Locked) && (!(b->isTableItem && b->isSingleSel))) + if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode) && (!b->locked()) && (!(b->isTableItem && b->isSingleSel))) { if ((abs(Dxp - newX) > 10) || (abs(Dyp - newY) > 10)) { @@ -2991,7 +2991,7 @@ emit b->HasSel ? HasTextSel() : HasNoTextSel(); } } - if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == NormalMode) || ((Doc->appMode == EditMode) && HanMove)) && (!b->Locked)) + if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == NormalMode) || ((Doc->appMode == EditMode) && HanMove)) && (!b->locked())) { if (Doc->EditClip) { @@ -3432,7 +3432,7 @@ for (a = 0; a < SelItem.count(); ++a) { b = SelItem.at(a); - if (b->Locked) + if (b->locked()) break; p.begin(viewport()); Transform(b, &p); @@ -3495,7 +3495,7 @@ if (QRegion(p.xForm(QPointArray(QRect(-3, -3, static_cast<int>(b->Width+6), static_cast<int>(b->Height+6))))).contains(mpo)) { tx = p.xForm(QRect(0, 0, static_cast<int>(b->Width), static_cast<int>(b->Height))); - if ((tx.intersects(mpo)) && (!b->Locked)) + if ((tx.intersects(mpo)) && (!b->locked())) { qApp->setOverrideCursor(QCursor(SizeAllCursor), true); if (Doc->appMode == Rotation) @@ -3507,7 +3507,7 @@ if (b->PType == 2) qApp->setOverrideCursor(QCursor(loadIcon("HandC.xpm")), true); } - if (!b->LockRes) + if (!b->sizeLocked()) HandleCurs(&p, b, mpo); } else @@ -3933,7 +3933,7 @@ break; } } - if (b->LockRes) + if (b->sizeLocked()) { qApp->setOverrideCursor(QCursor(SizeAllCursor), true); HowTo = 0; @@ -3952,7 +3952,7 @@ b = SelItem.at(0); p.begin(viewport()); Transform(b, &p); - if (!b->Locked) + if (!b->locked()) { HandleSizer(&p, b, mpo, m); if (HowTo != 0) @@ -4037,7 +4037,7 @@ slotDoCurs(false); if (GetItem(&b)) { - if (!b->Locked) + if (!b->locked()) { p.begin(viewport()); Transform(b, &p); @@ -4736,7 +4736,7 @@ bool ScribusView::MoveItem(double newX, double newY, PageItem* b, bool fromMP) { - if (b->Locked) + if (b->locked()) return false; bool retw = false; double oldx = b->Xpos; @@ -4778,13 +4778,13 @@ void ScribusView::MoveItemI(double newX, double newY, int ite, bool redraw) { PageItem *b = Doc->Items.at(ite); - if ((b->Locked) || (!b->ScaleType)) + if ((b->locked()) || (!b->ScaleType)) return; - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) b->LocalX -= newX; else b->LocalX += newX; - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) b->LocalY -= newY; else b->LocalY += newY; @@ -5390,7 +5390,7 @@ else MoveItem(np.x(), 0, b); Clip.translate(-np.x(), 0); - if (b->flippedH % 2 == 0) + if (!b->imageFlippedH()) MoveItemI(-np.x()/b->LocalScX, 0, b->ItemNr, false); np.setX(0); } @@ -5405,7 +5405,7 @@ else MoveItem(0, np.y(), b); Clip.translate(0, -np.y()); - if (b->flippedV % 2 == 0) + if (!b->imageFlippedV()) MoveItemI(0, -np.y()/b->LocalScY, b->ItemNr, false); np.setY(0); } @@ -5517,7 +5517,7 @@ bool ScribusView::SizeItem(double newX, double newY, PageItem *pi, bool fromMP, bool DoUpdateClip, bool redraw) { PageItem *b = pi; - if (b->Locked) + if (b->locked()) return false; QPainter p; QRect oldR = getRedrawBounding(b); @@ -5603,16 +5603,16 @@ { if (fromMP) { - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) MoveItemI(-(b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) MoveItemI(0, -(b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); } else { - if (b->flippedH % 2 == 0) + if (!b->imageFlippedH()) MoveItemI((b->Width - b->OldB2)/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 == 0) + if (!b->imageFlippedV()) MoveItemI(0, (b->Height - b->OldH2)/b->LocalScY, b->ItemNr, false); } UpdateClip(b); @@ -5823,7 +5823,7 @@ for (uint a = 0; a < SelItem.count(); ++a) { bb = SelItem.at(a); - if ((bb->Locked) || (bb->LockRes)) + if ((bb->locked()) || (bb->sizeLocked())) continue; bb->OldB = bb->Width; bb->OldH = bb->Height; @@ -5927,7 +5927,7 @@ { PageItem *b; b = pi; - if (b->Locked) + if (b->locked()) return; FPoint n; QRect oldR = getRedrawBounding(b); @@ -5992,14 +5992,14 @@ } else MoveItem(tp2.x(), tp2.y(), b, true); - if (b->flippedH % 2 == 0) + if (!b->imageFlippedH()) MoveItemI(-tp2.x()/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 == 0) + if (!b->imageFlippedV()) MoveItemI(0, -tp2.y()/b->LocalScY, b->ItemNr, false); FPoint tp = getMaxClipF(&Clip); - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) MoveItemI((b->Width - tp.x())/b->LocalScX, 0, b->ItemNr, false); - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) MoveItemI(0, (b->Height - tp.y())/b->LocalScY, b->ItemNr, false); SizeItem(tp.x(), tp.y(), b->ItemNr, true, false); b->ClipEdited = true; @@ -7096,7 +7096,7 @@ b->OldB2 = b->Width; b->OldH2 = b->Height; HowTo = 0; - if (b->LockRes) + if (b->sizeLocked()) return; QRect ne = QRect(); PaintSizeRect(p, ne); @@ -7317,12 +7317,12 @@ PageItem *b = Doc->Items.at(a); if ((b->PicAvail) && (b->Pfile == name)) { - int fho = b->flippedH; - int fvo = b->flippedV; + bool fho = b->imageFlippedH(); + bool fvo = b->imageFlippedV(); b->pixmOrg = QImage(); LoadPict(b->Pfile, b->ItemNr, true); - b->flippedH = fho; - b->flippedV = fvo; + b->setImageFlippedH(fho); + b->setImageFlippedV(fvo); AdjustPictScale(b); AdjustPreview(b, false); } @@ -7332,12 +7332,12 @@ PageItem *b = Doc->MasterItems.at(a); if ((b->PicAvail) && (b->Pfile == name)) { - int fho = b->flippedH; - int fvo = b->flippedV; + bool fho = b->imageFlippedH(); + bool fvo = b->imageFlippedV(); b->pixmOrg = QImage(); LoadPict(b->Pfile, b->ItemNr, true); - b->flippedH = fho; - b->flippedV = fvo; + b->setImageFlippedH(fho); + b->setImageFlippedV(fvo); AdjustPictScale(b); AdjustPreview(b, false); } @@ -7381,12 +7381,12 @@ PageItem *b = SelItem.at(0); if (b->PicAvail) { - int fho = b->flippedH; - int fvo = b->flippedV; + int fho = b->imageFlippedH(); + int fvo = b->imageFlippedV(); b->pixmOrg = QImage(); LoadPict(b->Pfile, b->ItemNr, true); - b->flippedH = fho; - b->flippedV = fvo; + b->setImageFlippedH(fho); + b->setImageFlippedV(fvo); AdjustPictScale(b); AdjustPreview(b, false); updateContents(); @@ -7473,7 +7473,7 @@ { if (SelItem.count() > 1) { - if (SelItem.at(0)->Locked) + if (SelItem.at(0)->locked()) undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::UnLock, 0, Um::IUnLock); else @@ -7498,7 +7498,7 @@ { if (SelItem.count() > 1) { - if (SelItem.at(0)->LockRes) + if (SelItem.at(0)->sizeLocked()) undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::SizeUnLock, 0, Um::IUnLock); else @@ -7882,8 +7882,8 @@ b->dpiY = 72.0; b->LocalX = 0; b->LocalY = 0; - b->flippedH = 0; - b->flippedV = 0; + b->setImageFlippedH(false); + b->setImageFlippedV(false); b->textAlignment = 0; b->EmProfile = ""; b->ScaleType = true; @@ -7912,7 +7912,7 @@ for (uint de = 0; de < anz; ++de) { b = SelItem.at(offs); - if ((b->isTableItem && b->isSingleSel) || (b->Locked)) + if ((b->isTableItem && b->isSingleSel) || (b->locked())) { offs++; continue; @@ -8900,12 +8900,12 @@ void ScribusView::TransformM(PageItem *b, QPainter *p) { - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) { p->translate(b->Width, 0); p->scale(-1, 1); } - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) { p->translate(0, b->Height); p->scale(1, -1); @@ -10423,8 +10423,8 @@ Item->PicArt = false; } } - Item->flippedH = 0; - Item->flippedV = 0; + Item->setImageFlippedH(false); + Item->setImageFlippedV(false); if (!Doc->loading) { emit RasterPic(Item->isRaster); @@ -10435,16 +10435,16 @@ void ScribusView::AdjustPreview(PageItem *b, bool reload) { - int neww, newh, fho, fvo; - bool savF; + int neww, newh; + bool savF, fho, fvo; if ((b->LocalViewX < 1.0) || (b->LocalViewY < 1.0)) { if ((b->Pfile != "") && (b->PicAvail)) { if (!b->Sizing) { - fho = b->flippedH; - fvo = b->flippedV; + fho = b->imageFlippedH(); + fvo = b->imageFlippedV(); savF = b->PicArt; if ( !b->pixmOrg.isNull() ) { @@ -10463,8 +10463,8 @@ } else LoadPict(b->Pfile, b->ItemNr, true); - b->flippedH = fho; - b->flippedV = fvo; + b->setImageFlippedH(fho); + b->setImageFlippedV(fvo); b->PicArt = savF; } neww = qRound(b->pixm.width() * b->LocalViewX); @@ -10489,7 +10489,8 @@ double ys = b->Height / static_cast<double>(b->OrigH); if (!b->Sizing) { - int fho = b->flippedH, fvo = b->flippedV; + bool fho = b->imageFlippedH(); + bool fvo = b->imageFlippedV(); savF = b->PicArt; if (!b->pixmOrg.isNull()) { @@ -10508,8 +10509,8 @@ } else // jjsa end LoadPict(b->Pfile, b->ItemNr, true); - b->flippedH = fho; - b->flippedV = fvo; + b->setImageFlippedH(fho); + b->setImageFlippedV(fvo); b->PicArt = savF; } if (b->AspectRatio) @@ -10659,8 +10660,8 @@ break; } PageItem* b = Doc->Items.at(z); - b->flippedH = Buffer->flippedH; - b->flippedV = Buffer->flippedV; + b->setImageFlippedH(Buffer->flippedH); + b->setImageFlippedV(Buffer->flippedV); b->RadRect = Buffer->RadRect; b->FrameType = Buffer->FrameType; b->ClipEdited = Buffer->ClipEdited; @@ -10773,8 +10774,8 @@ b->TabValues = Buffer->TabValues; b->DashValues = Buffer->DashValues; b->DashOffset = Buffer->DashOffset; - b->Locked = Buffer->Locked; - b->LockRes = Buffer->LockRes; + b->setLocked(Buffer->Locked); + b->setSizeLocked(Buffer->LockRes); b->Transparency = Buffer->Transparency; b->TranspStroke = Buffer->TranspStroke; b->Reverse = Buffer->Reverse; @@ -11233,17 +11234,17 @@ chma.scale(b->itemText.at(a)->cscale / 100.0, 1); pts.map(chma); chma = QWMatrix(); - if ((b->flippedH % 2 != 0) && (!b->Reverse)) + if (b->imageFlippedH() && (!b->Reverse)) chma.scale(-1, 1); - if (b->flippedV % 2 != 0) + 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); bb = Doc->Items.at(z); bb->Textflow = b->Textflow; bb->Textflow2 = b->Textflow2; - bb->LockRes = b->LockRes; - bb->Locked = b->Locked; + bb->setSizeLocked(b->sizeLocked()); + bb->setLocked(b->locked()); bb->NamedLStyle = b->NamedLStyle; bb->setItemName(b->itemName()+"+"+ccounter.setNum(a)); bb->AutoName = false; @@ -11276,9 +11277,9 @@ wide = Cwidth(Doc, b->itemText.at(a)->cfont, chx, b->itemText.at(a)->csize, b->itemText.at(a+1)->ch); else wide = Cwidth(Doc, b->itemText.at(a)->cfont, chx, b->itemText.at(a)->csize); - if (b->flippedH % 2 != 0) + if (b->imageFlippedH()) textX = b->Width - textX - wide; - if (b->flippedV % 2 != 0) + if (b->imageFlippedV()) textY = b->Height - textY+ y - (bb->Height - y); npo = transformPoint(FPoint(textX+x, textY-y), 0.0, 0.0, b->Rot, 1.0, 1.0); bb->Xpos = b->Xpos+npo.x(); Index: util.cpp =================================================================== RCS file: /cvs/Scribus/scribus/util.cpp,v retrieving revision 1.52.2.16 diff -u -r1.52.2.16 util.cpp --- util.cpp 1 Feb 2005 10:38:38 -0000 1.52.2.16 +++ util.cpp 2 Feb 2005 10:14:21 -0000 @@ -1816,8 +1816,8 @@ Buffer->LocalX = b->LocalX; Buffer->LocalY = b->LocalY; Buffer->PicArt = b->PicArt; - Buffer->flippedH = b->flippedH; - Buffer->flippedV = b->flippedV; + Buffer->flippedH = b->imageFlippedH(); + Buffer->flippedV = b->imageFlippedV(); Buffer->BBoxX = b->BBoxX; Buffer->BBoxH = b->BBoxH; Buffer->isPrintable = b->isPrintable; @@ -1912,8 +1912,8 @@ Buffer->LayerNr = b->LayerNr; Buffer->ScaleType = b->ScaleType; Buffer->AspectRatio = b->AspectRatio; - Buffer->Locked = b->Locked; - Buffer->LockRes = b->LockRes; + Buffer->Locked = b->locked(); + Buffer->LockRes = b->sizeLocked(); Buffer->Transparency = b->Transparency; Buffer->TranspStroke = b->TranspStroke; Buffer->Reverse = b->Reverse; @@ -2133,8 +2133,8 @@ OB->LocalX=QStodouble(obj->attribute("LOCALX")); OB->LocalY=QStodouble(obj->attribute("LOCALY")); OB->PicArt=QStoInt(obj->attribute("PICART")); - OB->flippedH=QStoInt(obj->attribute("FLIPPEDH")); - OB->flippedV=QStoInt(obj->attribute("FLIPPEDV")); + OB->flippedH = QStoInt(obj->attribute("FLIPPEDH")); + OB->flippedV = QStoInt(obj->attribute("FLIPPEDV")); OB->BBoxX=QStodouble(obj->attribute("BBOXX")); OB->BBoxH=QStodouble(obj->attribute("BBOXH")); OB->ScaleType = QStoInt(obj->attribute("SCALETYPE","1")); Index: libpdf/pdflib.cpp =================================================================== RCS file: /cvs/Scribus/scribus/libpdf/pdflib.cpp,v retrieving revision 1.78.2.22 diff -u -r1.78.2.22 pdflib.cpp --- libpdf/pdflib.cpp 1 Feb 2005 10:39:32 -0000 1.78.2.22 +++ libpdf/pdflib.cpp 2 Feb 2005 10:14:22 -0000 @@ -1056,9 +1056,9 @@ PutPage("q\n"); PutPage(SetClipPath(ite)); PutPage("h\nW*\nn\n"); - if ((ite->flippedH % 2) != 0) + if (ite->imageFlippedH()) PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n"); - if ((ite->flippedV % 2) != 0) + if (ite->imageFlippedV()) PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n"); if ((ite->PicAvail) && (ite->Pfile != "")) PDF_Image(ite->InvPict, ite->Pfile, ite->LocalScX, @@ -1793,9 +1793,9 @@ } } PutPage("q\n"); - if ((ite->flippedH % 2) != 0) + if (ite->imageFlippedH()) PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n"); - if ((ite->flippedV % 2) != 0) + if (ite->imageFlippedV()) PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n"); PutPage(setTextSt(ite, PNr)); PutPage("Q\n"); @@ -2133,9 +2133,9 @@ PutPage("q\n"); PutPage(SetClipPath(ite)); PutPage("h\nW*\nn\n"); - if ((ite->flippedH % 2) != 0) + if (ite->imageFlippedH()) PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n"); - if ((ite->flippedV % 2) != 0) + if (ite->imageFlippedV()) PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n"); if ((ite->PicAvail) && (ite->Pfile != "")) PDF_Image(ite->InvPict, ite->Pfile, ite->LocalScX, @@ -2179,9 +2179,9 @@ } } PutPage("q\n"); - if ((ite->flippedH % 2) != 0) + if (ite->imageFlippedH()) PutPage("-1 0 0 1 "+FToStr(ite->Width)+" 0 cm\n"); - if ((ite->flippedV % 2) != 0) + if (ite->imageFlippedV()) PutPage("1 0 0 -1 0 "+FToStr(-ite->Height)+" cm\n"); PutPage(setTextSt(ite, PNr)); PutPage("Q\n"); Index: libpostscript/pslib.cpp =================================================================== RCS file: /cvs/Scribus/scribus/libpostscript/pslib.cpp,v retrieving revision 1.24.2.15 diff -u -r1.24.2.15 pslib.cpp --- libpostscript/pslib.cpp 1 Feb 2005 10:40:07 -0000 1.24.2.15 +++ libpostscript/pslib.cpp 2 Feb 2005 10:14:22 -0000 @@ -1166,12 +1166,12 @@ PS_closepath(); PS_clip(false); PS_save(); - if ((ite->flippedH % 2) != 0) + if (ite->imageFlippedH()) { PS_translate(ite->Width, 0); PS_scale(-1, 1); } - if ((ite->flippedV % 2) != 0) + if (ite->imageFlippedV()) { PS_translate(0, -ite->Height); PS_scale(1, -1); @@ -1243,12 +1243,12 @@ PS_closepath(); PS_fill(); } - if ((ite->flippedH % 2) != 0) + if (ite->imageFlippedH()) { PS_translate(ite->Width, 0); PS_scale(-1, 1); } - if ((ite->flippedV % 2) != 0) + if (ite->imageFlippedV()) { PS_translate(0, -ite->Height); PS_scale(1, -1); @@ -1642,12 +1642,12 @@ SetClipPath(&c->PoLine); PS_closepath(); PS_clip(true); - if ((c->flippedH % 2) != 0) + if (c->imageFlippedH()) { PS_translate(c->Width, 0); PS_scale(-1, 1); } - if ((c->flippedV % 2) != 0) + if (c->imageFlippedV()) { PS_translate(0, -c->Height); PS_scale(1, -1); @@ -1726,12 +1726,12 @@ else PS_fill(); } - if ((c->flippedH % 2) != 0) + if (c->imageFlippedH()) { PS_translate(c->Width, 0); PS_scale(-1, 1); } - if ((c->flippedV % 2) != 0) + if (c->imageFlippedV()) { PS_translate(0, -c->Height); PS_scale(1, -1); Index: plugins/scriptplugin/cmdmani.cpp =================================================================== RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp,v retrieving revision 1.7.2.17 diff -u -r1.7.2.17 cmdmani.cpp --- plugins/scriptplugin/cmdmani.cpp 2 Feb 2005 09:20:07 -0000 1.7.2.17 +++ plugins/scriptplugin/cmdmani.cpp 2 Feb 2005 10:14:22 -0000 @@ -276,8 +276,8 @@ PageItem *item = GetUniqueItem(QString::fromUtf8(name)); if (item == NULL) return NULL; - item->Locked = !item->Locked; - if (item->Locked) + item->toggleLock(); + if (item->locked()) return PyInt_FromLong(1); return PyInt_FromLong(0); } @@ -294,7 +294,7 @@ PageItem *item = GetUniqueItem(QString::fromUtf8(name)); if (item == NULL) return NULL; - if (item->Locked) + if (item->locked()) return PyBool_FromLong(1); return PyBool_FromLong(0); } |
|
All applied. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-02-02 09:41 |
|
New Issue | |
2005-02-02 09:41 |
|
File Added: pageitem_member_privacy1.diff | |
2005-02-02 10:07 | cbradney | Fixed in Version | => 1.3.0cvs |
2005-02-02 10:07 | cbradney | View Status | private => public |
2005-02-02 12:21 |
|
File Deleted: pageitem_member_privacy1.diff | |
2005-02-02 12:22 |
|
Note Added: 0003586 | |
2005-02-02 13:26 |
|
File Added: pageitem_privacy2.diff | |
2005-02-02 13:27 |
|
Note Added: 0003587 | |
2005-02-02 17:08 |
|
File Deleted: pageitem_privacy2.diff | |
2005-02-02 17:11 |
|
File Added: pageitem_privacy3.diff | |
2005-02-02 17:24 |
|
Description Updated | |
2005-02-02 17:45 |
|
File Deleted: pageitem_privacy3.diff | |
2005-02-02 17:54 |
|
File Added: pageitem_privacy4.diff | |
2005-02-02 17:55 | cbradney | Status | assigned => resolved |
2005-02-02 17:55 | cbradney | Resolution | open => fixed |
2005-02-02 17:55 |
|
File Added: pageitem_member_privacy1.diff | |
2005-02-02 18:23 |
|
Status | resolved => closed |
2005-02-02 18:23 |
|
Note Added: 0003590 | |
2005-02-09 05:58 |
|
Relationship added | child of 0001653 |