r23040 by jghali - Rename a few functions of util_math.h according to code style

scribus-commit scribus-commit at lists.scribus.net
Fri Jun 21 12:08:51 UTC 2019


Author: jghali
Date: Fri Jun 21 12:08:51 2019
New Revision: 23040

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23040
Log:
Rename a few functions of util_math.h according to code style

Modified:
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_editpolygon.cpp
    trunk/Scribus/scribus/nodeeditcontext.cpp
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem_arc.cpp
    trunk/Scribus/scribus/pageitem_regularpolygon.cpp
    trunk/Scribus/scribus/pageitem_spiral.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/import/ai/importai.cpp
    trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
    trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
    trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
    trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
    trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
    trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/polygonwidget.cpp
    trunk/Scribus/scribus/ui/spiralwidget.cpp
    trunk/Scribus/scribus/util_math.cpp
    trunk/Scribus/scribus/util_math.h

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Fri Jun 21 12:08:51 2019
@@ -127,13 +127,13 @@
 		}
 		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);
+			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);
 			p->translate(localRect.left(), localRect.top());
 			p->drawPath(path);
 		}
 		else if (createObjectMode == modeDrawSpiral)
 		{
-			QPainterPath path = SpiralPath(localRect.width(), localRect.height(), m_doc->itemToolPrefs().spiralStartAngle, m_doc->itemToolPrefs().spiralEndAngle, m_doc->itemToolPrefs().spiralFactor);
+			QPainterPath path = spiralPath(localRect.width(), localRect.height(), m_doc->itemToolPrefs().spiralStartAngle, m_doc->itemToolPrefs().spiralEndAngle, m_doc->itemToolPrefs().spiralFactor);
 			p->translate(localRect.left(), localRect.top());
 			p->drawPath(path);
 		}

Modified: trunk/Scribus/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editpolygon.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editpolygon.cpp	Fri Jun 21 12:08:51 2019
@@ -96,7 +96,7 @@
 	psx->setPen(p1b);
 	psx->setBrush(Qt::NoBrush);
 	PageItem_RegularPolygon* item = currItem->asRegularPolygon();
-	QPainterPath path = RegularPolygonPath(item->width(), item->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature);
+	QPainterPath path = regularPolygonPath(item->width(), item->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature);
 	psx->drawPath(path);
 	psx->setPen(p1bd);
 	psx->drawLine(m_startPoint, m_endPoint);
@@ -280,7 +280,7 @@
 	item->recalcPath();
 	updateFromItem();
 	QTransform itemMatrix = currItem->getTransform();
-	QPainterPath path = itemMatrix.map(RegularPolygonPath(item->width(), item->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature));
+	QPainterPath path = itemMatrix.map(regularPolygonPath(item->width(), item->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature));
 	QRectF updateRect = oldRect.united(path.boundingRect());
 	m_doc->regionsChanged()->update(updateRect.adjusted(-5, -5, 10, 10));
 }
@@ -368,7 +368,7 @@
 			QLineF stLinCo2 = QLineF(sPoint, sPoint2);
 			m_polyOuterCurvature = stLinCo.length() / stLinCo2.length();
 		}
-		QPainterPath path = RegularPolygonPath(currItem->width(), currItem->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature);
+		QPainterPath path = regularPolygonPath(currItem->width(), currItem->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature);
 		FPointArray ar;
 		ar.fromQPainterPath(path);
 		m_endPoint = ar.pointQF(2);
@@ -459,7 +459,7 @@
 	if (m_polygonPoint != noPointDefined && UndoManager::undoEnabled())
 		m_transaction = undoManager->beginTransaction(Um::Polygon, Um::IPolygon, Um::EditPolygon, "", Um::IPolygon);
 	m_view->setCursor(QCursor(Qt::CrossCursor));
-	QPainterPath path = itemMatrix.map(RegularPolygonPath(currItem->width(), currItem->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature));
+	QPainterPath path = itemMatrix.map(regularPolygonPath(currItem->width(), currItem->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature));
 	m_doc->regionsChanged()->update(path.boundingRect().adjusted(-5, -5, 10, 10));
 }
 
@@ -515,6 +515,6 @@
 			m_transaction.reset();
 		}
 	}
-	QPainterPath path = itemMatrix.map(RegularPolygonPath(item->width(), item->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature));
+	QPainterPath path = itemMatrix.map(regularPolygonPath(item->width(), item->height(), m_polyCorners, m_polyUseFactor, m_polyFactor, m_polyRotation, m_polyCurvature, m_polyInnerRot, m_polyOuterCurvature));
 	m_doc->regionsChanged()->update(path.boundingRect().adjusted(-5, -5, 10, 10));
 }

Modified: trunk/Scribus/scribus/nodeeditcontext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/nodeeditcontext.cpp
==============================================================================
--- trunk/Scribus/scribus/nodeeditcontext.cpp	(original)
+++ trunk/Scribus/scribus/nodeeditcontext.cpp	Fri Jun 21 12:08:51 2019
@@ -352,7 +352,7 @@
 			currItem->ContourLine = Clip.copy();
 		else
 			currItem->PoLine = Clip.copy();
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	}
 	if (!m_isContourLine)
 		currItem->ContourLine.translate(xposOrig - currItem->xPos(), yposOrig - currItem->yPos());

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Fri Jun 21 12:08:51 2019
@@ -7484,7 +7484,7 @@
 		this->PoLine = is->getItem().second;
 		ClipEdited = (FrameType == 0 || FrameType == 1);
 	}
-	Clip = FlattenPath(PoLine,Segments);
+	Clip = flattenPath(PoLine,Segments);
 }
 
 void PageItem::restoreLayer(SimpleState *state, bool isUndo)
@@ -8786,7 +8786,7 @@
 		PoLine.addPoint(x1, y1);
 		PoLine.addPoint(x2, y2);
 	}
-	Clip = FlattenPath(PoLine, Segments);
+	Clip = flattenPath(PoLine, Segments);
 	ClipEdited = true;
 }
 
@@ -8846,7 +8846,7 @@
 		PoLine.addQuadPoint(0, Height_rr, 0, Height_rr, 0, rr, 0, rr);
 		PoLine.addQuadPoint(0, rr, rrxBezierFactor, rr, rr, 0, rr, rr*bezierFactor);
 	}
-	Clip = FlattenPath(PoLine, Segments);
+	Clip = flattenPath(PoLine, Segments);
 	ClipEdited = false;
 	FrameType = 2;
 }
@@ -10412,7 +10412,7 @@
 		}
 		np = FPoint(Clip.point(0));
 		PoLine.putPoints(PoLine.size(), 2, np.x(), np.y(), np.x(), np.y());
-		Clip = FlattenPath(PoLine, Segments);
+		Clip = flattenPath(PoLine, Segments);
 	}
 	else
 	{
@@ -10530,7 +10530,7 @@
 					if (asPathText())
 						updatePolyClip();
 					else
-						Clip = FlattenPath(PoLine, Segments);
+						Clip = flattenPath(PoLine, Segments);
 				}
 				if (updateWelded)
 				{
@@ -10666,7 +10666,7 @@
 			if (asPathText())
 				updatePolyClip();
 			else
-				Clip = FlattenPath(PoLine, Segments);
+				Clip = flattenPath(PoLine, Segments);
 			OldB2 = width();
 			OldH2 = height();
 			if (updateWelded)

Modified: trunk/Scribus/scribus/pageitem_arc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/pageitem_arc.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_arc.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_arc.cpp	Fri Jun 21 12:08:51 2019
@@ -72,7 +72,7 @@
 	path.arcTo(0.0, 0.0, arcWidth, arcHeight, arcStartAngle, arcSweepAngle);
 	path.closeSubpath();
 	PoLine.fromQPainterPath(path);
-	Clip = FlattenPath(PoLine, Segments);
+	Clip = flattenPath(PoLine, Segments);
 	setWidthHeight(arcWidth, arcHeight, true);
 }
 

