[cairo-commit] 5 commits - src/cairo.c src/cairo-font-options.c src/cairo.h src/cairo-image-surface.c src/cairo-misc.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jun 3 02:52:10 PDT 2009


 src/cairo-font-options.c  |    2 +-
 src/cairo-image-surface.c |    2 +-
 src/cairo-misc.c          |   12 ++++++------
 src/cairo.c               |   21 ++++++++-------------
 src/cairo.h               |    4 ++--
 5 files changed, 18 insertions(+), 23 deletions(-)

New commits:
commit c988dc3719e345f6e1db6b0d656077a6b253b26d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 3 10:51:23 2009 +0100

    [cairo] Doc typo.
    
    Fix conflicting sentence as pointed out by
    https://bugs.freedesktop.org/show_bug.cgi?id=20183

diff --git a/src/cairo.c b/src/cairo.c
index c884db1..bb30e9a 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -3788,10 +3788,6 @@ cairo_get_group_target (cairo_t *cr)
  *    would be returned by cairo_status().</listitem>
  * </orderedlist>
  *
- * In either case, <literal>path->status</literal> will be set to
- * %CAIRO_STATUS_NO_MEMORY (regardless of what the error status in
- * @cr might have been).
- *
  * Return value: the copy of the current path. The caller owns the
  * returned object and should call cairo_path_destroy() when finished
  * with it.
commit 35d0dd00c9f21cc4fd392d4627756f8d5b53a11b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 3 10:49:16 2009 +0100

    [image] Doc typo.
    
    Correct parameter reference as pointed out by
    https://bugs.freedesktop.org/show_bug.cgi?id=20182

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index e37fa87..8c9df5a 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -449,7 +449,7 @@ slim_hidden_def (cairo_format_stride_for_width);
  * Creates an image surface for the provided pixel data. The output
  * buffer must be kept around until the #cairo_surface_t is destroyed
  * or cairo_surface_finish() is called on the surface.  The initial
- * contents of @buffer will be used as the initial image contents; you
+ * contents of @data will be used as the initial image contents; you
  * must explicitly clear the buffer, using, for example,
  * cairo_rectangle() and cairo_fill() if you want it cleared.
  *
commit 58459ac6435a2889b90580ddf00e69107361f431
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 3 10:45:51 2009 +0100

    [font-options] Doc typo
    
    Remove duplicate 'with' as pointed out by
    https://bugs.freedesktop.org/show_bug.cgi?id=20180

diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index dedd337..b2cb230 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -132,7 +132,7 @@ cairo_font_options_copy (const cairo_font_options_t *original)
  * cairo_font_options_destroy:
  * @options: a #cairo_font_options_t
  *
- * Destroys a #cairo_font_options_t object created with with
+ * Destroys a #cairo_font_options_t object created with
  * cairo_font_options_create() or cairo_font_options_copy().
  **/
 void
commit 8d39dee8e2aea2200fec460e8540838ec29cae5f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 3 10:40:38 2009 +0100

    [cairo] Update documentation for bug 20154
    
    Several typographical errors were pointed out in
    https://bugs.freedesktop.org/show_bug.cgi?id=20154

diff --git a/src/cairo.c b/src/cairo.c
index 2108a3b..c884db1 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -430,7 +430,7 @@ cairo_push_group (cairo_t *cr)
 /**
  * cairo_push_group_with_content:
  * @cr: a cairo context
- * @content: a %#cairo_content_t indicating the type of group that
+ * @content: a #cairo_content_t indicating the type of group that
  *           will be created
  *
  * Temporarily redirects drawing to an intermediate surface known as a
@@ -946,7 +946,7 @@ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule)
  * stroking operation, not the user space and CTM in effect at the
  * time of the call to cairo_set_line_width(). The simplest usage
  * makes both of these spaces identical. That is, if there is no
- * change to the CTM between a call to cairo_set_line_with() and the
+ * change to the CTM between a call to cairo_set_line_width() and the
  * stroking operation, then one can just pass user-space values to
  * cairo_set_line_width() and ignore this note.
  *
@@ -1064,7 +1064,7 @@ slim_hidden_def (cairo_set_line_join);
  *
  * If any value in @dashes is negative, or if all values are 0, then
  * @cr will be put into an error state with a status of
- * #%CAIRO_STATUS_INVALID_DASH.
+ * %CAIRO_STATUS_INVALID_DASH.
  **/
 void
 cairo_set_dash (cairo_t	     *cr,
@@ -2332,10 +2332,9 @@ cairo_in_fill (cairo_t *cr, double x, double y)
  *
  * Computes a bounding box in user coordinates covering the area that
  * would be affected, (the "inked" area), by a cairo_stroke()
- * operation operation given the current path and stroke
- * parameters. If the current path is empty, returns an empty
- * rectangle ((0,0), (0,0)). Surface dimensions and clipping are not
- * taken into account.
+ * operation given the current path and stroke parameters.
+ * If the current path is empty, returns an empty rectangle ((0,0), (0,0)).
+ * Surface dimensions and clipping are not taken into account.
  *
  * Note that if the line width is set to exactly zero, then
  * cairo_stroke_extents() will return an empty rectangle. Contrast with
@@ -2473,10 +2472,10 @@ cairo_clip (cairo_t *cr)
  * effectively masking out any changes to the surface that are outside
  * the current clip region.
  *
- * Calling cairo_clip() can only make the clip region smaller, never
+ * Calling cairo_clip_preserve() can only make the clip region smaller, never
  * larger. But the current clip is part of the graphics state, so a
  * temporary restriction of the clip region can be achieved by
- * calling cairo_clip() within a cairo_save()/cairo_restore()
+ * calling cairo_clip_preserve() within a cairo_save()/cairo_restore()
  * pair. The only other means of increasing the size of the clip
  * region is cairo_reset_clip().
  **/
commit 73469e693c02e6a99a32f12ac333737b47408e5e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 3 09:51:52 2009 +0100

    [cairo] Tweak error strings.
    
    Rewrite a few error strings so that they more closer match the
    documentation. Where they differ, I believe I have chosen the more
    informative combination of the two texts.

diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index 20f0ef1..8d9557e 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -58,13 +58,13 @@ cairo_status_to_string (cairo_status_t status)
 {
     switch (status) {
     case CAIRO_STATUS_SUCCESS:
-	return "success";
+	return "no error has occurred";
     case CAIRO_STATUS_NO_MEMORY:
 	return "out of memory";
     case CAIRO_STATUS_INVALID_RESTORE:
-	return "cairo_restore without matching cairo_save";
+	return "cairo_restore() without matching cairo_save()";
     case CAIRO_STATUS_INVALID_POP_GROUP:
-	return "cairo_pop_group without matching cairo_push_group";
+	return "no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group()";
     case CAIRO_STATUS_NO_CURRENT_POINT:
 	return "no current point defined";
     case CAIRO_STATUS_INVALID_MATRIX:
@@ -118,11 +118,11 @@ cairo_status_to_string (cairo_status_t status)
     case CAIRO_STATUS_INVALID_CLUSTERS:
 	return "input clusters do not represent the accompanying text and glyph arrays";
     case CAIRO_STATUS_INVALID_SLANT:
-	return "invalid value for an input #cairo_font_slant_t";
+	return "invalid value for an input cairo_font_slant_t";
     case CAIRO_STATUS_INVALID_WEIGHT:
-	return "invalid value for an input #cairo_font_weight_t";
+	return "invalid value for an input cairo_font_weight_t";
     case CAIRO_STATUS_INVALID_SIZE:
-	return "invalid value for the size of the input (surface, pattern, etc.)";
+	return "invalid value (typically too big) for the size of the input (surface, pattern, etc.)";
     case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED:
 	return "user-font method not implemented";
     default:
diff --git a/src/cairo.h b/src/cairo.h
index b9c47db..2fef37c 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -210,7 +210,7 @@ typedef struct _cairo_user_data_key {
  * @CAIRO_STATUS_SUCCESS: no error has occurred
  * @CAIRO_STATUS_NO_MEMORY: out of memory
  * @CAIRO_STATUS_INVALID_RESTORE: cairo_restore() called without matching cairo_save()
- * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop
+ * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group()
  * @CAIRO_STATUS_NO_CURRENT_POINT: no current point defined
  * @CAIRO_STATUS_INVALID_MATRIX: invalid matrix (not invertible)
  * @CAIRO_STATUS_INVALID_STATUS: invalid value for an input #cairo_status_t
@@ -239,7 +239,7 @@ typedef struct _cairo_user_data_key {
  * @CAIRO_STATUS_INVALID_CLUSTERS: input clusters do not represent the accompanying text and glyph array (Since 1.8)
  * @CAIRO_STATUS_INVALID_SLANT: invalid value for an input #cairo_font_slant_t (Since 1.8)
  * @CAIRO_STATUS_INVALID_WEIGHT: invalid value for an input #cairo_font_weight_t (Since 1.8)
- * @CAIRO_STATUS_INVALID_SIZE: invalid value (typically too big) for a size (Since 1.10)
+ * @CAIRO_STATUS_INVALID_SIZE: invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)
  * @CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: user-font method not implemented (Since 1.10)
  * @CAIRO_STATUS_LAST_STATUS: this is a special value indicating the number of
  *   status values defined in this enumeration.  When using this value, note


More information about the cairo-commit mailing list