r16312 by fschmid - Edit spiral mode: added the ability to drag the start and end points of the spiral with the mouse.
scribus-commit
scribus-commit at lists.scribus.net
Fri Jan 28 13:38:39 CET 2011
Author: fschmid
Date: Fri Jan 28 12:38:38 2011
New Revision: 16312
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16312
Log:
Edit spiral mode: added the ability to drag the start and end points of the spiral with the mouse.
Modified:
trunk/Scribus/scribus/canvasgesture_resize.cpp
trunk/Scribus/scribus/canvasmode_editspiral.cpp
trunk/Scribus/scribus/canvasmode_editspiral.h
trunk/Scribus/scribus/pageitem_spiral.cpp
trunk/Scribus/scribus/pageitem_spiral.h
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp (original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp Fri Jan 28 12:38:38 2011
@@ -210,14 +210,6 @@
dsch = item->arcHeight / currItem->height();
if (currItem->width() != 0.0)
dscw = item->arcWidth / currItem->width();
- }
- if (currItem->isSpiral())
- {
- PageItem_Spiral* item = currItem->asSpiral();
- if (currItem->height() != 0.0)
- dsch = item->spiralHeight / currItem->height();
- if (currItem->width() != 0.0)
- dscw = item->spiralWidth / currItem->width();
}
if (m_doc->m_Selection->isMultipleSelection())
{
@@ -330,8 +322,6 @@
if (currItem->isSpiral())
{
PageItem_Spiral* item = currItem->asSpiral();
- item->spiralWidth += dw * dscw;
- item->spiralHeight += dh * dsch;
item->recalcPath();
}
// rotation does not change
Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp Fri Jan 28 12:38:38 2011
@@ -100,21 +100,6 @@
psx->rotate(currItem->rotation());
psx->setPen(p1b);
psx->setBrush(Qt::NoBrush);
-/* QPainterPath pp;
- PageItem_Spiral* item = currItem->asSpiral();
- QPointF mPoint = item->PoLine.pointQF(0);
- double nWidth = mPoint.x() - widthPoint.x();
- double nHeight = mPoint.y() - heightPoint.y();
- double nSweep = endAngle - startAngle;
- if (nSweep < 0)
- nSweep += 360;
- pp.moveTo(mPoint);
- pp.arcTo(QRectF(mPoint.x() - nWidth, mPoint.y() - nHeight, nWidth * 2, nHeight * 2), startAngle, nSweep);
- pp.closeSubpath();
- psx->drawPath(pp);
- psx->setPen(p1bd);
- psx->drawLine(mPoint, widthPoint);
- psx->drawLine(mPoint, heightPoint); */
psx->setPen(p8b);
if (m_arcPoint == useControlStart)
psx->setPen(p8r);
@@ -126,16 +111,6 @@
else
psx->setPen(p8b);
psx->drawPoint(endPoint);
-/* if (m_arcPoint == useControlWidth)
- psx->setPen(p8r);
- else
- psx->setPen(p8b);
- psx->drawPoint(widthPoint);
- if (m_arcPoint == useControlHeight)
- psx->setPen(p8r);
- else
- psx->setPen(p8b);
- psx->drawPoint(heightPoint); */
}
void CanvasMode_EditSpiral::enterEvent(QEvent *)
@@ -169,13 +144,9 @@
// centerPoint = currItem->PoLine.pointQF(0);
startPoint = currItem->PoLine.pointQF(0);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
-// widthPoint = QPointF(centerPoint.x() - item->arcWidth / 2.0, centerPoint.y());
-// heightPoint = QPointF(centerPoint.x(), centerPoint.y() - item->arcHeight / 2.0);
startAngle = item->spiralStartAngle;
endAngle = item->spiralEndAngle;
-// QLineF res = QLineF(centerPoint, startPoint);
-// QLineF swe = QLineF(centerPoint, endPoint);
- VectorDialog->setValues(startAngle, endAngle, item->spiralHeight, item->spiralWidth, item->spiralFactor);
+ VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
VectorDialog->show();
setModeCursor();
if (fromGesture)
@@ -196,13 +167,9 @@
centerPoint = currItem->PoLine.pointQF(0);
startPoint = currItem->PoLine.pointQF(0);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
-// widthPoint = QPointF(centerPoint.x() - item->arcWidth / 2.0, centerPoint.y());
-// heightPoint = QPointF(centerPoint.x(), centerPoint.y() - item->arcHeight / 2.0);
startAngle = item->spiralStartAngle;
- endAngle = startAngle + item->spiralEndAngle;
-// QLineF res = QLineF(centerPoint, startPoint);
-// QLineF swe = QLineF(centerPoint, endPoint);
- VectorDialog->setValues(startAngle, endAngle, item->spiralHeight, item->spiralWidth, item->spiralFactor);
+ endAngle = item->spiralEndAngle;
+ VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
m_view->update();
}
@@ -215,6 +182,41 @@
void CanvasMode_EditSpiral::endEditing()
{
m_view->requestMode(modeNormal);
+}
+
+QPointF CanvasMode_EditSpiral::getSegment(double angle)
+{
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
+ PageItem_Spiral *item = currItem->asSpiral();
+ double ww = item->width();
+ double wws = 0.0;
+ double wwn = ww;
+ double hh = item->height() - (item->height() / (item->spiralFactor + 1.0));
+ double segStart = 0.0;
+ double segEnd = 180;
+ bool segPart = true;
+ QPointF ret = QPointF(item->width() / 2.0, item->height() / 2.0);
+ if (angle < 0)
+ return ret;
+ while (true)
+ {
+ QLineF lin = QLineF(QPointF(wws, hh), QPointF(wwn, hh));
+ if ((angle <= segEnd) && (angle >= segStart))
+ {
+ ret = lin.pointAt(0.5);
+ break;
+ }
+ ww /= item->spiralFactor;
+ wws = wwn;
+ if (segPart)
+ wwn -= ww;
+ else
+ wwn += ww;
+ segPart = !segPart;
+ segStart += 180.0;
+ segEnd += 180.0;
+ }
+ return ret;
}
void CanvasMode_EditSpiral::applyValues(double start, double end, double height, double width, double factor)
@@ -226,8 +228,6 @@
// QRectF upRect2 = QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight);
// upRect = upRect2.united(upRect);
upRect.translate(currItem->xPos(), currItem->yPos());
- item->spiralWidth = width;
- item->spiralHeight = height;
item->spiralStartAngle = start;
item->spiralEndAngle = end;
item->spiralFactor = factor;
@@ -254,6 +254,8 @@
// item->arcSweepAngle = endAngle - startAngle;
startPoint = currItem->PoLine.pointQF(0);
endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
+ startAngle = item->spiralStartAngle;
+ endAngle = item->spiralEndAngle;
// centerPoint = currItem->PoLine.pointQF(0);
// widthPoint = QPointF(centerPoint.x() - item->arcWidth / 2.0, centerPoint.y());
// heightPoint = QPointF(centerPoint.x(), centerPoint.y() - item->arcHeight / 2.0);
@@ -286,57 +288,54 @@
m->accept();
double newX = mousePointDoc.x();
double newY = mousePointDoc.y();
-/* if (m_canvas->m_viewMode.m_MouseButtonPressed && m_view->moveTimerElapsed())
+ if (m_canvas->m_viewMode.m_MouseButtonPressed && m_view->moveTimerElapsed() && (m_arcPoint != noPointDefined))
{
PageItem *currItem = m_doc->m_Selection->itemAt(0);
+ PageItem_Spiral *item = currItem->asSpiral();
QTransform itemMatrix;
itemMatrix.translate(currItem->xPos(), currItem->yPos());
itemMatrix.rotate(currItem->rotation());
- QPointF sPoint = currItem->PoLine.pointQF(0);
+ QPointF sPoint;
+ if (m_arcPoint == useControlStart)
+ sPoint = getSegment(startAngle);
+ else if (m_arcPoint == useControlEnd)
+ sPoint = getSegment(endAngle);
QPointF smPoint = itemMatrix.map(sPoint);
QLineF stLinA = QLineF(smPoint, QPointF(Mxp, Myp));
QLineF stLinM = QLineF(smPoint, QPointF(newX, newY));
double deltaAngle = stLinM.angle() - stLinA.angle();
- QPainterPath pp;
- if (m_arcPoint == useControlStart)
- startAngle += deltaAngle;
- else if (m_arcPoint == useControlSweep)
- endAngle += deltaAngle;
- else if (m_arcPoint == useControlHeight)
- heightPoint = QPointF(heightPoint.x(), heightPoint.y() + (newY - Myp));
- else if (m_arcPoint == useControlWidth)
- widthPoint = QPointF(widthPoint.x() + (newX - Mxp), widthPoint.y());
- double nSweep = endAngle - startAngle;
- if (nSweep < 0)
- nSweep += 360;
- double nWidth = sPoint.x() - widthPoint.x();
- double nHeight = sPoint.y() - heightPoint.y();
- pp.moveTo(sPoint);
- pp.arcTo(QRectF(sPoint.x() - nWidth, sPoint.y() - nHeight, nWidth * 2, nHeight * 2), startAngle, nSweep);
- pp.closeSubpath();
- FPointArray ar;
- ar.fromQPainterPath(pp);
+ if (deltaAngle < -180)
+ deltaAngle = deltaAngle + 360;
+ else if (deltaAngle > 180)
+ deltaAngle = deltaAngle - 360;
if (m_arcPoint == useControlStart)
{
- startPoint = ar.pointQF(2);
- QLineF stLinA = QLineF(smPoint, itemMatrix.map(startPoint));
- m_canvas->displayRotHUD(m->globalPos(), 360.0 - stLinA.angle());
+ if (startAngle + deltaAngle >= 0)
+ {
+ startAngle += deltaAngle;
+ item->spiralStartAngle = startAngle;
+ item->recalcPath();
+ startPoint = currItem->PoLine.pointQF(0);
+ }
+ VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
}
- else if (m_arcPoint == useControlSweep)
+ else if (m_arcPoint == useControlEnd)
{
- endPoint = ar.pointQF(ar.size() - 4);
- QLineF stLinA = QLineF(smPoint, itemMatrix.map(endPoint));
- m_canvas->displayRotHUD(m->globalPos(), 360.0 - stLinA.angle());
+ if (endAngle + deltaAngle > startAngle)
+ {
+ endAngle += deltaAngle;
+ item->spiralEndAngle = endAngle;
+ item->recalcPath();
+ endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
+ }
+ VectorDialog->setValues(startAngle, endAngle, item->height(), item->width(), item->spiralFactor);
}
- QLineF res = QLineF(centerPoint, startPoint);
- QLineF swe = QLineF(centerPoint, endPoint);
- VectorDialog->setValues(res.angle(), swe.angle(), nHeight * 2, nWidth * 2);
currItem->update();
QRectF upRect;
upRect = QRectF(QPointF(0, 0), QPointF(currItem->width(), currItem->height())).normalized();
upRect.translate(currItem->xPos(), currItem->yPos());
m_doc->regionsChanged()->update(upRect.adjusted(-10.0 - currItem->width() / 2.0, -10.0 - currItem->height() / 2.0, 10.0 + currItem->width() / 2.0, 10.0 + currItem->height() / 2.0));
- } */
+ }
Mxp = newX;
Myp = newY;
}
@@ -355,34 +354,26 @@
m_view->registerMousePress(m->globalPos());
Mxp = mousePointDoc.x(); //m->x();
Myp = mousePointDoc.y(); //m->y();
-/* if (m->button() == Qt::MidButton)
+ if (m->button() == Qt::MidButton)
{
m_view->MidButt = true;
if (m->modifiers() & Qt::ControlModifier)
m_view->DrawNew();
return;
}
- QTransform itemMatrix; */
- PageItem *currItem = m_doc->m_Selection->itemAt(0);
-/* itemMatrix.translate(currItem->xPos(), currItem->yPos());
+ QTransform itemMatrix;
+ PageItem *currItem = m_doc->m_Selection->itemAt(0);
+ itemMatrix.translate(currItem->xPos(), currItem->yPos());
itemMatrix.rotate(currItem->rotation());
QPointF stPoint = startPoint;
stPoint = itemMatrix.map(stPoint);
QPointF swPoint = endPoint;
swPoint = itemMatrix.map(swPoint);
- QPointF shPoint = heightPoint;
- shPoint = itemMatrix.map(shPoint);
- QPointF sPoint = widthPoint;
- sPoint = itemMatrix.map(sPoint);
if (m_canvas->hitsCanvasPoint(m->globalPos(), stPoint))
m_arcPoint = useControlStart;
else if (m_canvas->hitsCanvasPoint(m->globalPos(), swPoint))
- m_arcPoint = useControlSweep;
- else if (m_canvas->hitsCanvasPoint(m->globalPos(), shPoint))
- m_arcPoint = useControlHeight;
- else if (m_canvas->hitsCanvasPoint(m->globalPos(), sPoint))
- m_arcPoint = useControlWidth;
- else */
+ m_arcPoint = useControlEnd;
+ else
m_arcPoint = noPointDefined;
m_canvas->m_viewMode.m_MouseButtonPressed = true;
qApp->changeOverrideCursor(QCursor(Qt::CrossCursor));
@@ -399,36 +390,6 @@
m_canvas->resetRenderMode();
m->accept();
PageItem *currItem = m_doc->m_Selection->itemAt(0);
-/* PageItem_Arc* item = currItem->asArc();
- QPointF mPoint = item->PoLine.pointQF(0); */
QRectF upRect = QRectF(QPointF(0, 0), QPointF(currItem->width(), currItem->height())).normalized();
-/* QRectF upRect2 = QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight);
- upRect = upRect2.united(upRect);
- upRect.translate(currItem->xPos(), currItem->yPos());
- if ((m_arcPoint == useControlStart) || (m_arcPoint == useControlSweep) || (m_arcPoint == useControlHeight) || (m_arcPoint == useControlWidth))
- {
- double nWidth = mPoint.x() - widthPoint.x();
- double nHeight = mPoint.y() - heightPoint.y();
- item->arcWidth = nWidth * 2.0;
- item->arcHeight = nHeight * 2.0;
- double nSweep = endAngle - startAngle;
- if (nSweep < 0)
- nSweep += 360;
- QPainterPath pp;
- pp.moveTo(mPoint);
- pp.arcTo(QRectF(mPoint.x() - item->arcWidth / 2.0, mPoint.y() - item->arcHeight / 2.0, item->arcWidth, item->arcHeight), startAngle, nSweep);
- pp.closeSubpath();
- currItem->PoLine.fromQPainterPath(pp);
- m_doc->AdjustItemSize(currItem);
- item->arcStartAngle = startAngle;
- item->arcSweepAngle = endAngle - startAngle;
- startPoint = currItem->PoLine.pointQF(2);
- endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 4);
- centerPoint = currItem->PoLine.pointQF(0);
- widthPoint = QPointF(centerPoint.x() - item->arcWidth / 2.0, centerPoint.y());
- heightPoint = QPointF(centerPoint.x(), centerPoint.y() - item->arcHeight / 2.0);
- startAngle = item->arcStartAngle;
- endAngle = startAngle + item->arcSweepAngle;
- } */
m_doc->regionsChanged()->update(upRect.adjusted(-10.0 - currItem->width() / 2.0, -10.0 - currItem->height() / 2.0, 10.0 + currItem->width() / 2.0, 10.0 + currItem->height() / 2.0));
}
Modified: trunk/Scribus/scribus/canvasmode_editspiral.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/canvasmode_editspiral.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.h (original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.h Fri Jan 28 12:38:38 2011
@@ -62,11 +62,10 @@
noPointDefined,
useControlStart,
useControlEnd,
- useControlHeight,
- useControlWidth
} eSpiralPoint;
inline bool GetItem(PageItem** pi);
+ QPointF getSegment(double angle);
double Mxp, Myp;
ScribusMainWindow* m_ScMW;
Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp (original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp Fri Jan 28 12:38:38 2011
@@ -51,8 +51,6 @@
PageItem_Spiral::PageItem_Spiral(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
: PageItem(pa, PageItem::Spiral, x, y, w, h, w2, fill, outline)
{
- spiralHeight = h;
- spiralWidth = w;
spiralStartAngle = m_Doc->itemToolPrefs().spiralStartAngle;
spiralEndAngle = m_Doc->itemToolPrefs().spiralEndAngle;
spiralFactor = m_Doc->itemToolPrefs().spiralFactor;
@@ -214,6 +212,8 @@
return;
double startAngleK = spiralStartAngle;
double endAngleK = spiralEndAngle;
+ double spiralHeight = height();
+ double spiralWidth = width();
QPainterPath path, path2;
double sh = spiralHeight / (spiralFactor + 1.0);
double sw = 0.0;
Modified: trunk/Scribus/scribus/pageitem_spiral.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/pageitem_spiral.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.h (original)
+++ trunk/Scribus/scribus/pageitem_spiral.h Fri Jan 28 12:38:38 2011
@@ -46,8 +46,6 @@
virtual void applicableActions(QStringList& actionList);
virtual QString infoDescription();
void recalcPath();
- double spiralHeight; //! height of the circumfering ellipse
- double spiralWidth; //! width of the circumfering ellipse
double spiralStartAngle; //! angle where the spiral starts
double spiralEndAngle; //! angle the spiral spans
double spiralFactor; //! factor the spiral gets smaller
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&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 Jan 28 12:38:38 2011
@@ -3718,8 +3718,6 @@
if (currItem->asSpiral())
{
PageItem_Spiral *arcitem = currItem->asSpiral();
- arcitem->spiralHeight = attrs.valueAsDouble("spiralHeight", 1.0);
- arcitem->spiralWidth = attrs.valueAsDouble("spiralWidth", 1.0);
arcitem->spiralStartAngle = attrs.valueAsDouble("spiralStartAngle", 0.0);
arcitem->spiralEndAngle = attrs.valueAsDouble("spiralEndAngle", 360.0);
arcitem->spiralFactor = attrs.valueAsDouble("spiralFactor", 1.2);
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&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 Jan 28 12:38:38 2011
@@ -1722,8 +1722,6 @@
if (item->asSpiral())
{
PageItem_Spiral *arcitem = item->asSpiral();
- docu.writeAttribute("spiralHeight", arcitem->spiralHeight);
- docu.writeAttribute("spiralWidth", arcitem->spiralWidth);
docu.writeAttribute("spiralStartAngle", arcitem->spiralStartAngle);
docu.writeAttribute("spiralEndAngle", arcitem->spiralEndAngle);
docu.writeAttribute("spiralFactor", arcitem->spiralFactor);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Jan 28 12:38:38 2011
@@ -11653,14 +11653,6 @@
if (bb->width() != 0.0)
dscw = item->arcWidth / bb->width();
}
- if (bb->isSpiral())
- {
- PageItem_Spiral* item = bb->asSpiral();
- if (bb->height() != 0.0)
- dsch = item->spiralHeight / bb->height();
- if (bb->width() != 0.0)
- dscw = item->spiralWidth / bb->width();
- }
bb->Sizing = false;
double oldRot, oldLocalX, oldLocalY;
oldRot = bb->rotation();
@@ -11720,13 +11712,10 @@
if (bb->isSpiral())
{
PageItem_Spiral* item = bb->asSpiral();
- item->spiralWidth += dw * dscw;
- item->spiralHeight += dh * dsch;
item->recalcPath();
- FPoint tp2(getMinClipF(&bb->PoLine));
- bb->PoLine.translate(-tp2.x(), -tp2.y());
- }
- AdjustItemSize(bb, true, false);
+ }
+ else
+ AdjustItemSize(bb, true, false);
QTransform ma3;
ma3.translate(gx, gy);
ma3.scale(scx, scy);
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16312&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Fri Jan 28 12:38:38 2011
@@ -3232,17 +3232,8 @@
}
if (CurItem->isSpiral())
{
- double dw = w - oldW;
- double dh = h - oldH;
PageItem_Spiral* item = CurItem->asSpiral();
- double dsch = item->spiralHeight / oldH;
- double dscw = item->spiralWidth / oldW;
- item->spiralWidth += dw * dscw;
- item->spiralHeight += dh * dsch;
item->recalcPath();
- FPoint tp2(getMinClipF(&CurItem->PoLine));
- CurItem->PoLine.translate(-tp2.x(), -tp2.y());
- doc->AdjustItemSize(CurItem);
}
if (CurItem->isArc() || CurItem->isRegularPolygon() || CurItem->isSpiral())
emit updateEditItem();
@@ -3371,17 +3362,8 @@
}
if (CurItem->isSpiral())
{
- double dw = w - oldW;
- double dh = h - oldH;
PageItem_Spiral* item = CurItem->asSpiral();
- double dsch = item->spiralHeight / oldH;
- double dscw = item->spiralWidth / oldW;
- item->spiralWidth += dw * dscw;
- item->spiralHeight += dh * dsch;
item->recalcPath();
- FPoint tp2(getMinClipF(&CurItem->PoLine));
- CurItem->PoLine.translate(-tp2.x(), -tp2.y());
- doc->AdjustItemSize(CurItem);
}
if (CurItem->isArc() || CurItem->isRegularPolygon() || CurItem->isSpiral())
emit updateEditItem();
More information about the scribus-commit
mailing list