[cairo-commit] cairo/src cairo.c,1.110,1.111

Carl Worth commit at pdx.freedesktop.org
Wed Jun 22 17:09:10 PDT 2005


Committed by: cworth

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

Modified Files:
	cairo.c 
Log Message:

        * ROADMAP: Update ROADMAP with some comments on 0.5.2.

        * src/cairo.c: Add documentation for cairo_set_source_surface and
        fix some typos in other documentation blocks.


Index: cairo.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- cairo.c	20 Jun 2005 18:09:51 -0000	1.110
+++ cairo.c	23 Jun 2005 00:09:08 -0000	1.111
@@ -404,6 +404,29 @@
     _cairo_set_source_solid (cr, &color);
 }
 
+/**
+ * cairo_set_source_surface:
+ * @cr: a cairo context
+ * @surface: a surface to be used to set the source pattern
+ * @x: User-space X coordinate for surface origin
+ * @y: User-space Y coordinate for surface origin
+ * 
+ * This is a convenience function for creating a pattern from @surface
+ * and setting it as the source in @cr with cairo_set_source().
+ *
+ * The @x and @y parameters give the user-space coordinate at which
+ * the surface origin should appear. (The surface origin is its
+ * upper-left corner before any transformation has been applied.) The
+ * @x and @y patterns are negated and then set as translation values
+ * in the pattern matrix.
+ *
+ * Other than the initial translation pattern matrix, as described
+ * above, all other pattern attributes, (such as its extend mode), are
+ * set to the default values as in cairo_pattern_create_for_surface.
+ * The resulting pattern can be queried with cairo_get_source() so
+ * that these attributes can be modified if desired, (eg. to create a
+ * repeating pattern with cairo_pattern_set_extend()).
+ **/
 void
 cairo_set_source_surface (cairo_t	  *cr,
 			  cairo_surface_t *surface,
@@ -655,7 +678,7 @@
  * @tx: amount to translate in the X direction
  * @ty: amount to translate in the Y direction
  * 
- * Modifies the current transformation matrix (CTM) by tanslating the
+ * Modifies the current transformation matrix (CTM) by translating the
  * user-space origin by (@tx, @ty). This offset is interpreted as a
  * user-space coordinate according to the CTM in place before the new
  * call to cairo_translate. In other words, the translation of the
@@ -1538,7 +1561,7 @@
  *
  * Calling cairo_clip() can only make the clip region smaller, never
  * larger. But the current clip is part of the graphics state, so a
- * tempoarary restriction of the clip region can be achieved by
+ * temporary restriction of the clip region can be achieved by
  * calling cairo_clip() within a cairo_save()/cairo_restore()
  * pair. The only other means of increasing the size of the clip
  * region is cairo_reset_clip().
@@ -1568,7 +1591,7 @@
  *
  * Calling cairo_clip() can only make the clip region smaller, never
  * larger. But the current clip is part of the graphics state, so a
- * tempoarary restriction of the clip region can be achieved by
+ * temporary restriction of the clip region can be achieved by
  * calling cairo_clip() within a cairo_save()/cairo_restore()
  * pair. The only other means of increasing the size of the clip
  * region is cairo_reset_clip().




More information about the cairo-commit mailing list