Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 15022 → Rev 15044

/branches/Version135/Scribus/scribus/pageitem.cpp
5200,7 → 5200,6
 
void PageItem::setPolyClip(int up, int down)
{
Clip.resize(0);
if (PoLine.size() < 4)
return;
double rot;
5216,32 → 5215,36
QPoint np, np2;
QPolygon cl, cl1, cl2;
cl = FlattenPath(PoLine, Segments);
for (int a = 0; a < cl.size()-1; ++a)
if (cl.size() > 1)
{
rot = xy2Deg(cl.point(a+1).x()-cl.point(a).x(),cl.point(a+1).y()-cl.point(a).y());
QMatrix ma;
ma.rotate(rot);
np = QPoint(0, -upval) * ma;
np2 = QPoint(0, -downval) * ma;
Clip.resize(0);
for (int a = 0; a < cl.size()-1; ++a)
{
rot = xy2Deg(cl.point(a+1).x()-cl.point(a).x(),cl.point(a+1).y()-cl.point(a).y());
QMatrix ma;
ma.rotate(rot);
np = QPoint(0, -upval) * ma;
np2 = QPoint(0, -downval) * ma;
cl1.resize(cl1.size()+1);
cl1.setPoint(cl1.size()-1, np+cl.point(a));
cl1.resize(cl1.size()+1);
cl1.setPoint(cl1.size()-1, np+cl.point(a+1));
cl2.resize(cl2.size()+1);
cl2.setPoint(cl2.size()-1, np2+cl.point(a));
cl2.resize(cl2.size()+1);
cl2.setPoint(cl2.size()-1, np2+cl.point(a+1));
}
cl1.resize(cl1.size()+1);
cl1.setPoint(cl1.size()-1, np+cl.point(a));
cl1.resize(cl1.size()+1);
cl1.setPoint(cl1.size()-1, np+cl.point(a+1));
cl1.setPoint(cl1.size()-1, np+cl.point(cl.size()-1));
cl2.resize(cl2.size()+1);
cl2.setPoint(cl2.size()-1, np2+cl.point(a));
cl2.resize(cl2.size()+1);
cl2.setPoint(cl2.size()-1, np2+cl.point(a+1));
cl2.setPoint(cl2.size()-1, np2+cl.point(cl.size()-1));
Clip.putPoints(Clip.size(), cl1.size(), cl1);
for (int a2 = cl2.size()-1; a2 > -1; a2--)
{
Clip.resize(Clip.size()+1);
Clip.setPoint(Clip.size()-1, cl2.point(a2));
}
}
cl1.resize(cl1.size()+1);
cl1.setPoint(cl1.size()-1, np+cl.point(cl.size()-1));
cl2.resize(cl2.size()+1);
cl2.setPoint(cl2.size()-1, np2+cl.point(cl.size()-1));
Clip.putPoints(Clip.size(), cl1.size(), cl1);
for (int a2 = cl2.size()-1; a2 > -1; a2--)
{
Clip.resize(Clip.size()+1);
Clip.setPoint(Clip.size()-1, cl2.point(a2));
}
}
 
void PageItem::updatePolyClip()