r16287 by fschmid - Reenabled horizontal and vertical flipping of arc items.

scribus-commit scribus-commit at lists.scribus.net
Thu Jan 20 23:11:10 CET 2011


Author: fschmid
Date: Thu Jan 20 22:11:10 2011
New Revision: 16287

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16287
Log:
Reenabled horizontal and vertical flipping of arc items.

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16287&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Jan 20 22:11:10 2011
@@ -8299,6 +8299,19 @@
 			}
 			currItem->GrStartX = currItem->width() - currItem->GrStartX;
 			currItem->GrEndX = currItem->width() - currItem->GrEndX;
+			if (currItem->isArc())
+			{
+				PageItem_Arc *ar = currItem->asArc();
+				ar->arcStartAngle = (180 - ar->arcStartAngle) - ar->arcSweepAngle;
+				if (ar->arcStartAngle < 0)
+					ar->arcStartAngle += 360;
+				else if (ar->arcStartAngle > 360)
+					ar->arcStartAngle -= 360;
+				ar->recalcPath();
+				FPoint tp2(getMinClipF(&currItem->PoLine));
+				currItem->PoLine.translate(-tp2.x(), -tp2.y());
+				AdjustItemSize(currItem);
+			}
 		}
 	}
 	regionsChanged()->update(QRectF());
@@ -8364,6 +8377,20 @@
 			}
 			currItem->GrStartY = currItem->height() - currItem->GrStartY;
 			currItem->GrEndY = currItem->height() - currItem->GrEndY;
+			if (currItem->isArc())
+			{
+				PageItem_Arc *ar = currItem->asArc();
+				ar->arcStartAngle *= -1;
+				ar->arcStartAngle -= ar->arcSweepAngle;
+				if (ar->arcStartAngle < 0)
+					ar->arcStartAngle += 360;
+				else if (ar->arcStartAngle > 360)
+					ar->arcStartAngle -= 360;
+				ar->recalcPath();
+				FPoint tp2(getMinClipF(&currItem->PoLine));
+				currItem->PoLine.translate(-tp2.x(), -tp2.y());
+				AdjustItemSize(currItem);
+			}
 		}
 		regionsChanged()->update(QRectF());
 	}

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16287&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Thu Jan 20 22:11:10 2011
@@ -1768,8 +1768,8 @@
 		FlipH->setCheckable(false);
 		FlipV->setCheckable(false);
 	}
-	FlipH->setDisabled(i->isRegularPolygon() || i->isArc());
-	FlipV->setDisabled(i->isRegularPolygon() || i->isArc());
+	FlipH->setDisabled(i->isRegularPolygon());
+	FlipV->setDisabled(i->isRegularPolygon());
 	setFlippedH(i->imageFlippedH());
 	setFlippedV(i->imageFlippedV());
 	RoVal = i->rotation();
@@ -2144,8 +2144,8 @@
 		//CB Why cant we do this for lines?
 //		FlipH->setEnabled((nr!=-1) && (nr!=5));
 //		FlipV->setEnabled((nr!=-1) && (nr!=5));
-		FlipH->setEnabled(nr!=-1 && nr!=13 && nr!=14);
-		FlipV->setEnabled(nr!=-1 && nr!=13 && nr!=14);
+		FlipH->setEnabled(nr!=-1 && nr!=13);
+		FlipV->setEnabled(nr!=-1 && nr!=13);
 		switch (nr)
 		{
 		case -1:
@@ -2287,7 +2287,8 @@
 	{
 		for (uint i = 0; i < selectedItemCount; ++i)
 		{
-			if (doc->m_Selection->itemAt(i)->isArc() || doc->m_Selection->itemAt(i)->isRegularPolygon())
+		//	if (doc->m_Selection->itemAt(i)->isArc() || doc->m_Selection->itemAt(i)->isRegularPolygon())
+			if (doc->m_Selection->itemAt(i)->isRegularPolygon())
 				found = true;
 			break;
 		}




More information about the scribus-commit mailing list