diff options
author | Benjamin Otte <otte@redhat.com> | 2010-07-09 01:10:24 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-07-09 02:11:59 +0200 |
commit | 5e76bc6deb9fd4dc7a0f9181d3941ba55ce89c56 (patch) | |
tree | 4cdef1068af982fb9a7f202499f6726f074d77ae | |
parent | 57da730d286f643c8f68b445907f7cdd1f53e5de (diff) |
doc: Add missing region documentation
-rw-r--r-- | src/cairo-region.c | 25 | ||||
-rw-r--r-- | src/cairo.h | 13 |
2 files changed, 38 insertions, 0 deletions
diff --git a/src/cairo-region.c b/src/cairo-region.c index 5237df39..112b1d82 100644 --- a/src/cairo-region.c +++ b/src/cairo-region.c @@ -44,6 +44,16 @@ /* XXX need to update pixman headers to be const as appropriate */ #define CONST_CAST (pixman_region32_t *) +/** + * SECTION:cairo-region + * @Title: Regions + * @Short_Description: Representing a pixel-aligned area + * + * Regions are a simple graphical data type representing an area of + * integer-aligned rectangles. They are often used on raster surfaces + * to track areas of interest, such as change or clip areas. + */ + static const cairo_region_t _cairo_region_nil = { CAIRO_REFERENCE_COUNT_INVALID, /* ref_count */ CAIRO_STATUS_NO_MEMORY, /* status */ @@ -196,6 +206,21 @@ cairo_region_create (void) } slim_hidden_def (cairo_region_create); +/** + * cairo_region_create_rectangles: + * @rects: an array of @count rectangles + * @count: number of rectangles + * + * Allocates a new region object containing the union of all given @rects. + * + * Return value: A newly allocated #cairo_region_t. Free with + * cairo_region_destroy(). This function always returns a + * valid pointer; if memory cannot be allocated, then a special + * error object is returned where all operations on the object do nothing. + * You can check for this with cairo_region_status(). + * + * Since: 1.10 + **/ cairo_region_t * cairo_region_create_rectangles (const cairo_rectangle_int_t *rects, int count) diff --git a/src/cairo.h b/src/cairo.h index 3019222d..02b4b6da 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -2601,6 +2601,19 @@ cairo_matrix_transform_point (const cairo_matrix_t *matrix, /* Region functions */ +/** + * cairo_region_t: + * + * A #cairo_region_t represents a set of integer-aligned rectangles. + * + * It allows set-theoretical operations like cairo_region_union() and + * cairo_region_intersect() to be performed on them. + * + * Memory management of #cairo_region_t is done with + * cairo_region_reference() and cairo_region_destroy(). + * + * Since: 1.10 + **/ typedef struct _cairo_region cairo_region_t; /** |