Hook up the new screenshot code

This commit is contained in:
Marco Pesenti Gritti
2007-11-04 17:00:48 +01:00
parent cd61c52c7b
commit 108147a6b1
2 changed files with 19 additions and 28 deletions
-13
View File
@@ -114,16 +114,3 @@ class Window(gtk.Window):
self.tray.props.visible = not self.tray.props.visible
return True
return False
def get_canvas_screenshot(self):
if not self.canvas:
return None
window = self.canvas.window
width, height = window.get_size()
screenshot = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, has_alpha=False,
bits_per_sample=8, width=width, height=height)
screenshot.get_from_drawable(window, window.get_colormap(), 0, 0, 0, 0,
width, height)
return screenshot