[poppler] poppler/glib: poppler-page.cc, 1.28.2.3, 1.28.2.4 poppler-page.h, 1.16.2.1, 1.16.2.2

Kristian Hogsberg krh at freedesktop.org
Sun Aug 7 05:01:53 EST 2005


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

Modified Files:
      Tag: POPPLER_0_4_X
	poppler-page.cc poppler-page.h 
Log Message:
2005-08-06  Kristian Høgsberg  <krh at redhat.com>

        * glib/poppler-page.cc:
        * glib/poppler-page.h: Use GdkColor for specifying selection
        colors, we alreay depend on GDK anyway.



Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-page.cc,v
retrieving revision 1.28.2.3
retrieving revision 1.28.2.4
diff -u -d -r1.28.2.3 -r1.28.2.4
--- poppler-page.cc	5 Aug 2005 19:07:47 -0000	1.28.2.3
+++ poppler-page.cc	6 Aug 2005 19:01:51 -0000	1.28.2.4
@@ -491,9 +491,7 @@
  * Render the selection specified by @selection for @page into
  * @pixbuf.  The selection will be rendered at @scale, using
  * @glyph_color for the glyphs and @background_color for the selection
- * background.  The colors are specified as 24 bit words,
- * specifically, the red component in bits 16-23, the green component
- * in bits 8-15 and the blue component in bits 0-7.
+ * background.
  *
  * If non-NULL, @old_selection specifies the selection that is already
  * rendered in @pixbuf, in which case this function will (some day)
@@ -505,8 +503,8 @@
 			       GdkPixbuf        *pixbuf,
 			       PopplerRectangle *selection,
 			       PopplerRectangle *old_selection,
-			       guint32           glyph_color,
-			       guint32           background_color)
+			       GdkColor         *glyph_color,
+			       GdkColor         *background_color)
 {
   TextOutputDev *text_dev;
   OutputDev *output_dev;
@@ -515,14 +513,14 @@
 			     selection->x2, selection->y2);
 
   GfxColor gfx_background_color = { 
-    ((background_color >> 16) & 0xff) / 255.0,
-    ((background_color >>  8) & 0xff) / 255.0,
-    ((background_color >>  0) & 0xff) / 255.0
+    background_color->red / 65535.0,
+    background_color->green / 65535.0,
+    background_color->blue / 65535.0
   };
   GfxColor gfx_glyph_color = {
-    ((glyph_color >> 16) & 0xff) / 255.0,
-    ((glyph_color >>  8) & 0xff) / 255.0,
-    ((glyph_color >>  0) & 0xff) / 255.0
+    glyph_color->red / 65535.0,
+    glyph_color->green / 65535.0,
+    glyph_color->blue / 65535.0
   };
 
   text_dev = poppler_page_get_text_output_dev (page);

Index: poppler-page.h
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-page.h,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -u -d -r1.16.2.1 -r1.16.2.2
--- poppler-page.h	5 Aug 2005 19:07:47 -0000	1.16.2.1
+++ poppler-page.h	6 Aug 2005 19:01:51 -0000	1.16.2.2
@@ -21,6 +21,7 @@
 
 #include <glib-object.h>
 #include <gdk/gdkregion.h>
+#include <gdk/gdkcolor.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #include "poppler.h"
@@ -68,8 +69,8 @@
 						       GdkPixbuf          *pixbuf,
 						       PopplerRectangle   *selection,
 						       PopplerRectangle   *old_selection,
-						       guint32             glyph_color,
-						       guint32             background_color);
+						       GdkColor         *glyph_color,
+						       GdkColor         *background_color);
 
 
 /* A rectangle on a page, with coordinates in PDF points. */



More information about the poppler mailing list