mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Pattern shading refactoring
This commit is contained in:
@ -370,20 +370,16 @@ PDFMesh PDFAxialShading::createMesh(const PDFMeshQualitySettings& settings) cons
|
||||
}
|
||||
|
||||
// Create background color triangles
|
||||
// TODO: Create background color for axial shading
|
||||
|
||||
// Transform mesh to the device space coordinates
|
||||
mesh.transform(p1p2LCS);
|
||||
|
||||
// Transform mesh from the device space coordinates to user space coordinates
|
||||
Q_ASSERT(settings.userSpaceToDeviceSpaceMatrix.isInvertible());
|
||||
QMatrix deviceSpaceToUserSpaceMatrix = settings.userSpaceToDeviceSpaceMatrix.inverted();
|
||||
mesh.transform(deviceSpaceToUserSpaceMatrix);
|
||||
|
||||
// Create bounding path
|
||||
if (m_boundingBox.isValid())
|
||||
{
|
||||
QPainterPath boundingPath;
|
||||
boundingPath.addRect(m_boundingBox);
|
||||
boundingPath.addPolygon(settings.userSpaceToDeviceSpaceMatrix.map(m_boundingBox));
|
||||
mesh.setBoundingPath(boundingPath);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user