Your message dated Tue, 27 Mar 2012 23:02:12 +0000
with message-id <[email protected]>
and subject line Bug#651851: fixed in apvlv 0.1.1-1.2
has caused the Debian Bug report #651851,
regarding Patch for porting to poppler 0.18
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
651851: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651851
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: apvlv
Version: 0.1.1-1.1
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch precise

Hello,

In http://bugs.debian.org/644447 there is some discussion about
updating poppler to 0.18 in Debian. This will cause some FTBFS. We are
doing the transition in Ubuntu now and want to forward patches so that
they are readily available in Ubuntu once 0.18 lands there. But this
patch works with poppler 0.16 just as well.

This is taken from upstream git head:

  
https://github.com/naihe2010/apvlv/commit/e5aec2fd102a0f041dc53f4aa8040ab89043e05d

apvlv does not have a patch system and is not 3.0 (quilt) yet, so I
applied it inline just as the existing code change.

Thanks for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
diff -u apvlv-0.1.1/debian/changelog apvlv-0.1.1/debian/changelog
--- apvlv-0.1.1/debian/changelog
+++ apvlv-0.1.1/debian/changelog
@@ -1,3 +1,11 @@
+apvlv (0.1.1-1.1ubuntu1) precise; urgency=low
+
+  * src/ApvlvFile.cpp Add poppler_render_to_pixbuf function for poppler
+    without gdkpixbuf support (>= 0.17). Patch backported from upstream git
+    head (e5aec2fd1).
+
+ -- Martin Pitt <[email protected]>  Mon, 12 Dec 2011 16:54:41 +0100
+
 apvlv (0.1.1-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u apvlv-0.1.1/src/ApvlvFile.cpp apvlv-0.1.1/src/ApvlvFile.cpp
--- apvlv-0.1.1/src/ApvlvFile.cpp
+++ apvlv-0.1.1/src/ApvlvFile.cpp
@@ -39,6 +39,141 @@
 #include <iostream>
 #include <fstream>
 
+#ifndef POPPLER_WITH_GDK
+#include <goo/gtypes.h>
+
+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;
+
+  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);
+
+  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++;
+       }
+    }
+}
+
+static void
+_poppler_page_render_to_pixbuf (PopplerPage *page,
+                               int src_x, int src_y,
+                               int src_width, int src_height,
+                               double scale,
+                               int rotation,
+                               GBool printing,
+                               GdkPixbuf *pixbuf)
+{
+  cairo_t *cr;
+  cairo_surface_t *surface;
+
+  surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+                                       src_width, src_height);
+  cr = cairo_create (surface);
+  cairo_save (cr);
+  switch (rotation) {
+  case 90:
+         cairo_translate (cr, src_x + src_width, -src_y);
+         break;
+  case 180:
+         cairo_translate (cr, src_x + src_width, src_y + src_height);
+         break;
+  case 270:
+         cairo_translate (cr, -src_x, src_y + src_height);
+         break;
+  default:
+         cairo_translate (cr, -src_x, -src_y);
+  }
+
+  if (scale != 1.0)
+         cairo_scale (cr, scale, scale);
+
+  if (rotation != 0)
+         cairo_rotate (cr, rotation * G_PI / 180.0);
+
+  if (printing)
+         poppler_page_render_for_printing (page, cr);
+  else
+         poppler_page_render (page, cr);
+  cairo_restore (cr);
+
+  cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
+  cairo_set_source_rgb (cr, 1., 1., 1.);
+  cairo_paint (cr);
+
+  cairo_destroy (cr);
+
+  copy_cairo_surface_to_pixbuf (surface, pixbuf);
+  cairo_surface_destroy (surface);
+}
+
+/**
+ * poppler_page_render_to_pixbuf:
+ * @page: the page to render from
+ * @src_x: x coordinate of upper left corner  
+ * @src_y: y coordinate of upper left corner  
+ * @src_width: width of rectangle to render  
+ * @src_height: height of rectangle to render
+ * @scale: scale specified as pixels per point
+ * @rotation: rotate the document by the specified degree
+ * @pixbuf: pixbuf to render into
+ *
+ * First scale the document to match the specified pixels per point,
+ * then render the rectangle given by the upper left corner at
+ * (src_x, src_y) and src_width and src_height.
+ * This function is for rendering a page that will be displayed.
+ * If you want to render a page that will be printed use
+ * poppler_page_render_to_pixbuf_for_printing() instead
+ *
+ * Deprecated: 0.16
+ **/
+void
+poppler_page_render_to_pixbuf (PopplerPage *page,
+                              int src_x, int src_y,
+                              int src_width, int src_height,
+                              double scale,
+                              int rotation,
+                              GdkPixbuf *pixbuf)
+{
+  g_return_if_fail (POPPLER_IS_PAGE (page));
+  g_return_if_fail (scale > 0.0);
+  g_return_if_fail (pixbuf != NULL);
+
+  _poppler_page_render_to_pixbuf (page, src_x, src_y,
+                                 src_width, src_height,
+                                 scale, rotation,
+                                 gFalse,
+                                 pixbuf);
+}
+#endif
+
 namespace apvlv
   {
 #ifndef MAX

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Source: apvlv
Source-Version: 0.1.1-1.2

We believe that the bug you reported is fixed in the latest version of
apvlv, which is due to be installed in the Debian FTP archive:

apvlv_0.1.1-1.2.diff.gz
  to main/a/apvlv/apvlv_0.1.1-1.2.diff.gz
apvlv_0.1.1-1.2.dsc
  to main/a/apvlv/apvlv_0.1.1-1.2.dsc
apvlv_0.1.1-1.2_amd64.deb
  to main/a/apvlv/apvlv_0.1.1-1.2_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Pino Toscano <[email protected]> (supplier of updated apvlv package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 20 Mar 2012 23:11:31 +0100
Source: apvlv
Binary: apvlv
Architecture: source amd64
Version: 0.1.1-1.2
Distribution: unstable
Urgency: low
Maintainer: Lukas Gaertner <[email protected]>
Changed-By: Pino Toscano <[email protected]>
Description: 
 apvlv      - PDF viewer with Vim-like behaviour
Closes: 651851
Changes: 
 apvlv (0.1.1-1.2) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Add support for poppler >= 0.18. (Closes: #651851)
Checksums-Sha1: 
 087dcf0827ffd1747fe897233dd5254f9606fdab 1107 apvlv_0.1.1-1.2.dsc
 9d96cee262ad81752cc7b9963b72e0c4034ad3bc 7575 apvlv_0.1.1-1.2.diff.gz
 793530d3f792b05cfebc94fb7453c89e9f8f943d 186058 apvlv_0.1.1-1.2_amd64.deb
Checksums-Sha256: 
 71f2ab430f65ae6eda6da1fe82fc209bb763eceea2ee56e389af6c29c2581c24 1107 
apvlv_0.1.1-1.2.dsc
 a880e563c8bdd1a37525de8e8c6d81faa169046da40acd6e2cfb2a74a4ab83af 7575 
apvlv_0.1.1-1.2.diff.gz
 3e6adcf4b328c71c5f9b3a08e5e901132f22bde25ba259d3232c3a77d83becb9 186058 
apvlv_0.1.1-1.2_amd64.deb
Files: 
 dd44461f83255bb9e4abb590adf46798 1107 text extra apvlv_0.1.1-1.2.dsc
 1a25979f0eabbfb49b71ab77af4cd99d 7575 text extra apvlv_0.1.1-1.2.diff.gz
 6d2c58b5bed20a6facea5d27a67d057e 186058 text extra apvlv_0.1.1-1.2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iD8DBQFPaQT+TNH2piB/L3oRAiqmAKCjII1JemsIm9HrM2EZISsuYGIN7QCcD/yX
58NxgGJNz1HFTV4QhqhHAoQ=
=XlN6
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to