Commit 0a829ca0 authored by Sharaf Zaman's avatar Sharaf Zaman

Bugfix: render the patch completely in QImage

if the meshpatch, in mesharray were backwards (which
I wasn't sure was allowed till I tested pepper.svg from
inkscape), then patch would be rendered outside the
QImage

Maniphest: T13101
parent c0f66cd6
......@@ -189,6 +189,20 @@ QRectF SvgMeshArray::boundingRect() const
QPointF start = m_array[0][0]->boundingRect().topLeft();
// mesharray may be backwards, in which case we might get the right most value
// but we need topLeft for things to work as expected
for (int i = 0; i < numRows(); ++i) {
for (int j = 0; j < numColumns(); ++j) {
QPointF tmp = m_array[i][j]->boundingRect().topLeft();
if (tmp.x() < start.x()) {
start.rx() = tmp.x();
}
if ( tmp.y() < start.y()) {
start.ry() = tmp.y();
}
}
}
for (int row = 0; row < numRows(); ++row) {
height += m_array[row][0]->boundingRect().height();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment