diff --git a/cogl/cogl-path.h b/cogl/cogl-path.h index 4037cc374..8e81cb397 100644 --- a/cogl/cogl-path.h +++ b/cogl/cogl-path.h @@ -54,9 +54,25 @@ G_BEGIN_DECLS /** * cogl_path_fill: * - * Fills the constructed shape using the current drawing color. The - * current path is then cleared. To use the path again, call - * cogl_path_fill_preserve() instead. + * Fills the interior of the constructed shape using the current + * drawing color. The current path is then cleared. To use the path + * again, call cogl_path_fill_preserve() instead. + * + * The interior of the shape is determined using the 'even-odd' + * rule. Any open sub-paths are treated as if there is an extra line + * joining the last point and first point. You can work out whether + * any point in the stage will be filled if you imagine drawing an + * infinitely long line in any direction from that point and then + * counting the number times it crosses a line in the path. If the + * number is odd it will be filled, otherwise it will not. + * + * See for a demonstration of the fill + * rule. + * + *
+ * Example of filling various paths + * + *
**/ void cogl_path_fill (void); @@ -64,8 +80,10 @@ cogl_path_fill (void); /** * cogl_path_fill_preserve: * - * Fills the constructed shape using the current drawing color and - * preserves the path to be used again. + * Fills the interior of the constructed shape using the current + * drawing color and preserves the path to be used again. See + * cogl_path_fill() for a description what is considered the interior + * of the shape. * * Since: 1.0 **/ diff --git a/doc/reference/cogl/Makefile.am b/doc/reference/cogl/Makefile.am index c6cbe11f4..c0d9b22fa 100644 --- a/doc/reference/cogl/Makefile.am +++ b/doc/reference/cogl/Makefile.am @@ -90,7 +90,8 @@ EXTRA_HFILES= # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png -HTML_IMAGES= +HTML_IMAGES = \ + fill-rule.png # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). # e.g. content_files=running.sgml building.sgml changes-2.0.sgml @@ -117,3 +118,6 @@ include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in + +EXTRA_DIST += \ + fill-rule.png diff --git a/doc/reference/cogl/fill-rule.png b/doc/reference/cogl/fill-rule.png new file mode 100644 index 000000000..1e4fbb0f2 Binary files /dev/null and b/doc/reference/cogl/fill-rule.png differ