From db2eb5d4cb442d8a8bdd705c18c69bf2e4d9ee39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Sun, 27 Feb 2005 11:02:48 +0000 Subject: [PATCH] Remove newline in comment which was confusing gtk-doc. Document these functions. --- ChangeLog | 8 ++++++++ src/cairo-image-surface.c | 36 ++++++++++++++++++++++++++++++++++++ src/cairo.h | 1 - src/cairo_image_surface.c | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 49eaff46e..2897bc1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-02-27 Kristian Høgsberg + + * 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. + 2005-02-25 Carl Worth * TODO: Note that "user data" and "setters and getters" patches diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c index 10a135d9b..e94d166fe 100644 --- a/src/cairo-image-surface.c +++ b/src/cairo-image-surface.c @@ -133,6 +133,20 @@ _create_pixman_format (cairo_format_t format) } } +/** + * 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 @@ cairo_image_surface_create (cairo_format_t format, 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, diff --git a/src/cairo.h b/src/cairo.h index af45d5589..03e063242 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -239,7 +239,6 @@ cairo_set_tolerance (cairo_t *cr, double tolerance); * 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 diff --git a/src/cairo_image_surface.c b/src/cairo_image_surface.c index 10a135d9b..e94d166fe 100644 --- a/src/cairo_image_surface.c +++ b/src/cairo_image_surface.c @@ -133,6 +133,20 @@ _create_pixman_format (cairo_format_t format) } } +/** + * 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 @@ cairo_image_surface_create (cairo_format_t format, 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,