[poppler] poppler/test: gtk-cairo-test.cc, 1.7, 1.8 gtk-splash-test.cc, 1.4, 1.5 pdf-inspector.cc, 1.1, 1.2

Albert Astals Cid aacid at freedesktop.org
Sun Oct 30 12:29:07 PST 2005


Update of /cvs/poppler/poppler/test
In directory gabe:/tmp/cvs-serv31488/test

Modified Files:
	gtk-cairo-test.cc gtk-splash-test.cc pdf-inspector.cc 
Log Message:
Last xpdf 3.01 merge (at least from my side)
It's very big, but noone has opposed in the 2 weeks time i gave on the ml so either poppler is dead or people agree with the patch


Index: gtk-cairo-test.cc
===================================================================
RCS file: /cvs/poppler/poppler/test/gtk-cairo-test.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gtk-cairo-test.cc	28 Jul 2005 17:34:19 -0000	1.7
+++ gtk-cairo-test.cc	30 Oct 2005 20:29:05 -0000	1.8
@@ -199,7 +199,7 @@
   
   v->out->startDoc(v->doc->getXRef());
 
-  v->doc->displayPage (v->out, 1, 72, 72, 0, gTrue, gTrue);
+  v->doc->displayPage (v->out, 1, 72, 72, 0, gFalse, gTrue, gTrue);
   
   w = v->out->getPixmapWidth();
   h = v->out->getPixmapHeight();

Index: gtk-splash-test.cc
===================================================================
RCS file: /cvs/poppler/poppler/test/gtk-splash-test.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- gtk-splash-test.cc	28 Jul 2005 17:34:19 -0000	1.4
+++ gtk-splash-test.cc	30 Oct 2005 20:29:05 -0000	1.5
@@ -40,7 +40,7 @@
 
   GDKSplashOutputDev(GdkScreen *screen,
                      void (*redrawCbkA)(void *data),
-                     void *redrawCbkDataA);
+                     void *redrawCbkDataA, SplashColor sc);
   
   virtual ~GDKSplashOutputDev();
 
@@ -84,17 +84,10 @@
 // GDKSplashOutputDev
 //------------------------------------------------------------------------
 
-static SplashColor makeSplashColor(int r, int g, int b)
-{
-  SplashColor c;
-  c.rgb8 = splashMakeRGB8 (r, g, b);
-  return c;
-}
-
 GDKSplashOutputDev::GDKSplashOutputDev(GdkScreen *screen,
                                        void (*redrawCbkA)(void *data),
-                                       void *redrawCbkDataA):
-  SplashOutputDev(splashModeRGB8Packed, gFalse, makeSplashColor (255,255,255)),
+                                       void *redrawCbkDataA, SplashColor sc):
+  SplashOutputDev(splashModeRGB8, 4, gFalse, sc),
   incrementalUpdate (1)
 {
   redrawCbk = redrawCbkA;
@@ -140,7 +133,7 @@
                       destX, destY,
                       width, height,
                       GDK_RGB_DITHER_NORMAL,
-                      getBitmap()->getDataPtr().rgb8p + srcY * gdk_rowstride + srcX * 3,
+                      getBitmap()->getDataPtr() + srcY * gdk_rowstride + srcX * 3,
                       gdk_rowstride);
 
   g_object_unref (gc);
@@ -210,7 +203,7 @@
   
   v->out->startDoc(v->doc->getXRef());
 
-  v->doc->displayPage (v->out, 1, 72, 72, 0, gTrue, gTrue);
+  v->doc->displayPage (v->out, 1, 72, 72, 0, gFalse, gTrue, gTrue);
   
   w = v->out->getBitmapWidth();
   h = v->out->getBitmapHeight();
@@ -258,8 +251,12 @@
   v->window = window;
   v->drawing_area = drawing_area;
   v->sw = sw;
+  SplashColor sc;
+  sc[0] = 255;
+  sc[1] = 255;
+  sc[2] = 255;
   v->out = new GDKSplashOutputDev (gtk_widget_get_screen (window),
-                                   redraw_callback, (void*) v);
+                                   redraw_callback, (void*) v, sc);
   v->doc = 0;
 
   g_signal_connect (drawing_area,

Index: pdf-inspector.cc
===================================================================
RCS file: /cvs/poppler/poppler/test/pdf-inspector.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- pdf-inspector.cc	23 Aug 2005 18:20:45 -0000	1.1
+++ pdf-inspector.cc	30 Oct 2005 20:29:05 -0000	1.2
@@ -224,7 +224,7 @@
   gtk_list_store_clear (GTK_LIST_STORE (model));
 
   GooTimer timer;
-  doc->displayPage (output, page + 1, 72, 72, 0, gTrue, gTrue);
+  doc->displayPage (output, page + 1, 72, 72, 0, gFalse, gTrue, gTrue);
 
   // Total time;
   text = g_strdup_printf ("%g", timer.getElapsed ());



More information about the poppler mailing list