r16191 by fschmid - Added a new PageItem type "RegularPolygon". This type is created by the "Regular Polygon" tool now and the properties of that polygon can be edited. Thus Bug #9534: "no polygones" is resolved now.
scribus-commit
scribus-commit at lists.scribus.net
Fri Dec 31 18:13:14 CET 2010
Author: fschmid
Date: Fri Dec 31 17:13:14 2010
New Revision: 16191
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16191
Log:
Added a new PageItem type "RegularPolygon". This type is created by the "Regular Polygon" tool now and the properties of that polygon can be edited. Thus Bug #9534: "no polygones" is resolved now.
Added:
trunk/Scribus/scribus/pageitem_regularpolygon.cpp
trunk/Scribus/scribus/pageitem_regularpolygon.h
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/canvasmode_create.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/prefsstructs.h
trunk/Scribus/scribus/pslib.cpp
trunk/Scribus/scribus/scpageoutput.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/about.cpp
trunk/Scribus/scribus/ui/modetoolbar.cpp
trunk/Scribus/scribus/ui/outlinepalette.cpp
trunk/Scribus/scribus/ui/polygonwidget.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
trunk/Scribus/scribus/util_math.cpp
trunk/Scribus/scribus/util_math.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Fri Dec 31 17:13:14 2010
@@ -189,6 +189,7 @@
pageitem_pathtext.h
pageitem_polygon.h
pageitem_polyline.h
+ pageitem_regularpolygon.h
pageitem_symbol.h
pageitem_textframe.h
pageitempointer.h
@@ -512,6 +513,7 @@
pageitem_pathtext.cpp
pageitem_polygon.cpp
pageitem_polyline.cpp
+ pageitem_regularpolygon.cpp
pageitem_symbol.cpp
pageitem_textframe.cpp
pageitempointer.cpp
Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp Fri Dec 31 17:13:14 2010
@@ -104,7 +104,7 @@
}
else if (createObjectMode == modeDrawRegularPolygon)
{
- QPainterPath path = RegularPolygon(localRect.width(), localRect.height(), m_doc->itemToolPrefs().polyCorners, m_doc->itemToolPrefs().polyUseFactor, m_doc->itemToolPrefs().polyFactor, m_doc->itemToolPrefs().polyRotation, m_doc->itemToolPrefs().polyCurvature);
+ QPainterPath path = RegularPolygonPath(localRect.width(), localRect.height(), m_doc->itemToolPrefs().polyCorners, m_doc->itemToolPrefs().polyUseFactor, m_doc->itemToolPrefs().polyFactor, m_doc->itemToolPrefs().polyRotation, m_doc->itemToolPrefs().polyCurvature);
p->translate(localRect.left(), localRect.top());
p->drawPath(path);
}
@@ -513,7 +513,7 @@
frameType = (int) PageItem::Unspecified;
break;
case modeDrawRegularPolygon:
- itemType = (int) PageItem::Polygon;
+ itemType = (int) PageItem::RegularPolygon;
frameType = (int) PageItem::Unspecified;
break;
case modeInsertPDFButton:
@@ -673,16 +673,9 @@
case modeDrawRegularPolygon:
{
if (modifiers == Qt::ShiftModifier)
- z = m_doc->itemAddArea(PageItem::Polygon, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
+ z = m_doc->itemAddArea(PageItem::RegularPolygon, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
else
- {
- z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
- }
- currItem = m_doc->Items->at(z);
- QPainterPath path = RegularPolygon(currItem->width(), currItem->height(), m_doc->itemToolPrefs().polyCorners, m_doc->itemToolPrefs().polyUseFactor, m_doc->itemToolPrefs().polyFactor, m_doc->itemToolPrefs().polyRotation, m_doc->itemToolPrefs().polyCurvature);
- currItem->PoLine.fromQPainterPath(path);
- m_doc->AdjustItemSize(currItem);
- currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+ z = m_doc->itemAdd(PageItem::RegularPolygon, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
/*
qApp->changeOverrideCursor(QCursor(Qt::SizeFDiagCursor));
m_doc->m_Selection->clear();
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Fri Dec 31 17:13:14 2010
@@ -40,6 +40,7 @@
#include "hyphenator.h"
#include "loadsaveplugin.h"
#include "pageitem_textframe.h"
+#include "pageitem_regularpolygon.h"
#include "prefscontext.h"
#include "prefsfile.h"
#include "prefsmanager.h"
@@ -58,6 +59,7 @@
#include "ui/customfdialog.h"
#include "ui/insertTable.h"
#include "ui/pageselector.h"
+#include "ui/polyprops.h"
#include "ui/propertiespalette.h"
#include "plugins/formatidlist.h"
@@ -237,6 +239,18 @@
{
if (!m_doc->symbolEditMode())
m_view->requestMode(submodeEditSymbol);
+ }
+ else if (currItem->asRegularPolygon())
+ {
+ PageItem_RegularPolygon* item = currItem->asRegularPolygon();
+ PolygonProps* dia = new PolygonProps(m_ScMW, item->polyCorners, item->polyFactorGuiVal, item->polyFactor, item->polyUseFactor, item->polyRotation, item->polyCurvature);
+ if (dia->exec())
+ {
+ dia->getValues(&item->polyCorners, &item->polyFactorGuiVal, &item->polyFactor, &item->polyUseFactor, &item->polyRotation, &item->polyCurvature);
+ item->recalcPath();
+ }
+ delete dia;
+ m_view->updateContents();
}
}
}
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Fri Dec 31 17:13:14 2010
@@ -556,6 +556,10 @@
AnName = tr("Group");
setUPixmap(Um::IPolygon);
break;
+ case RegularPolygon:
+ AnName = tr("RegularPolygon");
+ setUPixmap(Um::IPolygon);
+ break;
default:
AnName = "Item";
break;
@@ -1832,6 +1836,7 @@
case PathText:
case Symbol:
case Group:
+ case RegularPolygon:
embedded->DrawObj_Item(p, cullingArea);
break;
case Line:
@@ -2585,6 +2590,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
GrColorP1 = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -2620,6 +2626,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
GrColorP2 = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -2655,6 +2662,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
GrColorP3 = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -2690,6 +2698,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
GrColorP4 = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -2754,6 +2763,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
MColor = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -2801,6 +2811,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
MColor = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -3100,6 +3111,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
tmp = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -3193,6 +3205,7 @@
case ImageFrame:
case LatexFrame:
case OSGFrame:
+ case RegularPolygon:
tmp = m_Doc->itemToolPrefs().shapeLineColor;
break;
default:
@@ -3314,6 +3327,7 @@
case ImageFrame:
case LatexFrame:
case OSGFrame:
+ case RegularPolygon:
lineColorVal = m_Doc->itemToolPrefs().shapeLineColor;
break;
default:
@@ -3351,6 +3365,7 @@
case Line:
case PolyLine:
case Polygon:
+ case RegularPolygon:
fillColorVal = m_Doc->itemToolPrefs().shapeFillColor;
break;
default:
@@ -3721,6 +3736,7 @@
fromType = Um::TextFrame;
break;
case Polygon:
+ case RegularPolygon:
fromType = Um::Polygon;
break;
default:
@@ -3742,6 +3758,7 @@
setUPixmap(Um::ITextFrame);
break;
case Polygon:
+ case RegularPolygon:
toType = Um::Polygon;
setUPixmap(Um::IPolygon);
break;
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Fri Dec 31 17:13:14 2010
@@ -66,6 +66,7 @@
class PageItem_Line;
class PageItem_Polygon;
class PageItem_PolyLine;
+class PageItem_RegularPolygon;
class PageItem_TextFrame;
class PageItem_PathText;
class PageItem_LatexFrame;
@@ -75,7 +76,6 @@
class PageItem_OSGFrame;
#endif
-struct CopyPasteBuffer;
/**
*@author Franz Schmid
*/
@@ -157,19 +157,20 @@
* Multiple is used for checking in @sa Selection for all same type of items
*/
enum ItemType {
- ItemType1 = 1,
- ImageFrame = 2,
- ItemType3 = 3,
- TextFrame = 4,
- Line = 5,
- Polygon = 6,
- PolyLine = 7,
- PathText = 8,
- LatexFrame = 9,
- OSGFrame = 10,
- Symbol = 11,
- Group = 12,
- Multiple = 99
+ ItemType1 = 1,
+ ImageFrame = 2,
+ ItemType3 = 3,
+ TextFrame = 4,
+ Line = 5,
+ Polygon = 6,
+ PolyLine = 7,
+ PathText = 8,
+ LatexFrame = 9,
+ OSGFrame = 10,
+ Symbol = 11,
+ Group = 12,
+ RegularPolygon = 13,
+ Multiple = 99
};
/** @brief Text flow mode
@@ -197,17 +198,19 @@
#endif
virtual PageItem_Symbol * asSymbolFrame() { return NULL; }
virtual PageItem_Group * asGroupFrame() { return NULL; }
-
- virtual bool isImageFrame() const { return false; }
- virtual bool isLine() const { return false; }
- virtual bool isPathText() const { return false; }
- virtual bool isPolygon() const { return false; }
- virtual bool isPolyLine() const { return false; }
- virtual bool isTextFrame() const { return false; }
- virtual bool isLatexFrame() const { return false; }
- virtual bool isOSGFrame() const { return false; }
- virtual bool isSymbol() const { return false; }
- virtual bool isGroup() const { return false; }
+ virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; }
+
+ virtual bool isImageFrame() const { return false; }
+ virtual bool isLine() const { return false; }
+ virtual bool isPathText() const { return false; }
+ virtual bool isPolygon() const { return false; }
+ virtual bool isPolyLine() const { return false; }
+ virtual bool isTextFrame() const { return false; }
+ virtual bool isLatexFrame() const { return false; }
+ virtual bool isOSGFrame() const { return false; }
+ virtual bool isSymbol() const { return false; }
+ virtual bool isGroup() const { return false; }
+ virtual bool isRegularPolygon() const { return false; }
/** @brief Frame Type
*
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Fri Dec 31 17:13:14 2010
@@ -2189,6 +2189,7 @@
case PageItem::ItemType1:
case PageItem::ItemType3:
case PageItem::Polygon:
+ case PageItem::RegularPolygon:
PutPage("q\n");
if (((ite->GrMask > 0) || (ite->fillTransparency() != 0) || (ite->fillBlendmode() != 0)) && ((Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4)))
{
@@ -3924,6 +3925,7 @@
case PageItem::ItemType1:
case PageItem::ItemType3:
case PageItem::Polygon:
+ case PageItem::RegularPolygon:
tmp += "q\n";
if (((ite->GrMask > 0) || (ite->fillTransparency() != 0) || (ite->fillBlendmode() != 0)) && ((Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4)))
{
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Fri Dec 31 17:13:14 2010
@@ -31,6 +31,7 @@
#ifdef HAVE_OSG
#include "pageitem_osgframe.h"
#endif
+#include "pageitem_regularpolygon.h"
#include <QCursor>
// #include <QDebug>
#include <QFileInfo>
@@ -1701,6 +1702,7 @@
doc->itemToolPrefs().polyCorners = attrs.valueAsInt("POLYC", 4);
doc->itemToolPrefs().polyFactor = attrs.valueAsDouble("POLYF", 0.5);
doc->itemToolPrefs().polyRotation = attrs.valueAsDouble("POLYR", 0.0);
+ doc->itemToolPrefs().polyInnerRot = attrs.valueAsDouble("POLYIR", 0.0);
doc->itemToolPrefs().polyCurvature = attrs.valueAsDouble("POLYCUR", 0.0);
doc->itemToolPrefs().polyFactorGuiVal = attrs.valueAsInt("POLYFD", 0);
doc->itemToolPrefs().polyUseFactor = attrs.valueAsBool("POLYS", false);
@@ -3345,6 +3347,12 @@
currItem->groupHeight = attrs.valueAsDouble("groupHeight", h);
doc->GroupCounter++;
break;
+ case PageItem::RegularPolygon:
+ z = doc->itemAdd(PageItem::RegularPolygon, PageItem::Unspecified, x, y, w, h, pw, Pcolor, Pcolor2, true);
+ currItem = doc->Items->at(z);
+ if (pagenr > -2)
+ currItem->OwnPage = pagenr;
+ break;
case PageItem::Multiple:
Q_ASSERT(false);
break;
@@ -3654,6 +3662,17 @@
currItem->updatePolyClip();
currItem->Frame = true;
}
+ if (currItem->asRegularPolygon())
+ {
+ PageItem_RegularPolygon *regitem = currItem->asRegularPolygon();
+ regitem->polyCorners = attrs.valueAsInt("POLYC", 4);
+ regitem->polyFactor = attrs.valueAsDouble("POLYF", 0.5);
+ regitem->polyRotation = attrs.valueAsDouble("POLYR", 0.0);
+ regitem->polyInnerRot = attrs.valueAsDouble("POLYIR", 0.0);
+ regitem->polyCurvature = attrs.valueAsDouble("POLYCUR", 0.0);
+ regitem->polyFactorGuiVal = attrs.valueAsInt("POLYFD", 0);
+ regitem->polyUseFactor = attrs.valueAsBool("POLYS", false);
+ }
currItem->GrType = attrs.valueAsInt("GRTYP", 0);
QString GrColor;
QString GrColor2;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Fri Dec 31 17:13:14 2010
@@ -24,6 +24,7 @@
#ifdef HAVE_OSG
#include "pageitem_osgframe.h"
#endif
+#include "pageitem_regularpolygon.h"
#include "units.h"
#include "util.h"
@@ -256,6 +257,7 @@
docu.writeAttribute("POLYC", m_Doc->itemToolPrefs().polyCorners);
docu.writeAttribute("POLYF", m_Doc->itemToolPrefs().polyFactor);
docu.writeAttribute("POLYR", m_Doc->itemToolPrefs().polyRotation);
+ docu.writeAttribute("POLYIR", m_Doc->itemToolPrefs().polyInnerRot);
docu.writeAttribute("POLYCUR", m_Doc->itemToolPrefs().polyCurvature);
docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs().polyFactorGuiVal);
docu.writeAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs().polyUseFactor));
@@ -1424,6 +1426,18 @@
docu.writeAttribute("LAYER", item->LayerID);
docu.writeAttribute("BOOKMARK", item->isBookmark ? 1 : 0);
+ if (item->asRegularPolygon())
+ {
+ PageItem_RegularPolygon *regitem = item->asRegularPolygon();
+ docu.writeAttribute("POLYC", regitem->polyCorners);
+ docu.writeAttribute("POLYF", regitem->polyFactor);
+ docu.writeAttribute("POLYR", regitem->polyRotation);
+ docu.writeAttribute("POLYIR", regitem->polyInnerRot);
+ docu.writeAttribute("POLYCUR", regitem->polyCurvature);
+ docu.writeAttribute("POLYFD", regitem->polyFactorGuiVal);
+ docu.writeAttribute("POLYS", static_cast<int>(regitem->polyUseFactor));
+ }
+
if (item->nextInChain() != 0)
docu.writeAttribute("NEXTITEM", item->nextInChain()->ItemNr);
else
@@ -1434,7 +1448,7 @@
else
{
docu.writeAttribute("BACKITEM", -1);
- writeITEXTs(doc, docu, item);
+ writeITEXTs(doc, docu, item);
}
if (item->effectsInUse.count() != 0)
Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxar.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxar.cpp Fri Dec 31 17:13:14 2010
@@ -1622,7 +1622,7 @@
if (flags & 1)
path.addEllipse(QPointF(0,0), w, h);
else
- path = RegularPolygon(w * 2, h * 2, numSides, flags & 2, r1, 45, 0);
+ path = RegularPolygonPath(w * 2, h * 2, numSides, flags & 2, r1, 45, 0);
Coords.fromQPainterPath(path);
if (!(flags & 1))
Coords.translate(-w, -h);
@@ -2845,7 +2845,7 @@
if (ellipse)
path.addEllipse(QPointF(majorAxis, minorAxis), majorAxis, minorAxis);
else
- path = RegularPolygon(majorAxis, minorAxis, 4, false, 0, 45, 0);
+ path = RegularPolygonPath(majorAxis, minorAxis, 4, false, 0, 45, 0);
Coords.fromQPainterPath(path);
Coords.translate(-majorAxis / 2.0, -minorAxis / 2.0);
Coords.translate(centerX, -centerY);
Modified: trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp Fri Dec 31 17:13:14 2010
@@ -379,6 +379,7 @@
{
case PageItem::Polygon:
case PageItem::PolyLine:
+ case PageItem::RegularPolygon:
ob = processPolyItem(Item, trans, fill, stroke);
if ((Item->lineColor() != CommonStrings::None) && ((Item->startArrowIndex() != 0) || (Item->endArrowIndex() != 0)))
ob = processArrows(Item, ob, trans);
@@ -514,7 +515,7 @@
{
bool closedPath;
QDomElement ob;
- if (Item->itemType() == PageItem::Polygon)
+ if ((Item->itemType() == PageItem::Polygon) || (Item->itemType() == PageItem::RegularPolygon))
closedPath = true;
else
closedPath = false;
@@ -1199,6 +1200,7 @@
{
case PageItem::Polygon:
case PageItem::PolyLine:
+ case PageItem::RegularPolygon:
obE = processPolyItem(embedded, trans, fill, stroke);
if ((embedded->lineColor() != CommonStrings::None) && ((embedded->startArrowIndex() != 0) || (embedded->endArrowIndex() != 0)))
obE = processArrows(embedded, obE, trans);
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp Fri Dec 31 17:13:14 2010
@@ -79,6 +79,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.needsNumObjects = 3;
}
Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp Fri Dec 31 17:13:14 2010
@@ -80,6 +80,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.forAppMode.append(modeNormal);
m_actionInfo.needsNumObjects = 2;
m_actionInfo.firstObjectType.append(PageItem::PolyLine);
Modified: trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/lenseffects/lenseffects.cpp Fri Dec 31 17:13:14 2010
@@ -76,6 +76,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.needsNumObjects = 3;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp Fri Dec 31 17:13:14 2010
@@ -78,6 +78,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.needsNumObjects = 2;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp Fri Dec 31 17:13:14 2010
@@ -84,6 +84,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.forAppMode.append(modeNormal);
m_actionInfo.needsNumObjects = 2;
m_actionInfo.firstObjectType.append(PageItem::PolyLine);
Modified: trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathfinder/pathfinder.cpp Fri Dec 31 17:13:14 2010
@@ -91,6 +91,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.needsNumObjects = 2;
}
Modified: trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp (original)
+++ trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp Fri Dec 31 17:13:14 2010
@@ -85,6 +85,7 @@
m_actionInfo.notSuitableFor.append(PageItem::PathText);
m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+ m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
m_actionInfo.forAppMode.append(modeNormal);
m_actionInfo.needsNumObjects = 1;
}
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Fri Dec 31 17:13:14 2010
@@ -267,6 +267,7 @@
appPrefs.itemToolPrefs.polyUseFactor = false;
appPrefs.itemToolPrefs.polyFactorGuiVal = 0;
appPrefs.itemToolPrefs.polyRotation = 0.0;
+ appPrefs.itemToolPrefs.polyInnerRot = 0.0;
appPrefs.itemToolPrefs.polyCurvature = 0.0;
// appPrefs.PSize = 40;
appPrefs.printerPrefs.ClipMargin = false;
@@ -1465,6 +1466,7 @@
dcItemTools.setAttribute("PolygonCorners", appPrefs.itemToolPrefs.polyCorners);
dcItemTools.setAttribute("PolygonFactor", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyFactor));
dcItemTools.setAttribute("PolygonRotation", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyRotation));
+ dcItemTools.setAttribute("PolygonInnerRotation", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyInnerRot));
dcItemTools.setAttribute("PolygonFactorGUI", appPrefs.itemToolPrefs.polyFactorGuiVal);
dcItemTools.setAttribute("PolygonCurvature", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyCurvature));
dcItemTools.setAttribute("PolygonUseFactor", static_cast<int>(appPrefs.itemToolPrefs.polyUseFactor));
@@ -2049,6 +2051,7 @@
appPrefs.itemToolPrefs.polyCorners = dc.attribute("PolygonCorners", "4").toInt();
appPrefs.itemToolPrefs.polyFactor = ScCLocale::toDoubleC(dc.attribute("PolygonFactor"), 0.5);
appPrefs.itemToolPrefs.polyRotation = ScCLocale::toDoubleC(dc.attribute("PolygonRotation"), 0.0);
+ appPrefs.itemToolPrefs.polyInnerRot = ScCLocale::toDoubleC(dc.attribute("PolygonInnerRotation"), 0.0);
appPrefs.itemToolPrefs.polyCurvature = ScCLocale::toDoubleC(dc.attribute("PolygonCurvature"), 0.0);
appPrefs.itemToolPrefs.polyFactorGuiVal = dc.attribute("PolygonFactorGUI", "0").toInt();
appPrefs.itemToolPrefs.polyUseFactor = static_cast<bool>(dc.attribute("PolygonUseFactor", "0").toInt());
Modified: trunk/Scribus/scribus/prefsstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/prefsstructs.h
==============================================================================
--- trunk/Scribus/scribus/prefsstructs.h (original)
+++ trunk/Scribus/scribus/prefsstructs.h Fri Dec 31 17:13:14 2010
@@ -205,6 +205,7 @@
double polyFactor; //! Convex/Concave factor as a double
bool polyUseFactor; //! Whether to use a factor for shaping
double polyRotation; //! Rotation of a polygon
+ double polyInnerRot; //! Rotation of the inner points of a star
double polyCurvature; //! Curvature of polygon
/* Image Tool */
QString imageFillColor; //! Default fill color of an image frame
Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Fri Dec 31 17:13:14 2010
@@ -2009,6 +2009,7 @@
case PageItem::ItemType1:
case PageItem::ItemType3:
case PageItem::Polygon:
+ case PageItem::RegularPolygon:
if ((c->fillColor() != CommonStrings::None) || (c->GrType != 0))
{
SetClipPath(&c->PoLine);
Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Fri Dec 31 17:13:14 2010
@@ -617,6 +617,7 @@
case PageItem::PathText:
case PageItem::Symbol:
case PageItem::Group:
+ case PageItem::RegularPolygon:
drawItem(embedded, p, clip);
break;
case PageItem::Line:
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Fri Dec 31 17:13:14 2010
@@ -2954,8 +2954,8 @@
// scrActions["itemSendToScrapbook"]->setEnabled(true);
scrMenuMgr->setMenuEnabled("itemSendToScrapbook", true);
scrActions["itemSendToPattern"]->setEnabled(true);
- scrActions["itemAdjustFrameToImage"]->setEnabled(true);
- scrActions["itemAdjustImageToFrame"]->setEnabled(true);
+ scrActions["itemAdjustFrameToImage"]->setEnabled(false);
+ scrActions["itemAdjustImageToFrame"]->setEnabled(false);
scrActions["itemExtendedImageProperties"]->setEnabled(false);
scrActions["itemUpdateImage"]->setEnabled(false);
scrActions["itemPreviewLow"]->setEnabled(false);
@@ -2972,6 +2972,15 @@
scrActions["itemConvertToPolygon"]->setEnabled(false);
scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != modeEdit);
}
+ if (SelectedType == PageItem::RegularPolygon) //Polygon
+ {
+ scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
+ scrActions["itemConvertToBezierCurve"]->setEnabled(doc->appMode != modeEdit);
+ scrActions["itemConvertToImageFrame"]->setEnabled(doc->appMode != modeEdit);
+ scrActions["itemConvertToOutlines"]->setEnabled(false);
+ scrActions["itemConvertToPolygon"]->setEnabled(doc->appMode != modeEdit);
+ scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != modeEdit);
+ }
else if (SelectedType == PageItem::PolyLine) //Polyline
{
scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
@@ -2981,7 +2990,7 @@
scrActions["itemConvertToPolygon"]->setEnabled(doc->appMode != modeEdit);
scrActions["itemConvertToTextFrame"]->setEnabled(false);
}
- else if (SelectedType == PageItem::PolyLine) // Line
+ else if (SelectedType == PageItem::Line) // Line
{
scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
scrActions["itemConvertToBezierCurve"]->setEnabled(true);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Dec 31 17:13:14 2010
@@ -58,6 +58,7 @@
#endif
#include "pageitem_symbol.h"
#include "pageitem_group.h"
+#include "pageitem_regularpolygon.h"
#include "ui/pagepalette.h"
#include "pagesize.h"
#include "pagestructs.h"
@@ -4018,6 +4019,10 @@
newItem = new PageItem_Group(this, x, y, b, h, w, CommonStrings::None, CommonStrings::None);
Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
+ case PageItem::RegularPolygon:
+ newItem = new PageItem_RegularPolygon(this, x, y, b, h, w, fill, outline);
+ Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
+ break;
default:
// qDebug() << "unknown item type";
assert (false);
@@ -4247,6 +4252,7 @@
break;
case PageItem::Symbol:
case PageItem::Group:
+ case PageItem::RegularPolygon:
newItem->ClipEdited = true;
newItem->FrameType = 3;
//At this point, we cannot create a PathText item like this, only by conversion, do nothing
@@ -4274,12 +4280,12 @@
}
//ItemType Polygon
- if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine)
+ if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine || itemType == PageItem::RegularPolygon)
{
newItem->PLineArt = Qt::PenStyle(docPrefsData.itemToolPrefs.shapeLineStyle);
newItem->setFillShade(docPrefsData.itemToolPrefs.shapeFillColorShade);
newItem->setLineShade(docPrefsData.itemToolPrefs.shapeLineColorShade);
- if (itemType == PageItem::Polygon)
+ if ((itemType == PageItem::Polygon) || (itemType == PageItem::RegularPolygon))
newItem->ContourLine = newItem->PoLine.copy();
}
}
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Fri Dec 31 17:13:14 2010
@@ -114,7 +114,7 @@
buildID = new QLabel( tab );
buildID->setAlignment(Qt::AlignCenter);
buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
- QString BUILD_DAY = "18";
+ QString BUILD_DAY = "31";
QString BUILD_MONTH = CommonStrings::december;
QString BUILD_YEAR = "2010";
QString BUILD_TIME = "";
Modified: trunk/Scribus/scribus/ui/modetoolbar.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/ui/modetoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/modetoolbar.cpp (original)
+++ trunk/Scribus/scribus/ui/modetoolbar.cpp Fri Dec 31 17:13:14 2010
@@ -125,7 +125,10 @@
{
PolygonProps* dia = new PolygonProps(this, m_ScMW->doc->itemToolPrefs().polyCorners, m_ScMW->doc->itemToolPrefs().polyFactorGuiVal, m_ScMW->doc->itemToolPrefs().polyFactor, m_ScMW->doc->itemToolPrefs().polyUseFactor, m_ScMW->doc->itemToolPrefs().polyRotation, m_ScMW->doc->itemToolPrefs().polyCurvature);
if (dia->exec())
+ {
dia->getValues(&m_ScMW->doc->itemToolPrefs().polyCorners, &m_ScMW->doc->itemToolPrefs().polyFactorGuiVal, &m_ScMW->doc->itemToolPrefs().polyFactor, &m_ScMW->doc->itemToolPrefs().polyUseFactor, &m_ScMW->doc->itemToolPrefs().polyRotation, &m_ScMW->doc->itemToolPrefs().polyCurvature);
+ m_ScMW->scrActions["toolsInsertPolygon"]->trigger();
+ }
delete dia;
}
Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp Fri Dec 31 17:13:14 2010
@@ -128,6 +128,7 @@
tipText = CommonStrings::itemType_Line;
break;
case PageItem::Polygon:
+ case PageItem::RegularPolygon:
tipText = CommonStrings::itemType_Polygon;
break;
case PageItem::PolyLine:
@@ -488,6 +489,7 @@
item->setIcon( 0, lineIcon );
break;
case PageItem::Polygon:
+ case PageItem::RegularPolygon:
item->setIcon( 0, polygonIcon );
break;
case PageItem::PolyLine:
Modified: trunk/Scribus/scribus/ui/polygonwidget.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/ui/polygonwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/polygonwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/polygonwidget.cpp Fri Dec 31 17:13:14 2010
@@ -152,7 +152,7 @@
p.begin(&pm);
p.setBrush(Qt::NoBrush);
p.setPen(Qt::black);
- QPainterPath pp = RegularPolygon(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness);
+ QPainterPath pp = RegularPolygonPath(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness);
QRectF br = pp.boundingRect();
if (br.x() < 0)
{
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Fri Dec 31 17:13:14 2010
@@ -54,6 +54,8 @@
#include "cpalette.h"
#include "transparencypalette.h"
#include "pageitem_textframe.h"
+#include "pageitem_regularpolygon.h"
+#include "polyprops.h"
#include "sccombobox.h"
#include "scfonts.h"
#include "scribus.h"
@@ -2092,7 +2094,7 @@
i=doc->m_Selection->itemAt(0);
HaveItem=true;
EditShape->setEnabled(!i->locked());
- SCustom->setEnabled(nr!=5 && nr!=7 && nr!=8 && !i->locked());
+ SCustom->setEnabled(nr!=5 && nr!=7 && nr!=8 && nr!=13 && !i->locked());
}
else
{
@@ -2205,6 +2207,7 @@
case PageItem::ItemType1:
case PageItem::ItemType3:
case PageItem::Polygon:
+ case PageItem::RegularPolygon:
TabStack->setItemEnabled(idShapeItem, true);
TabStack->setItemEnabled(idTextItem, false);
TabStack->setItemEnabled(idImageItem, false);
@@ -4106,8 +4109,24 @@
if ((HaveDoc) && (HaveItem))
{
tmpSelection->clear();
- m_ScMW->view->requestMode(modeEditClip);
- RoundRect->setEnabled(false);
+ if (CurItem->asRegularPolygon())
+ {
+ PageItem_RegularPolygon* item = CurItem->asRegularPolygon();
+ PolygonProps* dia = new PolygonProps(m_ScMW, item->polyCorners, item->polyFactorGuiVal, item->polyFactor, item->polyUseFactor, item->polyRotation, item->polyCurvature);
+ if (dia->exec())
+ {
+ dia->getValues(&item->polyCorners, &item->polyFactorGuiVal, &item->polyFactor, &item->polyUseFactor, &item->polyRotation, &item->polyCurvature);
+ item->recalcPath();
+ }
+ delete dia;
+ CurItem->update();
+ emit DocChanged();
+ }
+ else
+ {
+ m_ScMW->view->requestMode(modeEditClip);
+ RoundRect->setEnabled(false);
+ }
}
}
Modified: trunk/Scribus/scribus/util_math.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/util_math.cpp
==============================================================================
--- trunk/Scribus/scribus/util_math.cpp (original)
+++ trunk/Scribus/scribus/util_math.cpp Fri Dec 31 17:13:14 2010
@@ -65,7 +65,7 @@
return ret;
}
-QPainterPath RegularPolygon(double w, double h, uint c, bool star, double factor, double rota, double factor2)
+QPainterPath RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2)
{
uint cx = star ? c * 2 : c;
double seg = 360.0 / cx;
Modified: trunk/Scribus/scribus/util_math.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16191&path=/trunk/Scribus/scribus/util_math.h
==============================================================================
--- trunk/Scribus/scribus/util_math.h (original)
+++ trunk/Scribus/scribus/util_math.h Fri Dec 31 17:13:14 2010
@@ -34,7 +34,7 @@
FPoint SCRIBUS_API projectPointOnLine(FPoint p, QPointF lineStart, QPointF lineEnd);
QPolygon SCRIBUS_API FlattenPath(const FPointArray& ina, QList<uint> &Segs);
QList<QPainterPath> SCRIBUS_API decomposePath(QPainterPath &path);
-QPainterPath SCRIBUS_API RegularPolygon(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0);
+QPainterPath SCRIBUS_API RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0);
uint SCRIBUS_API getDouble(QString in, bool raw);
inline double SCRIBUS_API sind(double);
inline double SCRIBUS_API cosd(double);
More information about the scribus-commit
mailing list