mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Minor bufixes in axial shading, clipping on crop box
This commit is contained in:
@ -38,6 +38,18 @@ PDFPainter::PDFPainter(QPainter* painter,
|
||||
Q_ASSERT(pagePointToDevicePointMatrix.isInvertible());
|
||||
|
||||
m_painter->save();
|
||||
|
||||
if (features.testFlag(PDFRenderer::ClipToCropBox))
|
||||
{
|
||||
QRectF cropBox = page->getRotatedCropBox();
|
||||
if (cropBox.isValid())
|
||||
{
|
||||
QPainterPath path;
|
||||
path.addPolygon(pagePointToDevicePointMatrix.map(cropBox));
|
||||
|
||||
m_painter->setClipPath(path, Qt::IntersectClip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PDFPainter::~PDFPainter()
|
||||
|
Reference in New Issue
Block a user