[poppler] cpp/poppler-page-renderer.cpp

2019-05-15 Thread GitLab Mirror
 cpp/poppler-page-renderer.cpp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 019cb4a6a908e7ad9959673e21168d6479892603
Author: Albert Astals Cid 
Date:   Wed May 15 23:30:42 2019 +0200

Update (C) of previous commits

diff --git a/cpp/poppler-page-renderer.cpp b/cpp/poppler-page-renderer.cpp
index f63867f6..9138b7bb 100644
--- a/cpp/poppler-page-renderer.cpp
+++ b/cpp/poppler-page-renderer.cpp
@@ -2,6 +2,7 @@
  * Copyright (C) 2010, Pino Toscano 
  * Copyright (C) 2015 William Bader 
  * Copyright (C) 2018, Zsombor Hollay-Horvath 
+ * Copyright (C) 2019, Julián Unrrein 
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler

[poppler] poppler/Gfx.cc

2019-05-15 Thread GitLab Mirror
 poppler/Gfx.cc |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0477707248bb62404961a08e75ecaf106529e7e1
Author: Oliver Sander 
Date:   Thu Apr 25 21:33:30 2019 +0200

Call updateCTM with the identity matrix instead of all zeros

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

  https://gitlab.freedesktop.org/poppler/poppler/issues/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.

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 5fba4c72..a9b93b61 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4007,7 +4007,10 @@ void Gfx::doShowText(const GooString *s) {
   curX += tdx;
   curY += tdy;
   state->moveTo(curX, curY);
-  out->updateCTM(state, 0, 0, 0, 0, 0, 0);
+  // Call updateCTM with the identity transformation.  That way, the CTM 
is unchanged,
+  // but any side effect that the method may have is triggered.  This is 
the case,
+  // in particular, for the Splash backend.
+  out->updateCTM(state, 1, 0, 0, 1, 0, 0);
   p += n;
   len -= n;
 }
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler