Commit ce1b6c7c authored by Patrick Pfeifer's avatar Patrick Pfeifer Committed by Carlos Garcia Campos

cairo: Fix test for rotation

Fixes bug #14619.
parent 4765c328
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment