[cairo-commit] pycairo/examples gradient.py, 1.2, 1.3 warpedtext.py, 1.3, 1.4

Steve Chaplin commit at pdx.freedesktop.org
Mon Apr 4 06:51:22 PDT 2005


Committed by: stevech1097

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

Modified Files:
	gradient.py warpedtext.py 
Log Message:
SC 2005/04/04

Index: gradient.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/gradient.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gradient.py	30 Mar 2005 00:22:18 -0000	1.2
+++ gradient.py	4 Apr 2005 13:51:18 -0000	1.3
@@ -13,7 +13,7 @@
 
 ctx.scale (WIDTH/1.0, HEIGHT/1.0)
 
-pat = cairo.Pattern(x0=0.0, y0=0.0, x1=0.0, y1=1.0)
+pat = cairo.Pattern.create_linear(0.0, 0.0, 0.0, 1.0)
 pat.add_color_stop (1, 0, 0, 0, 1)
 pat.add_color_stop (0, 1, 1, 1, 1)
 
@@ -21,8 +21,8 @@
 ctx.set_pattern (pat)
 ctx.fill ()
 
-pat = cairo.Pattern (cx0=0.45, cy0=0.4, radius0=0.1,
-                     cx1=0.4,  cy1=0.4, radius1=0.5)
+pat = cairo.Pattern.create_radial (0.45, 0.4, 0.1,
+                                   0.4,  0.4, 0.5)
 pat.add_color_stop (0, 1, 1, 1, 1)
 pat.add_color_stop (1, 0, 0, 0, 1)
 

Index: warpedtext.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/warpedtext.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- warpedtext.py	30 Mar 2005 00:22:18 -0000	1.3
+++ warpedtext.py	4 Apr 2005 13:51:18 -0000	1.4
@@ -44,7 +44,7 @@
 solidpattern = ctx.pattern
 
 # background
-pat = cairo.Pattern(x0=0.0, y0=0.0, x1=0, y1=HEIGHT)
+pat = cairo.Pattern.create_linear(0.0, 0.0, 0, HEIGHT)
 pat.add_color_stop (1, 0, 0, 0, 1)
 pat.add_color_stop (0, 1, 1, 1, 1)
 




More information about the cairo-commit mailing list