Fixed getting seam allowence points.
--HG-- branch : feature
This commit is contained in:
parent
b04d1f92e7
commit
28b2f97aaa
|
@ -432,6 +432,18 @@ QVector<QPointF> VDetail::SeamAllowancePoints(const VContainer *data) const
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (getSeamAllowance() == true)
|
||||
{
|
||||
if (getClosed() == true)
|
||||
{
|
||||
pointsEkv = Equidistant(pointsEkv, EquidistantType::CloseEquidistant, qApp->toPixel(getWidth()));
|
||||
}
|
||||
else
|
||||
{
|
||||
pointsEkv = Equidistant(pointsEkv, EquidistantType::OpenEquidistant, qApp->toPixel(getWidth()));
|
||||
}
|
||||
}
|
||||
return pointsEkv;
|
||||
}
|
||||
|
||||
|
@ -455,20 +467,10 @@ QPainterPath VDetail::ContourPath(const VContainer *data) const
|
|||
if (getSeamAllowance() == true)
|
||||
{
|
||||
QPainterPath ekv;
|
||||
QVector<QPointF> p;
|
||||
if (getClosed() == true)
|
||||
ekv.moveTo(pointsEkv.at(0));
|
||||
for (qint32 i = 1; i < pointsEkv.count(); ++i)
|
||||
{
|
||||
p = Equidistant(pointsEkv, EquidistantType::CloseEquidistant, qApp->toPixel(getWidth()));
|
||||
}
|
||||
else
|
||||
{
|
||||
p = Equidistant(pointsEkv, EquidistantType::OpenEquidistant, qApp->toPixel(getWidth()));
|
||||
}
|
||||
|
||||
ekv.moveTo(p.at(0));
|
||||
for (qint32 i = 1; i < p.count(); ++i)
|
||||
{
|
||||
ekv.lineTo(p.at(i));
|
||||
ekv.lineTo(pointsEkv.at(i));
|
||||
}
|
||||
|
||||
path.addPath(ekv);
|
||||
|
|
|
@ -367,22 +367,18 @@ QPainterPath VLayoutDetail::ContourPath() const
|
|||
// seam allowence
|
||||
if (getSeamAllowance() == true)
|
||||
{
|
||||
QPainterPath ekv;
|
||||
QVector<QPointF> p;
|
||||
points = Map(d->seamAllowence);
|
||||
|
||||
if (getClosed() == true)
|
||||
{
|
||||
p = Equidistant(points, EquidistantType::CloseEquidistant, getWidth());
|
||||
}
|
||||
else
|
||||
{
|
||||
p = Equidistant(points, EquidistantType::OpenEquidistant, getWidth());
|
||||
points.append(points.at(0));
|
||||
}
|
||||
|
||||
ekv.moveTo(p.at(0));
|
||||
for (qint32 i = 1; i < p.count(); ++i)
|
||||
QPainterPath ekv;
|
||||
ekv.moveTo(points.at(0));
|
||||
for (qint32 i = 1; i < points.count(); ++i)
|
||||
{
|
||||
ekv.lineTo(p.at(i));
|
||||
ekv.lineTo(points.at(i));
|
||||
}
|
||||
|
||||
path.addPath(ekv);
|
||||
|
|
Loading…
Reference in New Issue
Block a user