[poppler] Branch 'poppler-0.22' - poppler/SplashOutputDev.cc

2013-04-21 Thread Albert Astals Cid
 poppler/SplashOutputDev.cc |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 53b9cec6c1334020f90b885cff6fc30293437e5f
Author: Thomas Freitag thomas.frei...@alfa.de
Date:   Sun Apr 21 23:28:40 2013 +0200

Splash: Always consider a softmask transfer function

Fixes bug 63587 in splash

diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 0426b18..6e62720 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -3975,7 +3975,12 @@ void SplashOutputDev::setSoftMask(GfxState *state, 
double *bbox,
   for (y = 0; y  yMax; ++y) {
 for (x = 0; x  xMax; ++x) {
   if (alpha) {
-   p[x] = tBitmap-getAlpha(x, y);
+   if (transferFunc) {
+ lum = tBitmap-getAlpha(x, y) / 255.0;
+ transferFunc-transform(lum, lum2);
+ p[x] = (int)(lum2 * 255.0 + 0.5);
+   } else 
+ p[x] = tBitmap-getAlpha(x, y);
   } else {
  tBitmap-getPixel(x, y, color);
  // convert to luminosity
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] Branch 'poppler-0.22' - poppler/SplashOutputDev.cc

2013-03-01 Thread Albert Astals Cid
 poppler/SplashOutputDev.cc |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit a766740cf5a5a7580935a026bf15fbd668aa0fdf
Author: Thomas Freitag thomas.frei...@alfa.de
Date:   Fri Mar 1 19:12:22 2013 +0100

Restore CTM on early exits

Bug #61413

diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 6f2d4d6..0426b18 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -20,7 +20,7 @@
 // Copyright (C) 2006 Scott Turner scotty1...@mac.com
 // Copyright (C) 2007 Koji Otani s...@bbr.jp
 // Copyright (C) 2009 Petr Gajdos pgaj...@novell.com
-// Copyright (C) 2009-2012 Thomas Freitag thomas.frei...@alfa.de
+// Copyright (C) 2009-2013 Thomas Freitag thomas.frei...@alfa.de
 // Copyright (C) 2009 Carlos Garcia Campos carlo...@gnome.org
 // Copyright (C) 2009 William Bader williamba...@hotmail.com
 // Copyright (C) 2010 Patrick Spendrin ps...@gmx.de
@@ -4109,8 +4109,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState 
*state, Gfx *gfx1, Catalog *ca
   state-concatCTM(1, 0, 0, 1, bbox[0], bbox[1]);
   ctm = state-getCTM();
   for (i = 0; i  6; ++i) {
-if (!isfinite(ctm[i]))
+if (!isfinite(ctm[i])) {
+  state-setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], 
savedCTM[4], savedCTM[5]);
   return gFalse;
+}
   }
   matc[4] = x0 * xStep * ctm[0] + y0 * yStep * ctm[2] + ctm[4];
   matc[5] = x0 * xStep * ctm[1] + y0 * yStep * ctm[3] + ctm[5];
@@ -4152,8 +4154,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState 
*state, Gfx *gfx1, Catalog *ca
 repeatX = x1 - x0;
 repeatY = y1 - y0;
   } else {
-if ((unsigned long) result_width * result_height  0x80L)
+if ((unsigned long) result_width * result_height  0x80L) {
+  state-setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], 
savedCTM[4], savedCTM[5]);
   return gFalse;
+}
 while(fabs(kx)  16384 || fabs(ky)  16384) {
   // limit pattern bitmap size
   m1.m[0] /= 2;
@@ -4184,8 +4188,10 @@ GBool SplashOutputDev::tilingPatternFill(GfxState 
*state, Gfx *gfx1, Catalog *ca
   matc[2] = ctm[2];
   matc[3] = ctm[3];
 
-  if (surface_width == 0 || surface_height == 0)
+  if (surface_width == 0 || surface_height == 0) {
+state-setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], 
savedCTM[4], savedCTM[5]);
 return gFalse;
+  }
   m1.transform(bbox[0], bbox[1], kx, ky);
   m1.m[4] = -kx;
   m1.m[5] = -ky;
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler