[Commits] poppler_viewer.c 1.1.2.97 1.1.2.98
iwkse at claws-mail.org
iwkse at claws-mail.org
Sat Mar 31 03:20:44 CEST 2012
Update of /home/claws-mail/plugins/pdf_viewer/src
In directory srv:/tmp/cvs-serv12218/src
Modified Files:
Tag: gtk2
poppler_viewer.c
Log Message:
2012-03-31 [iwkse] 0.9.1cvs21
* src/poppler_viewer.c
Indent and proper definition
Index: poppler_viewer.c
===================================================================
RCS file: /home/claws-mail/plugins/pdf_viewer/src/Attic/poppler_viewer.c,v
retrieving revision 1.1.2.97
retrieving revision 1.1.2.98
diff -u -d -r1.1.2.97 -r1.1.2.98
--- poppler_viewer.c 31 Mar 2012 01:11:37 -0000 1.1.2.97
+++ poppler_viewer.c 31 Mar 2012 01:20:42 -0000 1.1.2.98
@@ -91,48 +91,44 @@
const gchar *plugin_version(void);
struct PluginFeature *plugin_provides(void);
-
+#ifndef POPPLER_WITH_GDK
static void
copy_cairo_surface_to_pixbuf (cairo_surface_t *surface,
GdkPixbuf *pixbuf)
{
- int cairo_width, cairo_height, cairo_rowstride;
- unsigned char *pixbuf_data, *dst, *cairo_data;
- int pixbuf_rowstride, pixbuf_n_channels;
- unsigned int *src;
- int x, y;
+ int cairo_width, cairo_height, cairo_rowstride;
+ unsigned char *pixbuf_data, *dst, *cairo_data;
+ int pixbuf_rowstride, pixbuf_n_channels;
+ unsigned int *src;
+ int x, y;
- cairo_width = cairo_image_surface_get_width (surface);
- cairo_height = cairo_image_surface_get_height (surface);
- cairo_rowstride = cairo_image_surface_get_stride (surface);
- cairo_data = cairo_image_surface_get_data (surface);
+ cairo_width = cairo_image_surface_get_width (surface);
+ cairo_height = cairo_image_surface_get_height (surface);
+ cairo_rowstride = cairo_image_surface_get_stride (surface);
+ cairo_data = cairo_image_surface_get_data (surface);
- pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
- pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
- pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
+ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
+ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
- if (cairo_width > gdk_pixbuf_get_width (pixbuf))
- cairo_width = gdk_pixbuf_get_width (pixbuf);
- if (cairo_height > gdk_pixbuf_get_height (pixbuf))
- cairo_height = gdk_pixbuf_get_height (pixbuf);
- for (y = 0; y < cairo_height; y++)
- {
- src = (unsigned int *) (cairo_data + y * cairo_rowstride);
- dst = pixbuf_data + y * pixbuf_rowstride;
- for (x = 0; x < cairo_width; x++)
- {
- dst[0] = (*src >> 16) & 0xff;
- dst[1] = (*src >> 8) & 0xff;
- dst[2] = (*src >> 0) & 0xff;
- if (pixbuf_n_channels == 4)
- dst[3] = (*src >> 24) & 0xff;
- dst += pixbuf_n_channels;
- src++;
- }
+ if (cairo_width > gdk_pixbuf_get_width (pixbuf))
+ cairo_width = gdk_pixbuf_get_width (pixbuf);
+ if (cairo_height > gdk_pixbuf_get_height (pixbuf))
+ cairo_height = gdk_pixbuf_get_height (pixbuf);
+ for (y = 0; y < cairo_height; y++) {
+ src = (unsigned int *) (cairo_data + y * cairo_rowstride);
+ dst = pixbuf_data + y * pixbuf_rowstride;
+ for (x = 0; x < cairo_width; x++) {
+ dst[0] = (*src >> 16) & 0xff;
+ dst[1] = (*src >> 8) & 0xff;
+ dst[2] = (*src >> 0) & 0xff;
+ if (pixbuf_n_channels == 4)
+ dst[3] = (*src >> 24) & 0xff;
+ dst += pixbuf_n_channels;
+ src++;
+ }
}
}
-
-#ifndef POPPLER_WITH_GDK
static void
_poppler_page_render_to_pixbuf (PopplerPage *page,
int src_x, int src_y,
More information about the Commits
mailing list