Fixed issue #989. Elliptical arc tool not behaving correctly.
(grafted from 09f4c4e0d4a44df54dd7d3267b7c7922a2c150aa) --HG-- branch : develop
This commit is contained in:
parent
0373f727c5
commit
680e66c4cd
|
@ -279,7 +279,9 @@ QVector<QPointF> VEllipticalArc::GetPoints() const
|
||||||
}
|
}
|
||||||
|
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
|
path.moveTo(GetP1());
|
||||||
path.arcTo(box, VAbstractArc::GetStartAngle(), sweepAngle);
|
path.arcTo(box, VAbstractArc::GetStartAngle(), sweepAngle);
|
||||||
|
path.moveTo(GetP2());
|
||||||
|
|
||||||
QTransform t = d->m_transform;
|
QTransform t = d->m_transform;
|
||||||
t.translate(center.x(), center.y());
|
t.translate(center.x(), center.y());
|
||||||
|
@ -293,10 +295,6 @@ QVector<QPointF> VEllipticalArc::GetPoints() const
|
||||||
if (not sub.isEmpty())
|
if (not sub.isEmpty())
|
||||||
{
|
{
|
||||||
polygon = ConstFirst (path.toSubpathPolygons());
|
polygon = ConstFirst (path.toSubpathPolygons());
|
||||||
if (not polygon.isEmpty())
|
|
||||||
{
|
|
||||||
polygon.removeFirst(); // remove point (0;0)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return static_cast<QVector<QPointF>>(polygon);
|
return static_cast<QVector<QPointF>>(polygon);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user