[cairo-commit] cairo/src cairo.h, 1.76, 1.77 cairo_image_surface.c,
1.24, 1.25
Kristian Hogsberg
commit at pdx.freedesktop.org
Sun Feb 27 11:02:51 PST 2005
Committed by: krh
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv19172/src
Modified Files:
cairo.h cairo_image_surface.c
Log Message:
2005-02-27 Kristian Høgsberg <krh at redhat.com>
* src/cairo.h (cairo_fill_rule_t): Remove newline in comment which
was confusing gtk-doc.
* src/cairo_image_surface.c (cairo_image_surface_create_for_data)
(cairo_image_surface_create): Document these functions.
Index: cairo.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo.h,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- cairo.h 24 Feb 2005 18:09:45 -0000 1.76
+++ cairo.h 27 Feb 2005 19:02:49 -0000 1.77
@@ -239,7 +239,6 @@
* from right to left, counts -1. (Left and right are determined
* from the perspective of looking along the ray from the starting
* point.) If the total count is non-zero, the point will be filled.
- *
* @CAIRO_FILL_RULE_EVEN_ODD: Counts the total number of
* intersections, without regard to the orientation of the contour. If
* the total number of intersections is odd, the point will be
Index: cairo_image_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_image_surface.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cairo_image_surface.c 22 Feb 2005 19:35:03 -0000 1.24
+++ cairo_image_surface.c 27 Feb 2005 19:02:49 -0000 1.25
@@ -133,6 +133,20 @@
}
}
+/**
+ * cairo_image_surface_create:
+ * @format: format of pixels in the surface to create
+ * @width: width of the surface, in pixels
+ * @height: height of the surface, in pixels
+ *
+ * Creates an image surface of the specified format and
+ * dimensions. The initial contents of the surface is undefined; you
+ * must explicitely clear the buffer, using, for example,
+ * cairo_rectangle() and cairo_fill() if you want it cleared.
+ *
+ * Return value: the newly created surface, or %NULL if it couldn't
+ * be created because of lack of memory
+ **/
cairo_surface_t *
cairo_image_surface_create (cairo_format_t format,
int width,
@@ -158,6 +172,28 @@
return &surface->base;
}
+/**
+ * cairo_image_surface_create_for_data:
+ * @data: a pointer to a buffer supplied by the application
+ * in which to write contents.
+ * @format: the format of pixels in the buffer
+ * @width: the width of the image to be stored in the buffer
+ * @height: the height of the image to be stored in the buffer
+ * @stride: the number of bytes between the start of rows
+ * in the buffer. Having this be specified separate from @width
+ * allows for padding at the end of rows, or for writing
+ * to a subportion of a larger image.
+ *
+ * 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 inital image contents; you
+ * must explicitely clear the buffer, using, for example,
+ * cairo_rectangle() and cairo_fill() if you want it cleared.
+ *
+ * Return value: the newly created surface, or %NULL if it couldn't
+ * be created because of lack of memory
+ **/
cairo_surface_t *
cairo_image_surface_create_for_data (char *data,
cairo_format_t format,
More information about the cairo-commit
mailing list