[cairo-commit] src/cairo-pattern.c

Bryce Harrington bryce at kemper.freedesktop.org
Mon May 12 10:29:11 PDT 2014


 src/cairo-pattern.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 85b05e84acd89b08e5e72849133ae84cf2cdcb54
Author: jimmyfrasche <soapboxcicero at gmail.com>
Date:   Sun May 11 20:06:17 2014 -0700

    Pattern document clarification
    
    Replaces documentation of the form "range 0 to 1 less than the number"
    with "ranges from 0 to n-1 where n is the number", which is idiomatic
    mathematical writing and less ambiguous.
    
    Signed-off-by: jimmyfrasche <soapboxcicero at gmail.com>
    Reviewed-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 57b930b..e104440 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -51,8 +51,8 @@
  * @See_Also: #cairo_t, #cairo_surface_t
  *
  * #cairo_pattern_t is the paint with which cairo draws.
- * The primary use of patterns is as the source for all cairo drawing 
- * operations, although they can also be used as masks, that is, as the 
+ * The primary use of patterns is as the source for all cairo drawing
+ * operations, although they can also be used as masks, that is, as the
  * brush too.
  *
  * A cairo pattern is created by using one of the many constructors,
@@ -4032,7 +4032,7 @@ cairo_pattern_get_rgba (cairo_pattern_t *pattern,
  * cairo_pattern_get_surface:
  * @pattern: a #cairo_pattern_t
  * @surface: return value for surface of pattern, or %NULL
- * 
+ *
  * Gets the surface of a surface pattern.  The reference returned in
  * @surface is owned by the pattern; the caller should call
  * cairo_surface_reference() if the surface is to be retained.
@@ -4072,8 +4072,9 @@ cairo_pattern_get_surface (cairo_pattern_t *pattern,
  * @alpha: return value for alpha component of color, or %NULL
  *
  * Gets the color and offset information at the given @index for a
- * gradient pattern.  Values of @index are 0 to 1 less than the number
- * returned by cairo_pattern_get_color_stop_count().
+ * gradient pattern.  Values of @index range from 0 to n-1
+ * where n is the number returned
+ * by cairo_pattern_get_color_stop_count().
  *
  * Return value: %CAIRO_STATUS_SUCCESS, or %CAIRO_STATUS_INVALID_INDEX
  * if @index is not valid for the given pattern.  If the pattern is
@@ -4283,7 +4284,7 @@ slim_hidden_def (cairo_mesh_pattern_get_patch_count);
  * Gets path defining the patch @patch_num for a mesh
  * pattern.
  *
- * @patch_num can range 0 to 1 less than the number returned by
+ * @patch_num can range from 0 to n-1 where n is the number returned by
  * cairo_mesh_pattern_get_patch_count().
  *
  * Return value: the path defining the patch, or a path with status
@@ -4376,7 +4377,7 @@ slim_hidden_def (cairo_mesh_pattern_get_path);
  * Gets the color information in corner @corner_num of patch
  * @patch_num for a mesh pattern.
  *
- * @patch_num can range 0 to 1 less than the number returned by
+ * @patch_num can range from 0 to n-1 where n is the number returned by
  * cairo_mesh_pattern_get_patch_count().
  *
  * Valid values for @corner_num are from 0 to 3 and identify the
@@ -4442,7 +4443,7 @@ slim_hidden_def (cairo_mesh_pattern_get_corner_color_rgba);
  * Gets the control point @point_num of patch @patch_num for a mesh
  * pattern.
  *
- * @patch_num can range 0 to 1 less than the number returned by
+ * @patch_num can range from 0 to n-1 where n is the number returned by
  * cairo_mesh_pattern_get_patch_count().
  *
  * Valid values for @point_num are from 0 to 3 and identify the


More information about the cairo-commit mailing list