summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index cec44a48f9..97fc02a234 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -1034,13 +1034,16 @@ FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap,
if (clipping)
clipping_rect = CFXFloatRectFromFSRECTF(*clipping);
FX_RECT clip_rect = clipping_rect.ToFxRect();
- RenderPageImpl(
- pContext, pPage,
- pPage->GetDisplayMatrixWithTransformation(
- clip_rect.left, clip_rect.top, clip_rect.Width(), clip_rect.Height(),
- CFX_Matrix(matrix->a, matrix->b, matrix->c, matrix->d, matrix->e,
- matrix->f)),
- clip_rect, flags, true, nullptr);
+
+ CFX_Matrix transform_matrix = pPage->GetDisplayMatrix(
+ 0, 0, pPage->GetPageWidth(), pPage->GetPageHeight(), 0);
+
+ if (matrix) {
+ transform_matrix.Concat(CFX_Matrix(matrix->a, matrix->b, matrix->c,
+ matrix->d, matrix->e, matrix->f));
+ }
+ RenderPageImpl(pContext, pPage, transform_matrix, clip_rect, flags, true,
+ nullptr);
pPage->SetRenderContext(nullptr);
}