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

Carl Worth cworth at freedesktop.org
Sat May 28 21:40:45 PDT 2011


 src/tutorial.mdwn |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b933ce09772d8aa3fffbdbba0a9cae4d8e029581
Author: noel_s_cruz <noel_s_cruz at web>
Date:   Sat May 28 21:40:44 2011 -0700

    make it more intuitive

diff --git a/src/tutorial.mdwn b/src/tutorial.mdwn
index caa4103..2dd1076 100644
--- a/src/tutorial.mdwn
+++ b/src/tutorial.mdwn
@@ -158,7 +158,10 @@ transfer through the mask in a thin (or thick) line around the path,
 according to the pen's
 [line width](http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-width),
 [dash style](http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-dash),
-and [line caps](http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-cap).
+and [line caps](http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-cap). Code stroke.c that uses this snippet is given by figure to the right. You may have to adjust cairo_rectangle's arguments to more intuitive or bigger values or make use of cairo_scale because it will draw an extremely small rectangle that is barely visible. Pasting this snippet to replace the text function calls in the sample FAQ's hello.c will yield no visible rectangle so you have to insert cairo_scale (cr, 120, 120);. When it doesn't work the first time, you may be tempted to insert a path creation code from API reference manual on Paths but don't like:<br><br>
+   cairo_path_t *path;<br>
+   cairo_path_data_t *data;<br>
+   path = cairo_copy_path (cr);
 
 	cairo_set_line_width (cr, 0.1);
 	cairo_set_source_rgb (cr, 0, 0, 0);


More information about the cairo-commit mailing list