[cairo-commit] [cairo-www] src/quickframework.mdwn

Carl Worth cworth at freedesktop.org
Thu Nov 8 21:19:10 PST 2007


 src/quickframework.mdwn |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 126178ad45acea19a1b4c3c09b194268b19987bc
Author: Donn <donn.ingle at gmail.com>
Date:   Thu Nov 8 21:19:10 2007 -0800

    Added link to author

diff --git a/src/quickframework.mdwn b/src/quickframework.mdwn
index 91358c2..5718910 100644
--- a/src/quickframework.mdwn
+++ b/src/quickframework.mdwn
@@ -1,6 +1,8 @@
-##A Quick GTK GNU/Linux Framework
+##A Quick GTK+ GNU/Linux Framework
 
-I can't recall where I got this online, but it's handy for running snippets of cairo code to see what's going on.
+I got this from <http://www.tortall.net/mu/wiki/PyGTKCairoTutorial> : it's handy for running snippets of cairo code to see what's going on.
+
+This sample shows how to use a mask (a second source to filter the first source.)
 
 
     #! /usr/bin/env python
@@ -42,16 +44,18 @@ I can't recall where I got this online, but it's handy for running snippets of c
         window.add(widget)
         window.present()
         gtk.main()
+
+
     
-    #######################
     ## Do all your testing in Shapes ##
-    #######################
+
+
     
     class Shapes(Screen):
         def draw(self, cr, width, height):
             
             ## This will draw using a mask.
-            cr.scale(width,height)
+            cr.scale(width,height) #Without this line the mask does not seem to work!
             self.linear = cairo.LinearGradient(0, 0, 1, 1)
             self.linear.add_color_stop_rgb(0, 0, 0.3, 0.8)
             self.linear.add_color_stop_rgb(1, 0, 0.8, 0.3)


More information about the cairo-commit mailing list