Modified: trunk/Scribus/scribus/pageitem_regularpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/pageitem_regularpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_regularpolygon.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_regularpolygon.cpp	Fri Jun 21 12:08:51 2019
@@ -57,9 +57,9 @@
 	polyCurvature = m_Doc->itemToolPrefs().polyCurvature;
 	polyInnerRot = m_Doc->itemToolPrefs().polyInnerRot;
 	polyOuterCurvature = m_Doc->itemToolPrefs().polyOuterCurvature;
-	QPainterPath path = RegularPolygonPath(w, h, polyCorners, polyUseFactor, polyFactor, polyRotation, polyCurvature, polyInnerRot, polyOuterCurvature);
+	QPainterPath path = regularPolygonPath(w, h, polyCorners, polyUseFactor, polyFactor, polyRotation, polyCurvature, polyInnerRot, polyOuterCurvature);
 	PoLine.fromQPainterPath(path);
-	Clip = FlattenPath(PoLine, Segments);
+	Clip = flattenPath(PoLine, Segments);
 }
 
 void PageItem_RegularPolygon::DrawObj_Item(ScPainter *p, QRectF /*e*/)
@@ -73,9 +73,9 @@
 
 void PageItem_RegularPolygon::recalcPath()
 {
-	QPainterPath path = RegularPolygonPath(width(), height(), polyCorners, polyUseFactor, polyFactor, polyRotation, polyCurvature, polyInnerRot, polyOuterCurvature);
+	QPainterPath path = regularPolygonPath(width(), height(), polyCorners, polyUseFactor, polyFactor, polyRotation, polyCurvature, polyInnerRot, polyOuterCurvature);
 	PoLine.fromQPainterPath(path);
-	Clip = FlattenPath(PoLine, Segments);
+	Clip = flattenPath(PoLine, Segments);
 }
 
 void PageItem_RegularPolygon::applicableActions(QStringList & actionList)

Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp	Fri Jun 21 12:08:51 2019
@@ -336,7 +336,7 @@
 			PoLine.translate(width(), 0);
 		}
 	}
-	Clip = FlattenPath(PoLine, Segments);
+	Clip = flattenPath(PoLine, Segments);
 }
 
 void PageItem_Spiral::applicableActions(QStringList & actionList)

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Fri Jun 21 12:08:51 2019
@@ -120,13 +120,13 @@
 	else if ((docItem->textFlowUsesImageClipping()) && (!docItem->imageClip.empty()))
 	{
 		QList<uint> Segs;
-		QPolygon Clip2 = FlattenPath(docItem->imageClip, Segs);
+		QPolygon Clip2 = flattenPath(docItem->imageClip, Segs);
 		res = QRegion(pp.map(Clip2)).intersected(QRegion(pp.map(docItem->Clip)));
 	}
 	else if ((docItem->textFlowUsesContourLine()) && (!docItem->ContourLine.empty()))
 	{
 		QList<uint> Segs;
-		QPolygon Clip2 = FlattenPath(docItem->ContourLine, Segs);
+		QPolygon Clip2 = flattenPath(docItem->ContourLine, Segs);
 		res = QRegion(pp.map(Clip2));
 	}
 	else

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	Fri Jun 21 12:08:51 2019
@@ -536,7 +536,7 @@
 			currItem->convertClip();
 		else
 			//
