[cairo-commit] 2 commits - src/cairo.h src/cairo-quartz-font.c src/cairo-region.c
Benjamin Otte
company at kemper.freedesktop.org
Thu Jul 8 17:12:13 PDT 2010
src/cairo-quartz-font.c | 1 +
src/cairo-region.c | 25 +++++++++++++++++++++++++
src/cairo.h | 13 +++++++++++++
3 files changed, 39 insertions(+)
New commits:
commit 5e76bc6deb9fd4dc7a0f9181d3941ba55ce89c56
Author: Benjamin Otte <otte at redhat.com>
Date: Fri Jul 9 01:10:24 2010 +0200
doc: Add missing region documentation
diff --git a/src/cairo-region.c b/src/cairo-region.c
index 5237df3..112b1d8 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 3019222..02b4b6d 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;
/**
commit 57da730d286f643c8f68b445907f7cdd1f53e5de
Author: Benjamin Otte <otte at redhat.com>
Date: Thu Jul 8 23:44:35 2010 +0200
doc: Fix a syntax issue in quartz-font gtkdoc
A missing empty line caused the long description to be part of
@See_Also. Ooops.
diff --git a/src/cairo-quartz-font.c b/src/cairo-quartz-font.c
index 3bcf1e2..2c7e017 100644
--- a/src/cairo-quartz-font.c
+++ b/src/cairo-quartz-font.c
@@ -48,6 +48,7 @@
* @Title: Quartz (CGFont) Fonts
* @Short_Description: Font support via CGFont on OS X
* @See_Also: #cairo_font_face_t
+ *
* The Quartz font backend is primarily used to render text on Apple
* MacOS X systems. The CGFont API is used for the internal
* implementation of the font backend methods.
More information about the cairo-commit
mailing list