[poppler] poppler/glib: poppler-document.cc, 1.27, 1.28 poppler-page.cc, 1.37, 1.38

Albert Astals Cid aacid at freedesktop.org
Fri Nov 4 11:03:57 PST 2005


Update of /cvs/poppler/poppler/glib
In directory gabe:/tmp/cvs-serv31163/glib

Modified Files:
	poppler-document.cc poppler-page.cc 
Log Message:
Make it compile using --disable-cairo-output


Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-document.cc,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- poppler-document.cc	29 Jul 2005 05:48:33 -0000	1.27
+++ poppler-document.cc	4 Nov 2005 19:03:55 -0000	1.28
@@ -116,8 +116,10 @@
   document->output_dev = new CairoOutputDev ();
 #elif defined (HAVE_SPLASH)
   SplashColor white;
-  white.rgb8 = splashMakeRGB8 (0xff, 0xff, 0xff);
-  document->output_dev = new SplashOutputDev(splashModeRGB8, gFalse, white);
+  white[0] = 255;
+  white[1] = 255;
+  white[2] = 255;
+  document->output_dev = new SplashOutputDev(splashModeRGB8, 4, gFalse, white);
 #endif
   document->output_dev->startDoc(document->doc->getXRef ());
 

Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-page.cc,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- poppler-page.cc	30 Oct 2005 20:29:05 -0000	1.37
+++ poppler-page.cc	4 Nov 2005 19:03:55 -0000	1.38
@@ -246,23 +246,22 @@
   if (splash_height > gdk_pixbuf_get_height (pixbuf))
     splash_height = gdk_pixbuf_get_height (pixbuf);
 
+  SplashColorPtr pixel = new Guchar[4];
   for (y = 0; y < splash_height; y++)
+  {
+    dst = pixbuf_data + y * pixbuf_rowstride;
+    for (x = 0; x < splash_width; x++)
     {
-      SplashRGB8 *src;
-
-      src = (SplashRGB8 *) (color_ptr.rgb8p + y * splash_rowstride);
-      dst = pixbuf_data + y * pixbuf_rowstride;
-      for (x = 0; x < splash_width; x++) 
-	{
-	  dst[0] = splashRGB8R(*src);
-	  dst[1] = splashRGB8G(*src); 
-	  dst[2] = splashRGB8B(*src);
-	  if (pixbuf_n_channels == 4)
-	    dst[3] = 0xff;
-	  dst += pixbuf_n_channels;
-	  src++;
-	}
+      output_dev->getBitmap()->getPixel(x, y, pixel);
+      dst[0] = pixel[0];
+      dst[1] = pixel[1];
+      dst[2] = pixel[2];
+      if (pixbuf_n_channels == 4)
+        dst[3] = 0xff;
+      dst += pixbuf_n_channels;
     }
+  }
+  delete pixel;
 }
 
 #endif



More information about the poppler mailing list