[cairo-commit] pycairo/examples/cairo_snippets snippets_gtk.py, 1.12, 1.13

Steve Chaplin commit at pdx.freedesktop.org
Fri Jan 20 01:55:18 PST 2006


Committed by: stevech1097

Update of /cvs/cairo/pycairo/examples/cairo_snippets
In directory gabe:/tmp/cvs-serv31822/examples/cairo_snippets

Modified Files:
	snippets_gtk.py 
Log Message:
'SC'

Index: snippets_gtk.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets_gtk.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- snippets_gtk.py	29 Aug 2005 02:31:19 -0000	1.12
+++ snippets_gtk.py	20 Jan 2006 09:55:16 -0000	1.13
@@ -62,16 +62,10 @@
     def da_expose_event (self, da, event, data=None):
         x, y, width, height = da.allocation
 
-        if gtk.pygtk_version >= (2,7,0):
-            cr = da.window.cairo_create()
-        else:
+        if gtk.pygtk_version < (2,7,0):
             cr = cairo.gtk.gdk_cairo_create (da.window)
-
-        # set window bg
-        cr.set_source_rgb (*self._bg_rgb)
-        cr.rectangle(0, 0, width, height)
-        cr.fill()
-        cr.set_source_rgb (0,0,0) # reset black
+        else:
+            cr = da.window.cairo_create()
 
         try:
             exec (self.snippet_str, globals(), locals())



More information about the cairo-commit mailing list