* [gentoo-commits] gentoo-x86 commit in app-text/pdfshuffler/files: pdfshuffler-poppler-0.18.patch
@ 2012-02-29 23:54 Marien Zwart (marienz)
0 siblings, 0 replies; 2+ messages in thread
From: Marien Zwart (marienz) @ 2012-02-29 23:54 UTC (permalink / raw
To: gentoo-commits
marienz 12/02/29 23:54:21
Added: pdfshuffler-poppler-0.18.patch
Log:
Add a patch to work with poppler >= 0.18, based on a patch by Rafał Mużyło in bug #390607.
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Revision Changes Path
1.1 app-text/pdfshuffler/files/pdfshuffler-poppler-0.18.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/pdfshuffler/files/pdfshuffler-poppler-0.18.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/pdfshuffler/files/pdfshuffler-poppler-0.18.patch?rev=1.1&content-type=text/plain
Index: pdfshuffler-poppler-0.18.patch
===================================================================
Stop using render_to_pixbuf, removed from Poppler 0.18.
Instead draw to a gdk Pixmap, then get a Pixbuf from that.
A more complete fix (dropping Pixmap/Pixbuf usage) is in upstream svn,
but that is too large a change for us to take.
Based on a patch from Rafał Mużyło in gentoo bug #390607.
--- pdfshuffler
+++ pdfshuffler
@@ -982,9 +982,15 @@
pix_w, pix_h = page.get_size()
pix_w = int(pix_w * self.scale)
pix_h = int(pix_h * self.scale)
- thumbnail = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False,
- 8, pix_w , pix_h)
- page.render_to_pixbuf(0,0,pix_w,pix_h,self.scale,0,thumbnail)
+ pixmap = gtk.gdk.Pixmap(None, pix_w, pix_h, 24)
+ cr = pixmap.cairo_create()
+ # The pixmap data is not initialized, so paint it white first:
+ cr.set_source_rgb(1, 1, 1)
+ cr.paint()
+ cr.scale(self.scale, self.scale)
+ page.render(cr)
+ thumbnail = gtk.gdk.pixbuf_get_from_drawable(
+ None, pixmap, gtk.gdk.colormap_get_system(), 0, 0, 0, 0, pix_w, pix_h)
rotation = (-rotation) % 360
rotation = ((rotation + 45) / 90) * 90
thumbnail = thumbnail.rotate_simple(rotation)
@@ -1003,11 +1009,13 @@
pix_w = thumbnail.get_width()
pix_h = thumbnail.get_height()
except:
+ import traceback
+ traceback.print_exc()
pix_w = self.default_width
pix_h = pix_w
thumbnail = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False,
8, pix_w, pix_h)
- pixbuf.fill(0xffffffff)
+ thumbnail.fill(0xffffffff)
#add border
thickness = 3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in app-text/pdfshuffler/files: pdfshuffler-poppler-0.18.patch
@ 2012-08-20 10:37 Michael Weber (xmw)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Weber (xmw) @ 2012-08-20 10:37 UTC (permalink / raw
To: gentoo-commits
xmw 12/08/20 10:37:23
Removed: pdfshuffler-poppler-0.18.patch
Log:
Drop old
(Portage version: 2.1.11.10/cvs/Linux x86_64)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-20 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-20 10:37 [gentoo-commits] gentoo-x86 commit in app-text/pdfshuffler/files: pdfshuffler-poppler-0.18.patch Michael Weber (xmw)
-- strict thread matches above, loose matches on Subject: below --
2012-02-29 23:54 Marien Zwart (marienz)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox