r16215 by fschmid - Fixed Bug #4717: "New shape: Circle segment", works almost exactly as in Inkscape.

scribus-commit scribus-commit at lists.scribus.net
Thu Jan 6 17:48:55 CET 2011


Author: fschmid
Date: Thu Jan  6 16:48:54 2011
New Revision: 16215

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16215
Log:
Fixed Bug #4717: "New shape: Circle segment", works almost exactly as in Inkscape.

Added:
    trunk/Scribus/resources/icons/16/draw-arc.png   (with props)
    trunk/Scribus/resources/icons/22/draw-arc.png   (with props)
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_editarc.h
    trunk/Scribus/scribus/pageitem_arc.cpp
    trunk/Scribus/scribus/pageitem_arc.h
Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/canvas.h
    trunk/Scribus/scribus/canvasmode.cpp
    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/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/scribusstructs.h
    trunk/Scribus/scribus/scribusview.h
    trunk/Scribus/scribus/ui/modetoolbar.cpp
    trunk/Scribus/scribus/ui/outlinepalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Thu Jan  6 16:48:54 2011
@@ -180,8 +180,9 @@
   loadsaveplugin.h
   menumanager.h
   navigator.h
-  observable.h 
+  observable.h
   pageitem.h
+  pageitem_arc.h
   pageitem_group.h
   pageitem_imageframe.h
   pageitem_latexframe.h
@@ -443,6 +444,7 @@
   canvasmode_eyedropper.cpp
   canvasmode_framelinks.cpp
   canvasmode_edit.cpp
+  canvasmode_editarc.cpp
   canvasmode_editgradient.cpp
   canvasmode_editmeshgradient.cpp
 #  canvasmode_legacy.cpp
@@ -505,6 +507,7 @@
   nfttemplate.cpp
   page.cpp
   pageitem.cpp
+  pageitem_arc.cpp
 #  pageitem_desaxe.cpp
   pageitem_group.cpp
   pageitem_imageframe.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Thu Jan  6 16:48:54 2011
@@ -706,6 +706,8 @@
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), mainWindow, modeDrawShapes));
 	name="toolsInsertPolygon";
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-polygon.png"), loadIcon("22/draw-polygon.png"), "", defaultKey(name), mainWindow, modeDrawRegularPolygon));
+	name="toolsInsertArc";
+	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-arc.png"), loadIcon("22/draw-arc.png"), "", defaultKey(name), mainWindow, modeDrawArc));
 	name="toolsInsertLine";
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("Stift16.xpm"), loadIcon("Stift.xpm"), "", defaultKey(name), mainWindow, modeDrawLine));
 	name="toolsInsertBezier";
@@ -781,7 +783,7 @@
 	(*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
 
 	*modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame" << "toolsInsertTableFrame";
-	*modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertLine" << "toolsInsertBezier";
+	*modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertArc" << "toolsInsertLine" << "toolsInsertBezier";
 	*modeActionNames << "toolsInsertFreehandLine" << "toolsInsertCalligraphicLine" << "toolsInsertRenderFrame" << "toolsRotate" << "toolsZoom" << "toolsEditContents";
 	*modeActionNames << "toolsEditWithStoryEditor" << "toolsLinkTextFrame" << "toolsUnlinkTextFrame";
 	*modeActionNames << "toolsEyeDropper" << "toolsCopyProperties";
@@ -1472,6 +1474,7 @@
 	(*scrActions)["toolsInsertTableFrame"]->setText( tr("Insert T&able"));
 	(*scrActions)["toolsInsertShape"]->setText( tr("Insert &Shape"));
 	(*scrActions)["toolsInsertPolygon"]->setText( tr("Insert &Polygon"));
+	(*scrActions)["toolsInsertArc"]->setText( tr("Insert Arc"));
 	(*scrActions)["toolsInsertLine"]->setText( tr("Insert &Line"));
 	(*scrActions)["toolsInsertCalligraphicLine"]->setText( tr("Insert Calligraphic Line"));
 	(*scrActions)["toolsInsertBezier"]->setText( tr("Insert &Bezier Curve"));
@@ -1862,6 +1865,7 @@
 		<< "toolsInsertTableFrame"
 		<< "toolsInsertShape"
 		<< "toolsInsertPolygon"
+		<< "toolsInsertArc"
 		<< "toolsInsertLine"
 		<< "toolsInsertBezier"
 		<< "toolsInsertFreehandLine"

Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h (original)
+++ trunk/Scribus/scribus/canvas.h Thu Jan  6 16:48:54 2011
@@ -90,6 +90,7 @@
 	friend class CanvasMode;
 	friend class CanvasMode_CopyProperties;
 	friend class CanvasMode_Edit;
+	friend class CanvasMode_EditArc;
 	friend class CanvasMode_EditGradient;
 	friend class CanvasMode_EditMeshGradient;
 	friend class CanvasMode_EyeDropper;

Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Thu Jan  6 16:48:54 2011
@@ -24,6 +24,7 @@
 #include "canvasmode_drawfreehand.h"
 #include "canvasmode_drawcalligraphic.h"
 #include "canvasmode_edit.h"
+#include "canvasmode_editarc.h"
 #include "canvasmode_editgradient.h"
 #include "canvasmode_editmeshgradient.h"
 #include "canvasmode_eyedropper.h"
@@ -134,6 +135,7 @@
 		case modeDrawText:
 		case modeDrawTable:
 		case modeDrawRegularPolygon:
+		case modeDrawArc:
 		case modeInsertPDFButton:
 		case modeInsertPDFTextfield:
 		case modeInsertPDFCheckbox:
@@ -165,6 +167,9 @@
 			break;
 		case modeRotation:
 			result = new CanvasMode_Rotate(view);
+			break;
+		case modeEditArc:
+			result = new CanvasMode_EditArc(view);
 			break;
 			// more modes as they are defined...
 			
@@ -539,6 +544,7 @@
 	switch (m_doc->appMode)
 	{
 		case modeDrawShapes:
+		case modeDrawArc:
 			qApp->changeOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")));
 			break;
 		case modeDrawImage:
@@ -590,6 +596,7 @@
 		case modeInsertPDFTextAnnotation:
 		case modeInsertPDFLinkAnnotation:
 		case modeInsertPDF3DAnnotation:
+		case modeEditArc:
 			qApp->changeOverrideCursor(QCursor(Qt::CrossCursor));
 			break;
 		default:

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp Thu Jan  6 16:48:54 2011
@@ -102,6 +102,15 @@
 		{
 			p->drawEllipse(localRect);
 		}
+		else if (createObjectMode == modeDrawArc)
+		{
+			QPainterPath path;
+			path.moveTo(localRect.width() / 2.0, localRect.height() / 2.0);
+			path.arcTo(0.0, 0.0, localRect.width(), localRect.height(), m_doc->itemToolPrefs().arcStartAngle, m_doc->itemToolPrefs().arcSweepAngle);
+			path.closeSubpath();
+			p->translate(localRect.left(), localRect.top());
+			p->drawPath(path);
+		}
 		else if (createObjectMode == modeDrawRegularPolygon)
 		{
 			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, m_doc->itemToolPrefs().polyInnerRot, m_doc->itemToolPrefs().polyOuterCurvature);
@@ -516,6 +525,10 @@
 		itemType  = (int) PageItem::RegularPolygon;
 		frameType = (int) PageItem::Unspecified;
 		break;
+	case modeDrawArc:
+		itemType  = (int) PageItem::Arc;
+		frameType = (int) PageItem::Unspecified;
+		break;
 	case modeInsertPDFButton:
 	case modeInsertPDFTextfield:
 	case modeInsertPDFCheckbox:
@@ -671,32 +684,17 @@
 		}
 		break;
 	case modeDrawRegularPolygon:
-		{
-			if (modifiers == Qt::ShiftModifier)
-				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::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();
-			m_doc->m_Selection->addItem(currItem);
-			currItem->update();
-			inItemCreation = true;
-//FIXME:				m_canvas->m_viewMode.operItemResizing = true;
-			if (m->modifiers() == Qt::ShiftModifier)
-			{
-				m_view->requestMode(modeNormal);
-// itemAdd calls PageItem::update					emit DocChanged();
-				inItemCreation = false;
-//					m_view->updateContents();
-			}
-			else
-			{
-//FIXME:					m_canvas->m_viewMode.operItemMoving = true;
-				m_canvas->setRenderModeFillBuffer();
-			}*/
-			break;
-		}
+		if (modifiers == Qt::ShiftModifier)
+			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::RegularPolygon, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
+		break;
+	case modeDrawArc:
+		if (modifiers == Qt::ShiftModifier)
+			z = m_doc->itemAddArea(PageItem::Arc, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
+		else
+			z = m_doc->itemAdd(PageItem::Arc, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
+		break;
 	case modeInsertPDFButton:
 	case modeInsertPDFTextfield:
 	case modeInsertPDFCheckbox:

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Thu Jan  6 16:48:54 2011
@@ -41,6 +41,7 @@
 #include "loadsaveplugin.h"
 #include "pageitem_textframe.h"
 #include "pageitem_regularpolygon.h"
+#include "pageitem_arc.h"
 #include "prefscontext.h"
 #include "prefsfile.h"
 #include "prefsmanager.h"
@@ -251,6 +252,10 @@
 			}
 			delete dia;
 			m_view->updateContents();
+		}
+		else if (currItem->asArc())
+		{
+			m_view->requestMode(modeEditArc);
 		}
 	}
 }

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Thu Jan  6 16:48:54 2011
@@ -560,6 +560,10 @@
 		AnName = tr("RegularPolygon");
 		setUPixmap(Um::IPolygon);
 		break;
