[cairo-commit] cairo/src cairo-gstate.c,1.179,1.180

Carl Worth commit at pdx.freedesktop.org
Mon Nov 7 09:30:40 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv29303/src

Modified Files:
	cairo-gstate.c 
Log Message:

2005-11-07  Carl Worth  <cworth at cworth.org>

        * src/cairo-gstate.c: Add documentation for _cairo_gstate_create,
        _cairo_gstate_init_copy, and _cairo_gstate_clone.


Index: cairo-gstate.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-gstate.c,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -d -r1.179 -r1.180
--- cairo-gstate.c	4 Nov 2005 19:16:39 -0000	1.179
+++ cairo-gstate.c	7 Nov 2005 17:30:38 -0000	1.180
@@ -61,6 +61,18 @@
 static void
 _cairo_gstate_unset_scaled_font (cairo_gstate_t *gstate);
 
+/**
+ * _cairo_gstate_create:
+ * @target: a #cairo_surface_t, not NULL
+ *
+ * Create a new #cairo_gstate_t to draw to target with all graphics
+ * state parameters set to defaults. gstate->next will be set to NULL
+ * and may be used by the caller to chain #cairo_gstate_t objects
+ * together.
+ *
+ * Return value: a new #cairo_gstate_t or NULL if there is
+ * insufficient memory.
+ **/
 cairo_gstate_t *
 _cairo_gstate_create (cairo_surface_t *target)
 {
@@ -125,6 +137,13 @@
     return CAIRO_STATUS_SUCCESS;
 }
 
+/**
+ * _cairo_gstate_init_copy:
+ *
+ * Initialize @gstate by performing a deep copy of state fields from
+ * @other. Note that gstate->next is not copied but is left
+ * unmodified, (yes, this behavior is bizarre.)
+ **/
 static cairo_status_t
 _cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
 {
@@ -190,6 +209,18 @@
     free (gstate);
 }
 
+/**
+ * _cairo_gstate_clone:
+ * @other: a #cairo_gstate_t to be copied, not NULL.
+ *
+ * Create a new #cairo_gstate_t setting all graphics state parameters
+ * to the same values as contained in @other. gstate->next will be set
+ * to NULL and may be used by the caller to chain cairo_gstate_t
+ * objects together.
+ *
+ * Return value: a new cairo_gstate_t or NULL if there is insufficient
+ * memory.
+ **/
 cairo_gstate_t*
 _cairo_gstate_clone (cairo_gstate_t *gstate)
 {



More information about the cairo-commit mailing list