[cairo-commit]
pycairo/examples gradient.py, 1.7, 1.8 warpedtext.py, 1.12, 1.13
Steve Chaplin
commit at pdx.freedesktop.org
Mon Aug 29 07:52:32 PDT 2005
Committed by: stevech1097
Update of /cvs/cairo/pycairo/examples
In directory gabe:/tmp/cvs-serv22702/examples
Modified Files:
gradient.py warpedtext.py
Log Message:
'SC'
Index: gradient.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/gradient.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gradient.py 7 May 2005 04:28:06 -0000 1.7
+++ gradient.py 29 Aug 2005 14:52:30 -0000 1.8
@@ -12,7 +12,7 @@
ctx.scale (WIDTH/1.0, HEIGHT/1.0)
-pat = cairo.Pattern.create_linear(0.0, 0.0, 0.0, 1.0)
+pat = cairo.LinearGradient (0.0, 0.0, 0.0, 1.0)
pat.add_color_stop_rgba (1, 0, 0, 0, 1)
pat.add_color_stop_rgba (0, 1, 1, 1, 1)
@@ -20,8 +20,8 @@
ctx.set_source (pat)
ctx.fill ()
-pat = cairo.Pattern.create_radial (0.45, 0.4, 0.1,
- 0.4, 0.4, 0.5)
+pat = cairo.RadialGradient (0.45, 0.4, 0.1,
+ 0.4, 0.4, 0.5)
pat.add_color_stop_rgba (0, 1, 1, 1, 1)
pat.add_color_stop_rgba (1, 0, 0, 0, 1)
Index: warpedtext.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/warpedtext.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- warpedtext.py 12 May 2005 00:00:08 -0000 1.12
+++ warpedtext.py 29 Aug 2005 14:52:30 -0000 1.13
@@ -13,18 +13,18 @@
first = False
x, y = function(*points)
ctx.move_to(x, y)
-
+
elif type == cairo.PATH_LINE_TO:
x, y = function(*points)
ctx.line_to(x, y)
-
+
elif type == cairo.PATH_CURVE_TO:
x1, y1, x2, y2, x3, y3 = points
x1, y1 = function(x1, y1)
x2, y2 = function(x2, y2)
x3, y3 = function(x3, y3)
ctx.curve_to(x1, y1, x2, y2, x3, y3)
-
+
elif type == cairo.PATH_CLOSE_PATH:
ctx.close_path()
@@ -50,7 +50,7 @@
solidpattern = ctx.get_source()
# background
-pat = cairo.Pattern.create_linear(0.0, 0.0, 0, Height)
+pat = cairo.LinearGradient (0.0, 0.0, 0, Height)
pat.add_color_stop_rgba (1, 0, 0, 0, 1)
pat.add_color_stop_rgba (0, 1, 1, 1, 1)
More information about the cairo-commit
mailing list