-			currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+			currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	}
 	else
 	{

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	Fri Jun 21 12:08:51 2019
@@ -3006,7 +3006,7 @@
 		currItem->ContourLine = currItem->PoLine.copy();
 
 	if (!currItem->asLine())
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	else
 	{
 		int ph = static_cast<int>(qMax(1.0, currItem->lineWidth() / 2.0));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	Fri Jun 21 12:08:51 2019
@@ -1935,7 +1935,7 @@
 	else
 		currItem->ContourLine = currItem->PoLine.copy();
 	if (!currItem->asLine())
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	else
 	{
 		int ph = static_cast<int>(qMax(1.0, currItem->lineWidth() / 2.0));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&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 Jun 21 12:08:51 2019
@@ -5461,7 +5461,7 @@
 		currItem->ContourLine = currItem->PoLine.copy();
 
 	if (!currItem->asLine())
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	else
 	{
 		int ph = static_cast<int>(qMax(1.0, currItem->lineWidth() / 2.0));

Modified: trunk/Scribus/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/ai/importai.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/ai/importai.cpp	Fri Jun 21 12:08:51 2019
@@ -1447,7 +1447,7 @@
 					if (ite->imageIsAvailable)
 						ite->setImageXYScale(ite->width() / ite->pixm.width(), ite->height() / ite->pixm.height());
 					ite->setImageFlippedV(true);
-					ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+					ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 					ite->setRedrawBounding();
 					if (importerFlags & LoadSavePlugin::lfCreateDoc)
 						ite->setLocked(itemLocked);
@@ -2565,7 +2565,7 @@
 					ite->setRotation(rotation * 180 / M_PI);
 					ite->SetRectFrame();
 					m_Doc->setRedrawBounding(ite);
-					ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+					ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 					ite->setTextFlowMode(PageItem::TextFlowDisabled);
 					ite->setFillShade(CurrFillShade);
 					ite->setLineShade(CurrStrokeShade);
@@ -3036,7 +3036,7 @@
 	ite->setRotation(rotation * 180 / M_PI);
 	ite->SetRectFrame();
 	m_Doc->setRedrawBounding(ite);
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	ite->setTextFlowMode(PageItem::TextFlowDisabled);
 	ite->setFillShade(CurrFillShade);
 	ite->setLineShade(CurrStrokeShade);

Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodg.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodg.cpp	Fri Jun 21 12:08:51 2019
@@ -3505,7 +3505,7 @@
 	item->FrameType = 3;
 	FPoint wh = getMaxClipF(&item->PoLine);
 	item->setWidthHeight(wh.x(), wh.y());
-	item->Clip = FlattenPath(item->PoLine, item->Segments);
+	item->Clip = flattenPath(item->PoLine, item->Segments);
 	m_Doc->adjustItemSize(item, true);
 	item->OldB2 = item->width();
 	item->OldH2 = item->height();

Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp	Fri Jun 21 12:08:51 2019
@@ -743,7 +743,7 @@
 	ite->FrameType = 3;
 	if (!e.hasAttribute("draw:transform"))
 	{
-		ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+		ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 		m_Doc->adjustItemSize(ite);
 	}
 	ite = finishNodeParsing(e, ite, style);
@@ -769,7 +769,7 @@
 	ite->FrameType = 3;
 	if (!e.hasAttribute("draw:transform"))
 	{
-		ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+		ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 		m_Doc->adjustItemSize(ite);
 	}
 	ite = finishNodeParsing(e, ite, style);
@@ -795,7 +795,7 @@
 	ite->FrameType = 3;
 	if (!e.hasAttribute("draw:transform"))
 	{
-		ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+		ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 		m_Doc->adjustItemSize(ite);
 	}
 	ite = finishNodeParsing(e, ite, style);
@@ -847,7 +847,7 @@
 		ite->FrameType = 3;
 		if (!e.hasAttribute("draw:transform"))
 		{
-			ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+			ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 			m_Doc->adjustItemSize(ite);
 		}
 		ite = finishNodeParsing(e, ite, style);
@@ -1144,7 +1144,7 @@
 		item->FrameType = 3;
 		FPoint wh = getMaxClipF(&item->PoLine);
 		item->setWidthHeight(wh.x(), wh.y());
-		item->Clip = FlattenPath(item->PoLine, item->Segments);
+		item->Clip = flattenPath(item->PoLine, item->Segments);
 		m_Doc->adjustItemSize(item);
 	}
 	item->OwnPage = m_Doc->OnPage(item);

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	Fri Jun 21 12:08:51 2019
@@ -374,7 +374,7 @@
 	ite->ClipEdited = true;
 	ite->FrameType = 3;
 	ite->setFillEvenOdd(false);
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	ite->ContourLine = ite->PoLine.copy();
 	ite->setTextFlowMode(PageItem::TextFlowDisabled);
 	m_Elements->append(ite);
@@ -529,7 +529,7 @@
 		ite->ClipEdited = true;
 		ite->FrameType = 3;
 		ite->setFillEvenOdd(false);
-		ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+		ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 		ite->ContourLine = ite->PoLine.copy();
 		ite->setTextFlowMode(PageItem::TextFlowDisabled);
 		m_Elements->append(ite);
@@ -689,7 +689,7 @@
 			ite->ClipEdited = true;
 			ite->FrameType = 3;
 			ite->setFillEvenOdd(false);
-			ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+			ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 			ite->ContourLine = ite->PoLine.copy();
 			ite->setTextFlowMode(PageItem::TextFlowDisabled);
 			m_Elements->append(ite);
@@ -2439,7 +2439,7 @@
 	ite->ClipEdited = true;
 	ite->FrameType = 3;
 	m_doc->setRedrawBounding(ite);
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	ite->setTextFlowMode(PageItem::TextFlowDisabled);
 	ite->setFillShade(100);
 	ite->setLineShade(100);
@@ -2577,7 +2577,7 @@
 	ite->ClipEdited = true;
 	ite->FrameType = 3;
 	m_doc->setRedrawBounding(ite);
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	ite->setTextFlowMode(PageItem::TextFlowDisabled);
 	ite->setFillShade(100);
 	ite->setLineShade(100);
@@ -2726,7 +2726,7 @@
 	ite->ClipEdited = true;
 	ite->FrameType = 3;
 	m_doc->setRedrawBounding(ite);
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	ite->setTextFlowMode(PageItem::TextFlowDisabled);
 	ite->setFillShade(100);
 	ite->setLineShade(100);
@@ -2874,7 +2874,7 @@
 	ite->ClipEdited = true;
 	ite->FrameType = 3;
 	m_doc->setRedrawBounding(ite);
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	ite->setTextFlowMode(PageItem::TextFlowDisabled);
 	ite->setFillShade(100);
 	ite->setLineShade(100);

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp	Fri Jun 21 12:08:51 2019
@@ -623,7 +623,7 @@
 				ite->ClipEdited = true;
 				ite->OldB2 = ite->width();
 				ite->OldH2 = ite->height();
-				ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+				ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 				ite->updateGradientVectors();
 			}
 			Elements->append(ite);
@@ -2348,7 +2348,7 @@
 				ite->ClipEdited = true;
 				ite->OldB2 = ite->width();
 				ite->OldH2 = ite->height();
-				ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+				ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 				ite->updateGradientVectors();
 			}
 			Elements->append(ite);

Modified: trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/shape/importshape.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/shape/importshape.cpp	Fri Jun 21 12:08:51 2019
@@ -628,7 +628,7 @@
 				neu->setXYPos(gx, gy, true);
 				neu->setWidthHeight(gw, gh, true);
 				neu->SetRectFrame();
-				neu->Clip = FlattenPath(neu->PoLine, neu->Segments);
+				neu->Clip = flattenPath(neu->PoLine, neu->Segments);
 				neu->setItemName( tr("Group%1").arg(m_Doc->GroupCounter));
 				neu->AutoName = false;
 				neu->gXpos = neu->xPos() - gx;

Modified: trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp	Fri Jun 21 12:08:51 2019
@@ -655,7 +655,7 @@
 //			if (item->asPolyLine())
 //				item->setPolyClip(qRound(qMax(item->lineWidth() / 2.0, 1)));
 //			else
-//				item->Clip = FlattenPath(item->PoLine, item->Segments);
+//				item->Clip = flattenPath(item->PoLine, item->Segments);
 			FPoint wx = getMinClipF(&item->PoLine);
 			inGroupXOrigin = qMin(inGroupXOrigin, wx.x());
 			inGroupYOrigin = qMin(inGroupYOrigin, wx.y());
@@ -1318,7 +1318,7 @@
 					neu->PoLine.map(mm);
 					neu->PoLine.translate(-gx + baseX, -gy + baseY);
 					clipPath.resize(0);
-					neu->Clip = FlattenPath(neu->PoLine, neu->Segments);
+					neu->Clip = flattenPath(neu->PoLine, neu->Segments);
 				}
 				else
 					neu->SetRectFrame();
@@ -1615,7 +1615,7 @@
 		ite->PoLine = clipPath.copy();
 	clipPath.resize(0);
 	ite->PoLine.map(QTransform(1.0, 0.0, 0.0, 1.0, x, y));
-	ite->Clip = FlattenPath(ite->PoLine, ite->Segments);
+	ite->Clip = flattenPath(ite->PoLine, ite->Segments);
 	finishNode(e, ite);
 	IElements.append(ite);
 	delete (m_gc.pop());

Modified: trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/svm/importsvm.cpp	Fri Jun 21 12:08:51 2019
@@ -1528,7 +1528,7 @@
 				iteG->ClipEdited = true;
 				iteG->OldB2 = ite->width();
 				iteG->OldH2 = ite->height();
-				iteG->Clip = FlattenPath(iteG->PoLine, iteG->Segments);
+				iteG->Clip = flattenPath(iteG->PoLine, iteG->Segments);
 				iteG->updateGradientVectors();
 				ite = iteG;
 				tmpSel->clear();

Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&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 Jun 21 12:08:51 2019
@@ -1690,7 +1690,7 @@
 	if (flags & 1)
 		path.addEllipse(QPointF(0,0), w, h);
 	else
-		path = RegularPolygonPath(w * 2, h * 2, numSides, flags & 2, r1, -90 + (360.0 / double(numSides)) / 2.0, 0);
+		path = regularPolygonPath(w * 2, h * 2, numSides, flags & 2, r1, -90 + (360.0 / double(numSides)) / 2.0, 0);
 	Coords.fromQPainterPath(path);
 	if (!(flags & 1))
 		Coords.translate(-w, -h);
