adjust the width/height by the offset, don't calculte another offset that is plain wrong
svn path=/trunk/KDE/kdelibs/; revision=1111250
This commit is contained in:
parent
4f324d0fcc
commit
3660bcf30d
14
svg.cpp
14
svg.cpp
@ -418,6 +418,7 @@ class SvgPrivate
|
||||
qreal rem_dst = dst.x() - (floor(dst.x()));
|
||||
qreal offset = closestDistance(rem_dst, rem_orig);
|
||||
res.translate(offset + offset*div_w, 0);
|
||||
res.setWidth(res.width() + offset);
|
||||
}
|
||||
//vertical snap
|
||||
if (!qFuzzyIsNull(div_y) && !qFuzzyCompare(div_h, div_y)) {
|
||||
@ -425,19 +426,6 @@ class SvgPrivate
|
||||
qreal rem_dst = dst.y() - (floor(dst.y()));
|
||||
qreal offset = closestDistance(rem_dst, rem_orig);
|
||||
res.translate(0, offset + offset*div_h);
|
||||
}
|
||||
|
||||
if (!qFuzzyIsNull(div_w)) {
|
||||
qreal rem_orig = orig.width() - (floor(orig.width()));
|
||||
qreal rem_dst = dst.width() - (floor(dst.width()));
|
||||
qreal offset = closestDistance(rem_dst, rem_orig);
|
||||
res.setWidth(res.width() + offset);
|
||||
}
|
||||
|
||||
if (!qFuzzyIsNull(div_h)) {
|
||||
qreal rem_orig = orig.height() - (floor(orig.height()));
|
||||
qreal rem_dst = dst.height() - (floor(dst.height()));
|
||||
qreal offset = closestDistance(rem_dst, rem_orig);
|
||||
res.setHeight(res.height() + offset);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user