mirror of https://github.com/JakubMelka/PDF4QT.git
Bugfix: Wrong translation and clip box in case of 270° rotation
This commit is contained in:
parent
024c613171
commit
64476910f3
|
@ -42,7 +42,7 @@ PDFPainter::PDFPainter(QPainter* painter,
|
|||
|
||||
if (features.testFlag(PDFRenderer::ClipToCropBox))
|
||||
{
|
||||
QRectF cropBox = page->getRotatedCropBox();
|
||||
QRectF cropBox = page->getCropBox();
|
||||
if (cropBox.isValid())
|
||||
{
|
||||
QPainterPath path;
|
||||
|
@ -366,4 +366,7 @@ bool PDFPainter::canSetBlendMode(BlendMode mode) const
|
|||
return std::all_of(m_transparencyGroupDataStack.cbegin(), m_transparencyGroupDataStack.cend(), [](const PDFTransparencyGroupPainterData& group) { return group.blendMode == BlendMode::Normal || group.blendMode == BlendMode::Compatible; });
|
||||
}
|
||||
|
||||
// TODO: Check all graphic state parameter dictionaries, warn about missing ones
|
||||
// TODO: Recompile libraries in MSVC 2019
|
||||
|
||||
} // namespace pdf
|
||||
|
|
|
@ -75,6 +75,7 @@ QList<PDFRenderError> PDFRenderer::render(QPainter* painter, const QRectF& recta
|
|||
{
|
||||
matrix.translate(rectangle.right(), rectangle.top());
|
||||
matrix.rotate(-90);
|
||||
matrix.translate(-rectangle.height(), 0);
|
||||
matrix.scale(rectangle.width() / mediaBox.width(), -rectangle.height() / mediaBox.height());
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue