poppler/CairoOutputDev.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 6a671686c6265ecdb4c48f04392de9c56d4e0936 Author: Adrian Johnson <[EMAIL PROTECTED]> Date: Wed Mar 12 21:43:12 2008 +1030 Fix regression in cairo output when transforming ctm The commit: ec01926e5a9dc16e200060497c43e79a1623698d "Avoid setting a singular ctm" introduced a regression in the output when using a ctm. The check for an invertable matrix had the side effect of inverting the matrix. Instead, make a copy of the matrix before testing if it is invertable. diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index d69013a..57c3ac5 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -209,7 +209,7 @@ void CairoOutputDev::setDefaultCTM(double *ctm) { void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32) { - cairo_matrix_t matrix; + cairo_matrix_t matrix, invert_matrix; matrix.xx = m11; matrix.yx = m12; matrix.xy = m21; @@ -225,8 +225,9 @@ void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12, * * Ideally, we could do the cairo_transform * and then check if anything went wrong and fix it then - * instead of having to invert the matrix twice. */ - if (cairo_matrix_invert(&matrix)) { + * instead of having to invert the matrix. */ + invert_matrix = matrix; + if (cairo_matrix_invert(&invert_matrix)) { warning("matrix not invertible\n"); return; } _______________________________________________ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler