diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-11-14 18:22:13 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-11-15 15:20:54 +0000 |
commit | 9c0a49060475b2dea1e4c2668bebd1d566113a7b (patch) | |
tree | 49e45a691cf105f4266d5c6b7242a4a3256c1200 /draw/draw_device.c | |
parent | 60c0544742931da63db623ad7a79ba3758704cc1 (diff) | |
parent | fd6def85f22b598d4c278e76138ab7dccbb84c36 (diff) | |
download | mupdf-9c0a49060475b2dea1e4c2668bebd1d566113a7b.tar.xz |
Merge branch 'master' into context
Mostly redoing the xps_context to xps_document change and adding
contexts to newly written code.
Conflicts:
apps/pdfapp.c
apps/pdfapp.h
apps/x11_main.c
apps/xpsdraw.c
draw/draw_device.c
draw/draw_scale.c
fitz/base_object.c
fitz/fitz.h
pdf/mupdf.h
pdf/pdf_interpret.c
pdf/pdf_outline.c
pdf/pdf_page.c
xps/muxps.h
xps/xps_doc.c
xps/xps_xml.c
Diffstat (limited to 'draw/draw_device.c')
-rw-r--r-- | draw/draw_device.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c index a8da9e19..5407d618 100644 --- a/draw/draw_device.c +++ b/draw/draw_device.c @@ -861,7 +861,10 @@ fz_transform_pixmap(fz_context *ctx, fz_pixmap *image, fz_matrix *ctm, int x, in if (ctm->a != 0 && ctm->b == 0 && ctm->c == 0 && ctm->d != 0) { /* Unrotated or X-flip or Y-flip or XY-flip */ - scaled = fz_scale_pixmap_gridfit(ctx, image, ctm->e, ctm->f, ctm->a, ctm->d, gridfit); + fz_matrix m = *ctm; + if (gridfit) + fz_gridfit_matrix(&m); + scaled = fz_scale_pixmap(ctx, image, m.e, m.f, m.a, m.d); if (scaled == NULL) return NULL; ctm->a = scaled->w; @@ -874,7 +877,10 @@ fz_transform_pixmap(fz_context *ctx, fz_pixmap *image, fz_matrix *ctm, int x, in if (ctm->a == 0 && ctm->b != 0 && ctm->c != 0 && ctm->d == 0) { /* Other orthogonal flip/rotation cases */ - scaled = fz_scale_pixmap_gridfit(ctx, image, ctm->f, ctm->e, ctm->b, ctm->c, gridfit); + fz_matrix m = *ctm; + if (gridfit) + fz_gridfit_matrix(&m); + scaled = fz_scale_pixmap(ctx, image, m.f, m.e, m.b, m.c); if (scaled == NULL) return NULL; ctm->b = scaled->w; |