[cairo-commit] [cairo-www] 3 commits - src/cairoglyphics.mdwn src/tutorial.mdwn

Carl Worth cworth at freedesktop.org
Tue Jun 21 14:16:32 PDT 2011


Rebased ref, commits from common ancestor:
commit 4df2151b0329ab5abdaa1e0be2458ee354815550
Author: Nis Martensen <nis.martensen at web.de>
Date:   Sat Jun 4 17:38:33 2011 +0200

    Tutorial: try to avoid confusion
    
    The recent web commit "make it more intuitive" indicates that there are
    people who try to insert the code snippets from the tutorial into the
    sample from the FAQ, and do not get the results they expect. So let's
    hint at the sample code behind the figure again.
    
    Also refer to the transform section further below instead of mentioning
    more path creation API details, as this might be even more confusing at
    this stage of the tutorial.

diff --git a/src/tutorial.mdwn b/src/tutorial.mdwn
index 2dd1076..b5a9e10 100644
--- a/src/tutorial.mdwn
+++ b/src/tutorial.mdwn
@@ -158,10 +158,13 @@ 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). 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);
+and [line caps](http://www.cairographics.org/manual/cairo-cairo-t.html#cairo-set-line-cap).
+
+Note: To see the code snippet in action, use the stroke.c file linked
+from the figure to the right. Just pasting the snippet into the FAQ's
+hello.c might give unexpected results due to different scaling. Read on;
+scaling is explained in section <a href="#L1transforms">Working with
+Transforms</a> below.
 
 	cairo_set_line_width (cr, 0.1);
 	cairo_set_source_rgb (cr, 0, 0, 0);
commit 25a9a9b0a756a324c941d6e25c031ef6dd01cb1b
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);
commit 7fd57ef1f26a3fa8968d68cd53fe7c6d195b8bd8
Author: ranma42 <ranma42 at web>
Date:   Mon May 23 03:00:10 2011 -0700

    Update link

diff --git a/src/cairoglyphics.mdwn b/src/cairoglyphics.mdwn
index 940dbcd..ad7e16f 100644
--- a/src/cairoglyphics.mdwn
+++ b/src/cairoglyphics.mdwn
@@ -2,7 +2,7 @@
 
 When I can figure out how to host images and SVG files here, I'll decorate. In the meantime, you can get the diagrams from the link below.
 
-<http://www.akaafrica.com/wiki_new/index.php/CairoTutorial:The_files_are_here>
+<http://otherwiseingle.blogspot.com/2008/01/cairoglyphics-version-20.html>
 
 Back to docs:
-[[documentation]]
\ No newline at end of file
+[[documentation]]


More information about the cairo-commit mailing list