From 4d28b2aff5fb4699d60c9d193b3b16db71d03b07 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sun, 20 Nov 2011 22:25:02 +0000 Subject: scale pixbufs in insert_image --- (limited to 'TurtleArt') diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index d837f3c..8f2b599 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -572,7 +572,11 @@ class LogoCode: w, h = self.wpercent(), self.hpercent() if w < 1 or h < 1: return - if not pixbuf and self.dsobject is not None: + if pixbuf: # We may have to rescale the picture + if w != self.pixbuf.get_width() or h != self.pixbuf.get_height(): + self.pixbuf = self.pixbuf.scale_simple( + w, h, gtk.gdk.INTERP_BILINEAR) + elif self.dsobject is not None: try: self.pixbuf = get_pixbuf_from_journal(self.dsobject, w, h) except: -- cgit v0.9.1