[poppler] poppler/glib: poppler-page.cc, 1.31, 1.32 poppler-page.h,
1.17, 1.18
Kristian Hogsberg
krh at freedesktop.org
Sun Aug 7 04:09:53 EST 2005
Update of /cvs/poppler/poppler/glib
In directory gabe:/tmp/cvs-serv17729/glib
Modified Files:
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.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- poppler-page.cc 5 Aug 2005 19:04:36 -0000 1.31
+++ poppler-page.cc 6 Aug 2005 18:09:51 -0000 1.32
@@ -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.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- poppler-page.h 5 Aug 2005 19:04:36 -0000 1.17
+++ poppler-page.h 6 Aug 2005 18:09:51 -0000 1.18
@@ -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