+	case Arc:
+		AnName = tr("Arc");
+		setUPixmap(Um::IPolygon);
+		break;
 	default:
 		AnName = "Item";
 		break;
@@ -1837,6 +1841,7 @@
 			case Symbol:
 			case Group:
 			case RegularPolygon:
+			case Arc:
 				embedded->DrawObj_Item(p, cullingArea);
 				break;
 			case Line:
@@ -2591,6 +2596,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					GrColorP1 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2627,6 +2633,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					GrColorP2 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2663,6 +2670,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					GrColorP3 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2699,6 +2707,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					GrColorP4 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2764,6 +2773,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					MColor = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2812,6 +2822,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					MColor = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3112,6 +3123,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					tmp = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3206,6 +3218,7 @@
 				case LatexFrame:
 				case OSGFrame:
 				case RegularPolygon:
+				case Arc:
 					tmp = m_Doc->itemToolPrefs().shapeLineColor;
 					break;
 				default:
@@ -3328,6 +3341,7 @@
 				case LatexFrame:
 				case OSGFrame:
 				case RegularPolygon:
+				case Arc:
 					lineColorVal = m_Doc->itemToolPrefs().shapeLineColor;
 					break;
 				default:
@@ -3366,6 +3380,7 @@
 				case PolyLine:
 				case Polygon:
 				case RegularPolygon:
+				case Arc:
 					fillColorVal = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3737,6 +3752,7 @@
 			break;
 		case Polygon:
 		case RegularPolygon:
+		case Arc:
 			fromType = Um::Polygon;
 			break;
 		default:
@@ -3759,6 +3775,7 @@
 			break;
 		case Polygon:
 		case RegularPolygon:
+		case Arc:
 			toType = Um::Polygon;
 			setUPixmap(Um::IPolygon);
 			break;

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Thu Jan  6 16:48:54 2011
@@ -72,6 +72,7 @@
 class PageItem_LatexFrame;
 class PageItem_Symbol;
 class PageItem_Group;
+class PageItem_Arc;
 #ifdef HAVE_OSG
 class PageItem_OSGFrame;
 #endif
@@ -170,6 +171,7 @@
 		Symbol			= 11,
 		Group			= 12,
 		RegularPolygon	= 13,
+		Arc				= 14,
 		Multiple		= 99
 	};
 
@@ -199,6 +201,7 @@
 	virtual PageItem_Symbol * asSymbolFrame() { return NULL; }
 	virtual PageItem_Group * asGroupFrame() { return NULL; }
 	virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; }
+	virtual PageItem_Arc * asArc() { return NULL; }
 
 	virtual bool isImageFrame()		const { return false; }
 	virtual bool isLine()			const { return false; }
@@ -211,6 +214,7 @@
 	virtual bool isSymbol()			const { return false; }
 	virtual bool isGroup()			const { return false; }
 	virtual bool isRegularPolygon()	const { return false; }
+	virtual bool isArc()			const { return false; }
 
 	/** @brief Frame Type
 	 *

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Thu Jan  6 16:48:54 2011
@@ -2190,6 +2190,7 @@
 					case PageItem::ItemType3:
 					case PageItem::Polygon:
 					case PageItem::RegularPolygon:
+					case PageItem::Arc:
 						PutPage("q\n");
 						if (((ite->GrMask > 0) || (ite->fillTransparency() != 0) || (ite->fillBlendmode() != 0)) && ((Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4)))
 						{
@@ -3926,6 +3927,7 @@
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
 		case PageItem::RegularPolygon:
+		case PageItem::Arc:
 			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=16215&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 Thu Jan  6 16:48:54 2011
@@ -32,6 +32,7 @@
 	#include "pageitem_osgframe.h"
 #endif
 #include "pageitem_regularpolygon.h"
+#include "pageitem_arc.h"
 #include <QCursor>
 // #include <QDebug>
 #include <QFileInfo>
@@ -1707,6 +1708,9 @@
 	doc->itemToolPrefs().polyOuterCurvature    = attrs.valueAsDouble("POLYOCUR", 0.0);
 	doc->itemToolPrefs().polyFactorGuiVal = attrs.valueAsInt("POLYFD", 0);
 	doc->itemToolPrefs().polyUseFactor    = attrs.valueAsBool("POLYS", false);
+
+	doc->itemToolPrefs().arcStartAngle = attrs.valueAsDouble("arcStartAngle", 30.0);
+	doc->itemToolPrefs().arcSweepAngle = attrs.valueAsDouble("arcSweepAngle", 300.0);
 
 	doc->itemToolPrefs().lineStartArrow = attrs.valueAsInt("StartArrow", 0);
 	doc->itemToolPrefs().lineEndArrow   = attrs.valueAsInt("EndArrow", 0);
@@ -3355,6 +3359,12 @@
 		if (pagenr > -2) 
 			currItem->OwnPage = pagenr;
 		break;
+	case PageItem::Arc:
+		z = doc->itemAdd(PageItem::Arc, 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;
@@ -3676,6 +3686,14 @@
 		regitem->polyFactorGuiVal = attrs.valueAsInt("POLYFD", 0);
 		regitem->polyUseFactor    = attrs.valueAsBool("POLYS", false);
 	}
+	if (currItem->asArc())
+	{
+		PageItem_Arc *arcitem = currItem->asArc();
+		arcitem->arcHeight     = attrs.valueAsDouble("arcHeight", 1.0);
+		arcitem->arcWidth      = attrs.valueAsDouble("arcWidth", 1.0);
+		arcitem->arcStartAngle = attrs.valueAsDouble("arcStartAngle", 30.0);
+		arcitem->arcSweepAngle = attrs.valueAsDouble("arcSweepAngle", 300.0);
+	}
 	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=16215&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 Thu Jan  6 16:48:54 2011
@@ -25,6 +25,7 @@
 	#include "pageitem_osgframe.h"
 #endif
 #include "pageitem_regularpolygon.h"
+#include "pageitem_arc.h"
 
 #include "units.h"
 #include "util.h"
@@ -262,6 +263,8 @@
 	docu.writeAttribute("POLYOCUR", m_Doc->itemToolPrefs().polyOuterCurvature);
 	docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs().polyFactorGuiVal);
 	docu.writeAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs().polyUseFactor));
+	docu.writeAttribute("arcStartAngle", m_Doc->itemToolPrefs().arcStartAngle);
+	docu.writeAttribute("arcSweepAngle", m_Doc->itemToolPrefs().polyInnerRot);
 	docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->autoSave()));
 	docu.writeAttribute("AutoSaveTime", m_Doc->autoSaveTime());
 	docu.writeAttribute("ScratchBottom", m_Doc->scratch()->Bottom);
@@ -1682,6 +1685,14 @@
 		docu.writeAttribute("POLYOCUR", regitem->polyOuterCurvature);
 		docu.writeAttribute("POLYFD", regitem->polyFactorGuiVal);
 		docu.writeAttribute("POLYS", static_cast<int>(regitem->polyUseFactor));
+	}
+	if (item->asArc())
+	{
+		PageItem_Arc *arcitem = item->asArc();
+		docu.writeAttribute("arcHeight", arcitem->arcHeight);
+		docu.writeAttribute("arcWidth", arcitem->arcWidth);
+		docu.writeAttribute("arcStartAngle", arcitem->arcStartAngle);
+		docu.writeAttribute("arcSweepAngle", arcitem->arcSweepAngle);
 	}
 	if(item->isAnnotation())
 	{

Modified: trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp Thu Jan  6 16:48:54 2011
@@ -377,6 +377,7 @@
 		stroke = getStrokeStyle(Item);
 	switch (Item->itemType())
 	{
+		case PageItem::Arc:
 		case PageItem::Polygon:
 		case PageItem::PolyLine:
 		case PageItem::RegularPolygon:
@@ -515,7 +516,7 @@
 {
 	bool closedPath;
 	QDomElement ob;
-	if ((Item->itemType() == PageItem::Polygon) || (Item->itemType() == PageItem::RegularPolygon))
+	if ((Item->itemType() == PageItem::Polygon) || (Item->itemType() == PageItem::RegularPolygon) || (Item->itemType() == PageItem::Arc))
 		closedPath = true;
 	else
 		closedPath = false;
@@ -1198,6 +1199,7 @@
 			stroke = getStrokeStyle(embedded);
 		switch (embedded->itemType())
 		{
+			case PageItem::Arc:
 			case PageItem::Polygon:
 			case PageItem::PolyLine:
 			case PageItem::RegularPolygon:

Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&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 Thu Jan  6 16:48:54 2011
@@ -80,6 +80,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	m_actionInfo.needsNumObjects = 3;
 }
 

Modified: trunk/Scribus/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&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 Thu Jan  6 16:48:54 2011
@@ -81,6 +81,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	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=16215&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 Thu Jan  6 16:48:54 2011
@@ -77,6 +77,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	m_actionInfo.needsNumObjects = 3;
 }
 

Modified: trunk/Scribus/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&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 Thu Jan  6 16:48:54 2011
@@ -79,6 +79,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	m_actionInfo.needsNumObjects = 2;
 }
 

Modified: trunk/Scribus/scribus/plugins/tools/pathcut/pathcut.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&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 Thu Jan  6 16:48:54 2011
@@ -85,6 +85,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	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=16215&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 Thu Jan  6 16:48:54 2011
@@ -92,6 +92,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	m_actionInfo.needsNumObjects = 2;
 }
 

Modified: trunk/Scribus/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&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 Thu Jan  6 16:48:54 2011
@@ -86,6 +86,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	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=16215&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Thu Jan  6 16:48:54 2011
@@ -270,6 +270,8 @@
 	appPrefs.itemToolPrefs.polyInnerRot = 0.0;
 	appPrefs.itemToolPrefs.polyCurvature = 0.0;
 	appPrefs.itemToolPrefs.polyOuterCurvature = 0.0;
+	appPrefs.itemToolPrefs.arcStartAngle = 30.0;
+	appPrefs.itemToolPrefs.arcSweepAngle = 300.0;
 //	appPrefs.PSize = 40;
 	appPrefs.printerPrefs.ClipMargin = false;
 	appPrefs.printerPrefs.GCRMode = false;
@@ -1472,6 +1474,8 @@
 	dcItemTools.setAttribute("PolygonFactorGUI", appPrefs.itemToolPrefs.polyFactorGuiVal);
 	dcItemTools.setAttribute("PolygonCurvature", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyCurvature));
 	dcItemTools.setAttribute("PolygonOuterCurvature", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyOuterCurvature));
+	dcItemTools.setAttribute("arcStartAngle", ScCLocale::toQStringC(appPrefs.itemToolPrefs.arcStartAngle));
+	dcItemTools.setAttribute("arcSweepAngle", ScCLocale::toQStringC(appPrefs.itemToolPrefs.arcSweepAngle));
 	dcItemTools.setAttribute("PolygonUseFactor", static_cast<int>(appPrefs.itemToolPrefs.polyUseFactor));
 	dcItemTools.setAttribute("ImageScaleType", static_cast<int>(appPrefs.itemToolPrefs.imageScaleType));
 	dcItemTools.setAttribute("ImageAspectRatio", static_cast<int>(appPrefs.itemToolPrefs.imageAspectRatio));
@@ -2065,6 +2069,8 @@
 			appPrefs.itemToolPrefs.polyUseFactor  = static_cast<bool>(dc.attribute("PolygonUseFactor", "0").toInt());
 			appPrefs.itemToolPrefs.lineStartArrow = dc.attribute("LineStartArrow", "0").toInt();
 			appPrefs.itemToolPrefs.lineEndArrow   = dc.attribute("LineEndArrow", "0").toInt();
+			appPrefs.itemToolPrefs.arcStartAngle = ScCLocale::toDoubleC(dc.attribute("arcStartAngle"), 30.0);
+			appPrefs.itemToolPrefs.arcSweepAngle = ScCLocale::toDoubleC(dc.attribute("arcSweepAngle"), 300.0);
 			if (dc.hasAttribute("Face"))
 			{
 				QString tmpf=dc.attribute("Face");

Modified: trunk/Scribus/scribus/prefsstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/prefsstructs.h
==============================================================================
--- trunk/Scribus/scribus/prefsstructs.h (original)
+++ trunk/Scribus/scribus/prefsstructs.h Thu Jan  6 16:48:54 2011
@@ -226,6 +226,9 @@
 	double calligrapicPenAngle;		//! Angle of the calligraphics Brush
 	double calligrapicPenWidth;		//! Width of the calligraphics Brush
 	int calligrapicPenStyle; //! Line style of the calligraphics Brush
+	/* Arc Tool */
+	double arcStartAngle;    //! angle where the arc starts
+	double arcSweepAngle;    //! angle the arc spans
 };
 
 struct OperatorToolPrefs

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Thu Jan  6 16:48:54 2011
@@ -2010,6 +2010,7 @@
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
 		case PageItem::RegularPolygon:
