[cairo-commit] [cairo-www] src/cookbook

Carl Worth cworth at freedesktop.org
Thu Aug 9 01:07:01 PDT 2007


 src/cookbook/convertctopyandback.mdwn |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 420b76f763f6ae1e79e0abc88d0af5d7acb986b1
Author: nis.martensen <nis.martensen at web.de>
Date:   Thu Aug 9 01:07:00 2007 -0700

    fix display of code lines and quote strings

diff --git a/src/cookbook/convertctopyandback.mdwn b/src/cookbook/convertctopyandback.mdwn
index 0c24532..ec58c91 100644
--- a/src/cookbook/convertctopyandback.mdwn
+++ b/src/cookbook/convertctopyandback.mdwn
@@ -1,17 +1,19 @@
-
 Converting cairo code between languages is very easy.
 
 ##C to Python
 
 the following C code:
+
 	cairo_new_path (cr);
 	cairo_move_to (cr, x + radius_x, y);
+
 to Python:
-        cr.new_path()
-        cr.move_to ( x + radius_x, y)
 
-* replace cairo_ with cr
-* remove cr as first argument
+	cr.new_path()
+	cr.move_to (x + radius_x, y)
+
+* replace "`cairo_`" with "`cr.`"
+* remove "`cr`" as first argument
 
 Note that in some instances the python bindings will try to simplify, and then a direct translation is not possible. In such a case refer to the source code of [[pycairo]], it is relatively easy to read.
 


More information about the cairo-commit mailing list