@@ -2982,7 +2982,7 @@
 	if (ellipse)
 		path.addEllipse(QPointF(majorAxis, minorAxis), majorAxis, minorAxis);
 	else
-		path = RegularPolygonPath(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/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Fri Jun 21 12:08:51 2019
@@ -6481,7 +6481,7 @@
 				newItem->PoLine.addPoint(newItem->PoLine.point(0));
 				newItem->PoLine.addPoint(newItem->PoLine.point(0));
 			}
-			newItem->Clip = FlattenPath(newItem->PoLine, newItem->Segments);
+			newItem->Clip = flattenPath(newItem->PoLine, newItem->Segments);
 			newItem->ContourLine = newItem->PoLine.copy();
 			break;
 		case PageItem::PolyLine:
@@ -9710,7 +9710,7 @@
 	if (currItem->asPathText())
 		currItem->updatePolyClip();
 	else
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	setRedrawBounding(currItem);
 	currItem->update();
 	if (UndoManager::undoEnabled())
@@ -9753,7 +9753,7 @@
 	if (currItem->asPathText())
 		currItem->updatePolyClip();
 	else
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	setRedrawBounding(currItem);
 	currItem->update();
 	if (UndoManager::undoEnabled())
@@ -14516,7 +14516,7 @@
 	else if (currItem->asPathText())
 		currItem->updatePolyClip();
 	else
-		currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	currItem->updateGradientVectors();
 	currItem->Sizing = siz;
 	// Added by r17735: why? this break resizing of multiple item selections
@@ -15366,7 +15366,7 @@
 	if (item->asPathText())
 		item->updatePolyClip();
 	else
-		item->Clip = FlattenPath(item->PoLine, item->Segments);
+		item->Clip = flattenPath(item->PoLine, item->Segments);
 	setRedrawBounding(item);
 }
 

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Fri Jun 21 12:08:51 2019
@@ -3189,7 +3189,7 @@
 				newItem->FrameType = 3;
 				newItem->OldB2 = newItem->width();
 				newItem->OldH2 = newItem->height();
-				newItem->Clip = FlattenPath(newItem->PoLine, newItem->Segments);
+				newItem->Clip = flattenPath(newItem->PoLine, newItem->Segments);
 				newItem->ContourLine = newItem->PoLine.copy();
 				newGroupedItems.prepend(newItem);
 			}

Modified: trunk/Scribus/scribus/ui/polygonwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/ui/polygonwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/polygonwidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/polygonwidget.cpp	Fri Jun 21 12:08:51 2019
@@ -215,7 +215,7 @@
 	p.begin(&pm);
 	p.setBrush(Qt::NoBrush);
 	p.setPen(Qt::black);
-	QPainterPath pp = RegularPolygonPath(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness, innerRotationSpinBox->value(), innerround);
+	QPainterPath pp = regularPolygonPath(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness, innerRotationSpinBox->value(), innerround);
 	QRectF br = pp.boundingRect();
 	if (br.x() < 0)
 	{

Modified: trunk/Scribus/scribus/ui/spiralwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/ui/spiralwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/spiralwidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/spiralwidget.cpp	Fri Jun 21 12:08:51 2019
@@ -73,7 +73,7 @@
 	p.begin(&pm);
 	p.setBrush(Qt::NoBrush);
 	p.setPen(Qt::black);
-	QPainterPath path = SpiralPath(pm.width() - 6, pm.height() - 6, startAngle->value(), endAngle->value(), (static_cast<int>(arcFactor->value()) + 100) / 100.0);
+	QPainterPath path = spiralPath(pm.width() - 6, pm.height() - 6, startAngle->value(), endAngle->value(), (static_cast<int>(arcFactor->value()) + 100) / 100.0);
 	path.translate(3, 3);
 	p.strokePath(path, p.pen());
 	p.end();

Modified: trunk/Scribus/scribus/util_math.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/util_math.cpp
==============================================================================
--- trunk/Scribus/scribus/util_math.cpp	(original)
+++ trunk/Scribus/scribus/util_math.cpp	Fri Jun 21 12:08:51 2019
@@ -65,7 +65,7 @@
 	return ret;
 }
 
-QPainterPath RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2, double innerRot, double factor3)
+QPainterPath regularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2, double innerRot, double factor3)
 {
 	uint cx = star ? c * 2 : c;
 	double seg = 360.0 / cx;
@@ -161,7 +161,7 @@
 	return pts;
 }
 
-QPainterPath SpiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor)
+QPainterPath spiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor)
 {
 	if (spiralStartAngle >= spiralEndAngle)
 		return QPainterPath();
@@ -393,7 +393,7 @@
 	return partIn ? (ry > prect->bottom()) : false;
 }
 
-QPolygon FlattenPath(const FPointArray& ina, QList<uint> &Segs)
+QPolygon flattenPath(const FPointArray& ina, QList<uint> &Segs)
 {
 	QPolygon cli, outa;
 	Segs.clear();

Modified: trunk/Scribus/scribus/util_math.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23040&path=/trunk/Scribus/scribus/util_math.h
==============================================================================
--- trunk/Scribus/scribus/util_math.h	(original)
+++ trunk/Scribus/scribus/util_math.h	Fri Jun 21 12:08:51 2019
@@ -34,10 +34,10 @@
 FPoint   SCRIBUS_API getMinClipF(const FPointArray* clip);
 FPoint   SCRIBUS_API projectPointOnLine(FPoint p, QPointF lineStart, QPointF lineEnd);
 bool     SCRIBUS_API regionContainsRect(const QRegion& shape, QRect rect);
-QPolygon SCRIBUS_API FlattenPath(const FPointArray& ina, QList<uint> &Segs);
+QPolygon SCRIBUS_API flattenPath(const FPointArray& ina, QList<uint> &Segs);
 QList<QPainterPath> SCRIBUS_API decomposePath(QPainterPath &path);
-QPainterPath  SCRIBUS_API RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0, double innerRot = 0.0, double factor3 = 0.0);
-QPainterPath  SCRIBUS_API SpiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor);
+QPainterPath  SCRIBUS_API regularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0, double innerRot = 0.0, double factor3 = 0.0);
+QPainterPath  SCRIBUS_API spiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor);
 inline double SCRIBUS_API xy2Deg(double x, double y);
 inline double SCRIBUS_API sind(double);
 inline double SCRIBUS_API cosd(double);




More information about the scribus-commit mailing list