[cairo-commit] pycairo/examples/gtk png_view.py, 1.7, 1.8 cairo-knockout.py, 1.8, 1.9

Steve Chaplin commit at pdx.freedesktop.org
Wed May 18 21:47:58 PDT 2005


Committed by: stevech1097

Update of /cvs/cairo/pycairo/examples/gtk
In directory gabe:/tmp/cvs-serv29955/examples/gtk

Modified Files:
	png_view.py cairo-knockout.py 
Log Message:
SC

Index: png_view.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/gtk/png_view.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- png_view.py	16 May 2005 01:04:34 -0000	1.7
+++ png_view.py	19 May 2005 04:47:56 -0000	1.8
@@ -22,8 +22,8 @@
 filename = sys.argv[1]
 
 surface = cairo.ImageSurface.create_from_png(filename)
-Width  = surface.width
-Height = surface.height
+Width  = surface.get_width()
+Height = surface.get_height()
 
 win = gtk.Window()
 win.connect('destroy', lambda x: gtk.main_quit())

Index: cairo-knockout.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/gtk/cairo-knockout.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cairo-knockout.py	16 May 2005 01:04:34 -0000	1.8
+++ cairo-knockout.py	19 May 2005 04:47:56 -0000	1.9
@@ -67,9 +67,10 @@
     xc = width / 2.
     yc = height / 2.
     
-    overlay = ctx.target.create_similar(cairo.FORMAT_ARGB32, width, height)
-    punch   = ctx.target.create_similar(cairo.FORMAT_A8,     width, height)
-    circles = ctx.target.create_similar(cairo.FORMAT_ARGB32, width, height)
+    target  = ctx.get_target()
+    overlay = target.create_similar(cairo.FORMAT_ARGB32, width, height)
+    punch   = target.create_similar(cairo.FORMAT_A8,     width, height)
+    circles = target.create_similar(cairo.FORMAT_ARGB32, width, height)
 
     fill_checks(ctx, 0, 0, width, height)
 




More information about the cairo-commit mailing list