[cairo-commit] pycairo/examples context-subclass.py, 1.4, 1.5 gradient.py, 1.5, 1.6 hering.py, 1.5, 1.6 warpedtext.py, 1.8, 1.9

Steve Chaplin commit at pdx.freedesktop.org
Tue Apr 26 20:54:04 PDT 2005


Committed by: stevech1097

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

Modified Files:
	context-subclass.py gradient.py hering.py warpedtext.py 
Log Message:
SC

Index: context-subclass.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/context-subclass.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- context-subclass.py	15 Apr 2005 03:25:37 -0000	1.4
+++ context-subclass.py	27 Apr 2005 03:54:02 -0000	1.5
@@ -43,9 +43,4 @@
 
 ctx.draw()
 
-try:
-    fileObject = file('context-subclass.png', 'wb')
-except IOError, exc:
-    raise SystemExit("%s: %s" % (exc.filename, exc.strerror))
-
-surface.write_png(fileObject)
+surface.write_to_png('context-subclass.png')

Index: gradient.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/gradient.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- gradient.py	15 Apr 2005 03:25:37 -0000	1.5
+++ gradient.py	27 Apr 2005 03:54:02 -0000	1.6
@@ -30,9 +30,4 @@
 ctx.arc (0.5, 0.5, 0.3, 0, 2 * math.pi)
 ctx.fill ()
 
-try:
-    fileObject = file('gradient.png', 'wb')
-except IOError, exc:
-    raise SystemExit("%s: %s" % (exc.filename, exc.strerror))
-
-surface.write_png(fileObject)
+surface.write_to_png('gradient.png')

Index: hering.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/hering.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hering.py	15 Apr 2005 03:25:37 -0000	1.5
+++ hering.py	27 Apr 2005 03:54:02 -0000	1.6
@@ -52,9 +52,4 @@
 
 draw_hering (ctx, WIDTH, HEIGHT)
 
-try:
-    fileObject = file('hering.png', 'wb')
-except IOError, exc:
-    raise SystemExit("%s: %s" % (exc.filename, exc.strerror))
-
-surface.write_png(fileObject)
+surface.write_to_png('hering.png')

Index: warpedtext.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/warpedtext.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- warpedtext.py	15 Apr 2005 03:25:37 -0000	1.8
+++ warpedtext.py	27 Apr 2005 03:54:02 -0000	1.9
@@ -90,10 +90,4 @@
 warp.warpPath()
 ctx.fill()
 
-
-try:
-    fileObject = file("warpedtext.png", 'wb')
-except IOError, exc:
-    raise SystemExit("%s: %s" % (exc.filename, exc.strerror))
-
-surface.write_png(fileObject)
+surface.write_to_png("warpedtext.png")




More information about the cairo-commit mailing list