[poppler] poppler/CairoOutputDev.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Fri Jan 20 06:36:49 PST 2012
poppler/CairoOutputDev.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit ce1b6c7ca16847f07eeafc29c6503be6fa5a9a3d
Author: Patrick Pfeifer <p2000 at mailinator.com>
Date: Thu Jan 19 14:54:48 2012 +0100
cairo: Fix test for rotation
Fixes bug #14619.
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 051f5d0..d49b87f 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -1834,7 +1834,11 @@ void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
cairo_get_matrix (cairo, &matrix);
//XXX: it is possible that we should only do sub pixel positioning if
// we are rendering fonts */
- if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) {
+ if (!printing && prescaleImages
+ /* not rotated */
+ && matrix.xy == 0 && matrix.yx == 0
+ /* axes not flipped / not 180 deg rotated */
+ && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) {
drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg);
} else {
drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg);
@@ -1969,6 +1973,8 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream
/* cairo does a very poor job of scaling down images so we scale them ourselves */
+ LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height));
+
/* this scaling code is adopted from the splash image scaling code */
cairo_get_matrix(cairo, &matrix);
#if 0
More information about the poppler
mailing list