summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-09-01 17:06:36 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-09-01 17:06:36 +0200
commit00367c42db4c5c2d2db6cf823f59b7ea6daa8376 (patch)
tree685c1ec271533fb3eda2d3bd3d225af127eac8ed
parentde0ce21ad72532b731ba3826de82d5aefc0f86de (diff)
downloadmupdf-00367c42db4c5c2d2db6cf823f59b7ea6daa8376.tar.xz
Use correct concatenation order for XObject matrix.
-rw-r--r--pdf/pdf_annot.c1
-rw-r--r--pdf/pdf_interpret.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c
index ecb4824a..2fc9d7bb 100644
--- a/pdf/pdf_annot.c
+++ b/pdf/pdf_annot.c
@@ -168,6 +168,7 @@ pdf_transform_annot(pdf_annot *annot)
h = (rect.y1 - rect.y0) / (bbox.y1 - bbox.y0);
x = rect.x0 - bbox.x0;
y = rect.y0 - bbox.y0;
+
annot->matrix = fz_concat(fz_scale(w, h), fz_translate(x, y));
}
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c
index 3321e824..87fbf359 100644
--- a/pdf/pdf_interpret.c
+++ b/pdf/pdf_interpret.c
@@ -1031,7 +1031,7 @@ pdf_run_xobject(pdf_csi *csi, fz_obj *resources, pdf_xobject *xobj, fz_matrix tr
popmask = 0;
/* apply xobject's transform matrix */
- transform = fz_concat(transform, xobj->matrix);
+ transform = fz_concat(xobj->matrix, transform);
gstate->ctm = fz_concat(transform, gstate->ctm);
/* apply soft mask, create transparency group and reset state */