Bugfixes of tensor patch mesh

This commit is contained in:
Jakub Melka
2019-09-21 15:55:33 +02:00
parent d5d92a4e54
commit 2ca3f907c3
3 changed files with 37 additions and 9 deletions

View File

@ -620,7 +620,14 @@ void PDFPageContentProcessor::processPathPainting(const QPainterPath& path, bool
// Now, merge the current path to the mesh clipping path
QPainterPath boundingPath = mesh.getBoundingPath();
boundingPath.addPath(getCurrentWorldMatrix().map(path));
if (boundingPath.isEmpty())
{
boundingPath = getCurrentWorldMatrix().map(path);
}
else
{
boundingPath = boundingPath.intersected(path);
}
mesh.setBoundingPath(boundingPath);
performMeshPainting(mesh);
@ -686,7 +693,14 @@ void PDFPageContentProcessor::processPathPainting(const QPainterPath& path, bool
QPainterPath strokedPath = stroker.createStroke(path);
QPainterPath boundingPath = mesh.getBoundingPath();
boundingPath.addPath(getCurrentWorldMatrix().map(strokedPath));
if (boundingPath.isEmpty())
{
boundingPath = getCurrentWorldMatrix().map(strokedPath);
}
else
{
boundingPath = boundingPath.intersected(strokedPath);
}
mesh.setBoundingPath(boundingPath);
performMeshPainting(mesh);