Functions
cairo_region_create ()
cairo_region_t *
cairo_region_create (void);
Allocates a new empty region object.
Returns
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_create_rectangle ()
cairo_region_t *
cairo_region_create_rectangle (const cairo_rectangle_int_t *rectangle);
Allocates a new region object containing rectangle
.
Returns
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_create_rectangles ()
cairo_region_t *
cairo_region_create_rectangles (const cairo_rectangle_int_t *rects,
int count);
Allocates a new region object containing the union of all given rects
.
Returns
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_copy ()
cairo_region_t *
cairo_region_copy (const cairo_region_t *original);
Allocates a new region object copying the area from original
.
Returns
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_reference ()
cairo_region_t *
cairo_region_reference (cairo_region_t *region);
Increases the reference count on region
by one. This prevents
region
from being destroyed until a matching call to
cairo_region_destroy() is made.
Since: 1.10
cairo_region_status ()
cairo_status_t
cairo_region_status (const cairo_region_t *region);
Checks whether an error has previous occurred for this
region object.
Since: 1.10
cairo_region_num_rectangles ()
int
cairo_region_num_rectangles (const cairo_region_t *region);
Returns the number of rectangles contained in region
.
Returns
The number of rectangles contained in region
.
Since: 1.10
cairo_region_get_rectangle ()
void
cairo_region_get_rectangle (const cairo_region_t *region,
int nth,
cairo_rectangle_int_t *rectangle);
Stores the nth
rectangle from the region in rectangle
.
Since: 1.10
cairo_region_is_empty ()
cairo_bool_t
cairo_region_is_empty (const cairo_region_t *region);
Checks whether region
is empty.
Returns
TRUE if region
is empty, FALSE if it isn't.
Since: 1.10
cairo_region_contains_point ()
cairo_bool_t
cairo_region_contains_point (const cairo_region_t *region,
int x,
int y);
Checks whether (x
, y
) is contained in region
.
Returns
TRUE if (x
, y
) is contained in region
, FALSE if it is not.
Since: 1.10
cairo_region_equal ()
cairo_bool_t
cairo_region_equal (const cairo_region_t *a,
const cairo_region_t *b);
Compares whether region_a is equivalent to region_b. NULL as an argument
is equal to itself, but not to any non-NULL region.
Returns
TRUE if both regions contained the same coverage,
FALSE if it is not or any region is in an error status.
Since: 1.10
cairo_region_translate ()
void
cairo_region_translate (cairo_region_t *region,
int dx,
int dy);
Translates region
by (dx
, dy
).
Since: 1.10
cairo_region_xor ()
cairo_status_t
cairo_region_xor (cairo_region_t *dst,
const cairo_region_t *other);
Computes the exclusive difference of dst
with other
and places the
result in dst
. That is, dst
will be set to contain all areas that
are either in dst
or in other
, but not in both.
Since: 1.10
cairo_region_xor_rectangle ()
cairo_status_t
cairo_region_xor_rectangle (cairo_region_t *dst,
const cairo_rectangle_int_t *rectangle);
Computes the exclusive difference of dst
with rectangle
and places the
result in dst
. That is, dst
will be set to contain all areas that are
either in dst
or in rectangle
, but not in both.
Since: 1.10