+		case PageItem::Arc:
 			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=16215&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Thu Jan  6 16:48:54 2011
@@ -618,6 +618,7 @@
 			case PageItem::Symbol:
 			case PageItem::Group:
 			case PageItem::RegularPolygon:
+			case PageItem::Arc:
 				drawItem(embedded, p, clip);
 				break;
 			case PageItem::Line:

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Thu Jan  6 16:48:54 2011
@@ -809,6 +809,7 @@
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertTableFrame"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertShape"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertPolygon"], "Insert", false);
+	scrMenuMgr->addMenuItem(scrActions["toolsInsertArc"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertLine"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertBezier"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertFreehandLine"], "Insert", false);
@@ -2458,6 +2459,7 @@
 	scrActions["toolsInsertFreehandLine"]->setEnabled(true);
 	scrActions["toolsInsertCalligraphicLine"]->setEnabled(true);
 	scrActions["toolsInsertPolygon"]->setEnabled(true);
+	scrActions["toolsInsertArc"]->setEnabled(true);
 	scrActions["toolsInsertRenderFrame"]->setEnabled(true);
 	scrActions["toolsMeasurements"]->setEnabled(true);
 	scrActions["toolsEyeDropper"]->setEnabled(true);
@@ -2972,7 +2974,7 @@
 			scrActions["itemConvertToPolygon"]->setEnabled(false);
 			scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != modeEdit);
 		}
-		if (SelectedType == PageItem::RegularPolygon) //Polygon
+		else if ((SelectedType == PageItem::RegularPolygon) || (SelectedType == PageItem::Arc)) // Regular Polygon + Arc
 		{
 			scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
 			scrActions["itemConvertToBezierCurve"]->setEnabled(doc->appMode != modeEdit);
@@ -4620,6 +4622,7 @@
 		scrActions["toolsInsertFreehandLine"]->setEnabled(false);
 		scrActions["toolsInsertCalligraphicLine"]->setEnabled(false);
 		scrActions["toolsInsertPolygon"]->setEnabled(false);
+		scrActions["toolsInsertArc"]->setEnabled(false);
 		scrActions["toolsInsertRenderFrame"]->setEnabled(false);
 		scrActions["toolsLinkTextFrame"]->setEnabled(false);
 		scrActions["toolsUnlinkTextFrame"]->setEnabled(false);
@@ -6106,6 +6109,7 @@
 		scrActions["toolsInsertFreehandLine"]->setEnabled(false);
 		scrActions["toolsInsertCalligraphicLine"]->setEnabled(false);
 		scrActions["toolsInsertPolygon"]->setEnabled(false);
+		scrActions["toolsInsertArc"]->setEnabled(false);
 		scrActions["toolsInsertRenderFrame"]->setEnabled(false);
 		scrActions["toolsLinkTextFrame"]->setEnabled(false);
 		scrActions["toolsUnlinkTextFrame"]->setEnabled(false);
@@ -6187,6 +6191,7 @@
 	scrActions["toolsInsertFreehandLine"]->setEnabled(true);
 	scrActions["toolsInsertCalligraphicLine"]->setEnabled(true);
 	scrActions["toolsInsertPolygon"]->setEnabled(true);
+	scrActions["toolsInsertArc"]->setEnabled(true);
 	scrActions["toolsInsertRenderFrame"]->setEnabled(true);
 	scrActions["toolsPDFPushButton"]->setEnabled(true);
 	scrActions["toolsPDFTextField"]->setEnabled(true);
@@ -6276,6 +6281,7 @@
 	scrActions["toolsInsertTableFrame"]->setChecked(mode==modeDrawTable);
 	scrActions["toolsInsertShape"]->setChecked(mode==modeDrawShapes);
 	scrActions["toolsInsertPolygon"]->setChecked(mode==modeDrawRegularPolygon);
+	scrActions["toolsInsertArc"]->setChecked(mode==modeDrawArc);
 	scrActions["toolsInsertLine"]->setChecked(mode==modeDrawLine);
 	scrActions["toolsInsertBezier"]->setChecked(mode==modeDrawBezierLine);
 	scrActions["toolsInsertFreehandLine"]->setChecked(mode==modeDrawFreehandLine);
@@ -6439,6 +6445,7 @@
 		switch (mode)
 		{
 			case modeDrawShapes:
+			case modeDrawArc:
 				if (docSelectionCount!=0)
 					view->Deselect(true);
 				qApp->changeOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")));
@@ -6503,6 +6510,7 @@
 			case modeMeasurementTool:
 			case modeEditGradientVectors:
 			case modeEditMeshGradient:
+			case modeEditArc:
 				qApp->changeOverrideCursor(QCursor(Qt::CrossCursor));
 				break;
 			default:
@@ -9172,6 +9180,7 @@
 	scrActions["toolsInsertFreehandLine"]->setEnabled(setter);
 	scrActions["toolsInsertCalligraphicLine"]->setEnabled(setter);
 	scrActions["toolsInsertPolygon"]->setEnabled(setter);
+	scrActions["toolsInsertArc"]->setEnabled(setter);
 	scrActions["toolsInsertRenderFrame"]->setEnabled(setter);
 	if (doc->masterPageMode())
 	{

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Jan  6 16:48:54 2011
@@ -59,6 +59,7 @@
 #include "pageitem_symbol.h"
 #include "pageitem_group.h"
 #include "pageitem_regularpolygon.h"
+#include "pageitem_arc.h"
 #include "ui/pagepalette.h"
 #include "pagesize.h"
 #include "pagestructs.h"
@@ -4023,6 +4024,10 @@
 			newItem = new PageItem_RegularPolygon(this, x, y, b, h, w, fill, outline);
 			Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
 			break;
+		case PageItem::Arc:
+			newItem = new PageItem_Arc(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);
@@ -4253,6 +4258,7 @@
 		case PageItem::Symbol:
 		case PageItem::Group:
 		case PageItem::RegularPolygon:
+		case PageItem::Arc:
 			newItem->ClipEdited = true;
 			newItem->FrameType = 3;
 		//At this point, we cannot create a PathText item like this, only by conversion, do nothing
@@ -4280,12 +4286,12 @@
 	}
 
 	//ItemType Polygon
-	if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine || itemType == PageItem::RegularPolygon)
+	if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine || itemType == PageItem::RegularPolygon || itemType == PageItem::Arc)
 	{
 		newItem->PLineArt = Qt::PenStyle(docPrefsData.itemToolPrefs.shapeLineStyle);
 		newItem->setFillShade(docPrefsData.itemToolPrefs.shapeFillColorShade);
 		newItem->setLineShade(docPrefsData.itemToolPrefs.shapeLineColorShade);
-		if ((itemType == PageItem::Polygon) || (itemType == PageItem::RegularPolygon))
+		if ((itemType == PageItem::Polygon) || (itemType == PageItem::RegularPolygon) || (itemType == PageItem::Arc))
 			newItem->ContourLine = newItem->PoLine.copy();
 	}
 }

Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Thu Jan  6 16:48:54 2011
@@ -310,7 +310,9 @@
 	modeImportObject,
 	modeInsertPDF3DAnnotation,
 	modeEditMeshGradient,
