Skip to content

Call updateCTM with the identity matrix instead of all zeros

Oliver Sander requested to merge sander/poppler:fix-call-to-updatectm into master

The method Gfx::doShowText calls out->updateCTM once with the all-zero matrix. This was apparently implemented with the Splash output device in mind: SplashOutputDev::updateCTM ignores its parameters, and therefore calling it with a zero matrix is okay. For other output devices calling updateCTM with a zero matrix multiplies the CTM with zero, which breaks further rendering. See #206 for an example.

This patch changes the argument to updateCTM in doShowText from the zero matrix to an identity matrix. That way, the CTM is unchanged no matter how the output device implements its updateCTM method.

Edited by Oliver Sander

Merge request reports