r19096 by jghali - #12045, flipped Frames don't resize/behave as expected : simple frames now behave as expected, still issues to fix on flipped item inside groups

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 27 17:18:42 UTC 2014


Author: jghali
Date: Sun Apr 27 17:18:42 2014
New Revision: 19096

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19096
Log:
#12045, flipped Frames don't resize/behave as expected : simple frames now behave as expected, still issues to fix on flipped item inside groups

Modified:
    trunk/Scribus/scribus/canvasgesture_resize.cpp
    trunk/Scribus/scribus/pageitem_arc.cpp
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19096&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp (original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp Sun Apr 27 17:18:42 2014
@@ -74,17 +74,17 @@
 		m.scale(m_scaleX, m_scaleY);
 		m_bounds = m.mapRect(m_bounds);
 		m_bounds.moveTopLeft(itPos);
-		if (currItem->imageFlippedH())
+		/*if (currItem->imageFlippedH())
 		{
 			m_rotation = -getRotationDFromMatrix(mm) - 180.0;
 			m_bounds.translate(-currItem->visualWidth() * m_scaleX, 0);
 		}
-		else
+		else*/
 			m_rotation = -getRotationDFromMatrix(mm);
-		if (currItem->imageFlippedV())
+		/*if (currItem->imageFlippedV())
 		{
 			m_bounds.translate(0, -currItem->visualHeight() * m_scaleY);
-		}
+		}*/
 		currItem->OldB2 = currItem->width();
 		currItem->OldH2 = currItem->height();
 		m_extraWidth = currItem->visualWidth() - currItem->width();
@@ -377,10 +377,10 @@
 		getScaleFromMatrix(mm, m_scaleX, m_scaleY);
 		double dx = (itPos.x() - newBounds.x()) / m_scaleX;
 		double dy = (itPos.y() - newBounds.y()) / m_scaleY;
-		if (currItem->imageFlippedH())
+		/*if (currItem->imageFlippedH())
 			dx *= -1;
 		if (currItem->imageFlippedV())
-			dy *= -1;
+			dy *= -1;*/
 		currItem->moveBy(-dx, -dy, true);
 		currItem->setWidth(newBounds.width() / m_scaleX - m_extraWidth);
 		currItem->setHeight(newBounds.height() / m_scaleY - m_extraHeight);
@@ -424,17 +424,18 @@
 				break;
 		}
 
-		if (currItem->imageFlippedH())
+		/*if (currItem->imageFlippedH())
 			currItem->moveBy(-currItem->width(), 0);
 		if (currItem->imageFlippedV())
-			currItem->moveBy(0, -currItem->height());
+			currItem->moveBy(0, -currItem->height());*/
 		currItem->updateClip();
 		if (currItem->isArc())
 		{
 			PageItem_Arc* item = currItem->asArc();
-			item->arcWidth += dw * dscw;
+			item->arcWidth  += dw * dscw;
 			item->arcHeight += dh * dsch;
 			item->recalcPath();
+			m_doc->AdjustItemSize(item);
 		}
 		if (currItem->isSpiral())
 		{
@@ -710,7 +711,7 @@
 	else
 	{
 		m_handle = m_canvas->frameHitTest(QPointF(point.x(), point.y()), m_doc->m_Selection->itemAt(0));
-		PageItem* currItem = m_doc->m_Selection->itemAt(0);
+		/*PageItem* currItem = m_doc->m_Selection->itemAt(0);
 		if (currItem->imageFlippedH())
 		{
 			switch (m_handle)
@@ -762,7 +763,7 @@
 				default:
 					break;
 			}
-		}
+		}*/
 	}
 	if (m_handle > 0)
 	{

Modified: trunk/Scribus/scribus/pageitem_arc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19096&path=/trunk/Scribus/scribus/pageitem_arc.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_arc.cpp (original)
+++ trunk/Scribus/scribus/pageitem_arc.cpp Sun Apr 27 17:18:42 2014
@@ -72,6 +72,8 @@
 	path.arcTo(0.0, 0.0, arcWidth, arcHeight, arcStartAngle, arcSweepAngle);
 	path.closeSubpath();
 	PoLine.fromQPainterPath(path);
+	FPoint tp(getMinClipF(&PoLine));
+	PoLine.translate(-tp.x(), -tp.y());
 	Clip = FlattenPath(PoLine, Segments);
 }
 

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19096&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun Apr 27 17:18:42 2014
@@ -11212,8 +11212,6 @@
 				else if (ar->arcStartAngle > 360)
 					ar->arcStartAngle -= 360;
 				ar->recalcPath();
-				FPoint tp2(getMinClipF(&currItem->PoLine));
-				currItem->PoLine.translate(-tp2.x(), -tp2.y());
 				AdjustItemSize(currItem);
 				emit updateEditItem();
 			}
@@ -11258,8 +11256,6 @@
 			else if (ar->arcStartAngle > 360)
 				ar->arcStartAngle -= 360;
 			ar->recalcPath();
-			FPoint tp2(getMinClipF(&currItem->PoLine));
-			currItem->PoLine.translate(-tp2.x(), -tp2.y());
 			AdjustItemSize(currItem);
 			emit updateEditItem();
 		}
@@ -11329,8 +11325,6 @@
 				else if (ar->arcStartAngle > 360)
 					ar->arcStartAngle -= 360;
 				ar->recalcPath();
-				FPoint tp2(getMinClipF(&currItem->PoLine));
-				currItem->PoLine.translate(-tp2.x(), -tp2.y());
 				AdjustItemSize(currItem);
 				emit updateEditItem();
 			}
@@ -11378,8 +11372,6 @@
 			else if (ar->arcStartAngle > 360)
 				ar->arcStartAngle -= 360;
 			ar->recalcPath();
-			FPoint tp2(getMinClipF(&currItem->PoLine));
-			currItem->PoLine.translate(-tp2.x(), -tp2.y());
 			AdjustItemSize(currItem);
 			emit updateEditItem();
 		}
@@ -14952,8 +14944,6 @@
 				item->arcWidth += dw * dscw;
 				item->arcHeight += dh * dsch;
 				item->recalcPath();
-				FPoint tp2(getMinClipF(&bb->PoLine));
-				bb->PoLine.translate(-tp2.x(), -tp2.y());
 			}
 			if (bb->isSpiral())
 			{




More information about the scribus-commit mailing list