-	modeDrawCalligraphicLine
+	modeDrawCalligraphicLine,
+	modeDrawArc,
+	modeEditArc
 };
 
 struct AlignObjs

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h (original)
+++ trunk/Scribus/scribus/scribusview.h Thu Jan  6 16:48:54 2011
@@ -101,6 +101,7 @@
 	friend class CanvasMode_Edit;
 	friend class CanvasMode_EditGradient;
 	friend class CanvasMode_EditMeshGradient;
+	friend class CanvasMode_EditArc;
 	friend class CanvasMode_FrameLinks;
 	friend class CanvasMode_Magnifier;
 	friend class CanvasMode_NodeEdit;

Modified: trunk/Scribus/scribus/ui/modetoolbar.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/ui/modetoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/modetoolbar.cpp (original)
+++ trunk/Scribus/scribus/ui/modetoolbar.cpp Thu Jan  6 16:48:54 2011
@@ -70,7 +70,8 @@
 	m_ScMW->scrActions["toolsInsertPolygon"]->setMenu(insertPolygonButtonMenu);
 	QToolButton* tb2 = dynamic_cast<QToolButton*>(this->widgetForAction(m_ScMW->scrActions["toolsInsertPolygon"]));
 	tb2->setPopupMode(QToolButton::MenuButtonPopup);
-		
+
+	this->addAction(m_ScMW->scrActions["toolsInsertArc"]);
 	this->addAction(m_ScMW->scrActions["toolsInsertLine"]);
 	this->addAction(m_ScMW->scrActions["toolsInsertBezier"]);
 	this->addAction(m_ScMW->scrActions["toolsInsertFreehandLine"]);

Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp Thu Jan  6 16:48:54 2011
@@ -127,6 +127,7 @@
  						case PageItem::Line:
 							tipText = CommonStrings::itemType_Line;
  							break;
+ 						case PageItem::Arc:
  						case PageItem::Polygon:
 						case PageItem::RegularPolygon:
 							tipText = CommonStrings::itemType_Polygon;
@@ -488,6 +489,7 @@
 	case PageItem::Line:
 		item->setIcon( 0, lineIcon );
 		break;
+	case PageItem::Arc:
 	case PageItem::Polygon:
 	case PageItem::RegularPolygon:
 		item->setIcon( 0, polygonIcon );

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16215&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Thu Jan  6 16:48:54 2011
@@ -55,6 +55,7 @@
 #include "transparencypalette.h"
 #include "pageitem_textframe.h"
 #include "pageitem_regularpolygon.h"
+#include "pageitem_arc.h"
 #include "polyprops.h"
 #include "sccombobox.h"
 #include "scfonts.h"
@@ -1970,6 +1971,7 @@
 	setXY(CurItem->xPos(), CurItem->yPos());
 	setLocked(i->locked());
 	setSizeLocked(i->sizeLocked());
+	NoResize->setEnabled(!CurItem->isArc());
 	setScaleAndOffset(i->imageXScale(), i->imageYScale(), i->imageXOffset(), i->imageYOffset());
 	setLineWidth(i->lineWidth());
 	setLIvalue(i->lineStyle(), i->lineEnd(), i->lineJoin());
@@ -2223,6 +2225,7 @@
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
 		case PageItem::RegularPolygon:
+		case PageItem::Arc:
 			TabStack->setItemEnabled(idShapeItem, true);
 			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);
@@ -4136,6 +4139,11 @@
 			delete dia;
 			CurItem->update();
 			emit DocChanged();
+		}
+		else if (CurItem->asArc())
+		{
+			m_ScMW->view->requestMode(modeEditArc);
+			RoundRect->setEnabled(false);
 		}
 		else
 		{




More information about the scribus-commit mailing list