jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: Regions: Cairo: A Vector Graphics Library jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68:
jpayne@68:

Regions

jpayne@68:

Regions — Representing a pixel-aligned area

jpayne@68:
jpayne@68:
jpayne@68:

Functions

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
jpayne@68: cairo_region_t * jpayne@68: jpayne@68: cairo_region_create () jpayne@68:
jpayne@68: cairo_region_t * jpayne@68: jpayne@68: cairo_region_create_rectangle () jpayne@68:
jpayne@68: cairo_region_t * jpayne@68: jpayne@68: cairo_region_create_rectangles () jpayne@68:
jpayne@68: cairo_region_t * jpayne@68: jpayne@68: cairo_region_copy () jpayne@68:
jpayne@68: cairo_region_t * jpayne@68: jpayne@68: cairo_region_reference () jpayne@68:
jpayne@68: void jpayne@68: jpayne@68: cairo_region_destroy () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_status () jpayne@68:
jpayne@68: void jpayne@68: jpayne@68: cairo_region_get_extents () jpayne@68:
jpayne@68: int jpayne@68: jpayne@68: cairo_region_num_rectangles () jpayne@68:
jpayne@68: void jpayne@68: jpayne@68: cairo_region_get_rectangle () jpayne@68:
jpayne@68: cairo_bool_t jpayne@68: jpayne@68: cairo_region_is_empty () jpayne@68:
jpayne@68: cairo_bool_t jpayne@68: jpayne@68: cairo_region_contains_point () jpayne@68:
jpayne@68: cairo_region_overlap_t jpayne@68: jpayne@68: cairo_region_contains_rectangle () jpayne@68:
jpayne@68: cairo_bool_t jpayne@68: jpayne@68: cairo_region_equal () jpayne@68:
jpayne@68: void jpayne@68: jpayne@68: cairo_region_translate () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_intersect () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_intersect_rectangle () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_subtract () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_subtract_rectangle () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_union () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_union_rectangle () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_xor () jpayne@68:
jpayne@68: cairo_status_t jpayne@68: jpayne@68: cairo_region_xor_rectangle () jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

Types and Values

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:
typedefcairo_region_t
enumcairo_region_overlap_t
jpayne@68:
jpayne@68:
jpayne@68:

Description

jpayne@68:

Regions are a simple graphical data type representing an area of jpayne@68: integer-aligned rectangles. They are often used on raster surfaces jpayne@68: to track areas of interest, such as change or clip areas.

jpayne@68:
jpayne@68:
jpayne@68:

Functions

jpayne@68:
jpayne@68:

cairo_region_create ()

jpayne@68:
cairo_region_t *
jpayne@68: cairo_region_create (void);
jpayne@68:

Allocates a new empty region object.

jpayne@68:
jpayne@68:

Returns

jpayne@68:

A newly allocated cairo_region_t. Free with jpayne@68: cairo_region_destroy(). This function always returns a jpayne@68: valid pointer; if memory cannot be allocated, then a special jpayne@68: error object is returned where all operations on the object do nothing. jpayne@68: You can check for this with cairo_region_status().

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_create_rectangle ()

jpayne@68:
cairo_region_t *
jpayne@68: cairo_region_create_rectangle (const cairo_rectangle_int_t *rectangle);
jpayne@68:

Allocates a new region object containing rectangle jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

rectangle

a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

A newly allocated cairo_region_t. Free with jpayne@68: cairo_region_destroy(). This function always returns a jpayne@68: valid pointer; if memory cannot be allocated, then a special jpayne@68: error object is returned where all operations on the object do nothing. jpayne@68: You can check for this with cairo_region_status().

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_create_rectangles ()

jpayne@68:
cairo_region_t *
jpayne@68: cairo_region_create_rectangles (const cairo_rectangle_int_t *rects,
jpayne@68:                                 int count);
jpayne@68:

Allocates a new region object containing the union of all given rects jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

rects

an array of count jpayne@68: rectangles

 

count

number of rectangles

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

A newly allocated cairo_region_t. Free with jpayne@68: cairo_region_destroy(). This function always returns a jpayne@68: valid pointer; if memory cannot be allocated, then a special jpayne@68: error object is returned where all operations on the object do nothing. jpayne@68: You can check for this with cairo_region_status().

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_copy ()

jpayne@68:
cairo_region_t *
jpayne@68: cairo_region_copy (const cairo_region_t *original);
jpayne@68:

Allocates a new region object copying the area from original jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

original

a cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

A newly allocated cairo_region_t. Free with jpayne@68: cairo_region_destroy(). This function always returns a jpayne@68: valid pointer; if memory cannot be allocated, then a special jpayne@68: error object is returned where all operations on the object do nothing. jpayne@68: You can check for this with cairo_region_status().

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_reference ()

jpayne@68:
cairo_region_t *
jpayne@68: cairo_region_reference (cairo_region_t *region);
jpayne@68:

Increases the reference count on region jpayne@68: by one. This prevents jpayne@68: region jpayne@68: from being destroyed until a matching call to jpayne@68: cairo_region_destroy() is made.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

the referenced cairo_region_t.

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_destroy ()

jpayne@68:
void
jpayne@68: cairo_region_destroy (cairo_region_t *region);
jpayne@68:

Destroys a cairo_region_t object created with jpayne@68: cairo_region_create(), cairo_region_copy(), or jpayne@68: or cairo_region_create_rectangle().

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 
jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_status ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_status (const cairo_region_t *region);
jpayne@68:

Checks whether an error has previous occurred for this jpayne@68: region object.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_get_extents ()

jpayne@68:
void
jpayne@68: cairo_region_get_extents (const cairo_region_t *region,
jpayne@68:                           cairo_rectangle_int_t *extents);
jpayne@68:

Gets the bounding rectangle of region jpayne@68: as a cairo_rectangle_int_t

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 

extents

rectangle into which to store the extents

 
jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_num_rectangles ()

jpayne@68:
int
jpayne@68: cairo_region_num_rectangles (const cairo_region_t *region);
jpayne@68:

Returns the number of rectangles contained in region jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

The number of rectangles contained in region jpayne@68: .

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_get_rectangle ()

jpayne@68:
void
jpayne@68: cairo_region_get_rectangle (const cairo_region_t *region,
jpayne@68:                             int nth,
jpayne@68:                             cairo_rectangle_int_t *rectangle);
jpayne@68:

Stores the nth jpayne@68: rectangle from the region in rectangle jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 

nth

a number indicating which rectangle should be returned

 

rectangle

return location for a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_is_empty ()

jpayne@68:
cairo_bool_t
jpayne@68: cairo_region_is_empty (const cairo_region_t *region);
jpayne@68:

Checks whether region jpayne@68: is empty.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

TRUE if region jpayne@68: is empty, FALSE if it isn't.

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_contains_point ()

jpayne@68:
cairo_bool_t
jpayne@68: cairo_region_contains_point (const cairo_region_t *region,
jpayne@68:                              int x,
jpayne@68:                              int y);
jpayne@68:

Checks whether (x jpayne@68: , y jpayne@68: ) is contained in region jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 

x

the x coordinate of a point

 

y

the y coordinate of a point

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

TRUE if (x jpayne@68: , y jpayne@68: ) is contained in region jpayne@68: , FALSE if it is not.

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_contains_rectangle ()

jpayne@68:
cairo_region_overlap_t
jpayne@68: cairo_region_contains_rectangle (const cairo_region_t *region,
jpayne@68:                                  const cairo_rectangle_int_t *rectangle);
jpayne@68:

Checks whether rectangle jpayne@68: is inside, outside or partially contained jpayne@68: in region jpayne@68:

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 

rectangle

a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_REGION_OVERLAP_IN if rectangle jpayne@68: is entirely inside region jpayne@68: , jpayne@68: CAIRO_REGION_OVERLAP_OUT if rectangle jpayne@68: is entirely outside region jpayne@68: , or jpayne@68: CAIRO_REGION_OVERLAP_PART if rectangle jpayne@68: is partially inside and partially outside region jpayne@68: .

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_equal ()

jpayne@68:
cairo_bool_t
jpayne@68: cairo_region_equal (const cairo_region_t *a,
jpayne@68:                     const cairo_region_t *b);
jpayne@68:

Compares whether region_a is equivalent to region_b. NULL as an argument jpayne@68: is equal to itself, but not to any non-NULL region.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

a

a cairo_region_t or NULL

 

b

a cairo_region_t or NULL

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

TRUE if both regions contained the same coverage, jpayne@68: FALSE if it is not or any region is in an error status.

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_translate ()

jpayne@68:
void
jpayne@68: cairo_region_translate (cairo_region_t *region,
jpayne@68:                         int dx,
jpayne@68:                         int dy);
jpayne@68:

Translates region jpayne@68: by (dx jpayne@68: , dy jpayne@68: ).

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

region

a cairo_region_t

 

dx

Amount to translate in the x direction

 

dy

Amount to translate in the y direction

 
jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_intersect ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_intersect (cairo_region_t *dst,
jpayne@68:                         const cairo_region_t *other);
jpayne@68:

Computes the intersection of dst jpayne@68: with other jpayne@68: and places the result in dst jpayne@68:

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

other

another cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_intersect_rectangle ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_intersect_rectangle (cairo_region_t *dst,
jpayne@68:                                   const cairo_rectangle_int_t *rectangle);
jpayne@68:

Computes the intersection of dst jpayne@68: with rectangle jpayne@68: and places the jpayne@68: result in dst jpayne@68:

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

rectangle

a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_subtract ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_subtract (cairo_region_t *dst,
jpayne@68:                        const cairo_region_t *other);
jpayne@68:

Subtracts other jpayne@68: from dst jpayne@68: and places the result in dst jpayne@68:

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

other

another cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_subtract_rectangle ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_subtract_rectangle (cairo_region_t *dst,
jpayne@68:                                  const cairo_rectangle_int_t *rectangle);
jpayne@68:

Subtracts rectangle jpayne@68: from dst jpayne@68: and places the result in dst jpayne@68:

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

rectangle

a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_union ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_union (cairo_region_t *dst,
jpayne@68:                     const cairo_region_t *other);
jpayne@68:

Computes the union of dst jpayne@68: with other jpayne@68: and places the result in dst jpayne@68:

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

other

another cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_union_rectangle ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_union_rectangle (cairo_region_t *dst,
jpayne@68:                               const cairo_rectangle_int_t *rectangle);
jpayne@68:

Computes the union of dst jpayne@68: with rectangle jpayne@68: and places the result in dst jpayne@68: .

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

rectangle

a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_xor ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_xor (cairo_region_t *dst,
jpayne@68:                   const cairo_region_t *other);
jpayne@68:

Computes the exclusive difference of dst jpayne@68: with other jpayne@68: and places the jpayne@68: result in dst jpayne@68: . That is, dst jpayne@68: will be set to contain all areas that jpayne@68: are either in dst jpayne@68: or in other jpayne@68: , but not in both.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

other

another cairo_region_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

cairo_region_xor_rectangle ()

jpayne@68:
cairo_status_t
jpayne@68: cairo_region_xor_rectangle (cairo_region_t *dst,
jpayne@68:                             const cairo_rectangle_int_t *rectangle);
jpayne@68:

Computes the exclusive difference of dst jpayne@68: with rectangle jpayne@68: and places the jpayne@68: result in dst jpayne@68: . That is, dst jpayne@68: will be set to contain all areas that are jpayne@68: either in dst jpayne@68: or in rectangle jpayne@68: , but not in both.

jpayne@68:
jpayne@68:

Parameters

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

dst

a cairo_region_t

 

rectangle

a cairo_rectangle_int_t

 
jpayne@68:
jpayne@68:
jpayne@68:

Returns

jpayne@68:

CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY

jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

Types and Values

jpayne@68:
jpayne@68:

cairo_region_t

jpayne@68:
typedef struct _cairo_region cairo_region_t;
jpayne@68: 
jpayne@68:

A cairo_region_t represents a set of integer-aligned rectangles.

jpayne@68:

It allows set-theoretical operations like cairo_region_union() and jpayne@68: cairo_region_intersect() to be performed on them.

jpayne@68:

Memory management of cairo_region_t is done with jpayne@68: cairo_region_reference() and cairo_region_destroy().

jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68:

enum cairo_region_overlap_t

jpayne@68:

Used as the return value for cairo_region_contains_rectangle().

jpayne@68:
jpayne@68:

Members

jpayne@68:
jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68: jpayne@68:

CAIRO_REGION_OVERLAP_IN

jpayne@68:

The contents are entirely inside the region. (Since 1.10)

jpayne@68:
 

CAIRO_REGION_OVERLAP_OUT

jpayne@68:

The contents are entirely outside the region. (Since 1.10)

jpayne@68:
 

CAIRO_REGION_OVERLAP_PART

jpayne@68:

The contents are partially inside and jpayne@68: partially outside the region. (Since 1.10)

jpayne@68:
 
jpayne@68:
jpayne@68:

Since: 1.10

jpayne@68:
jpayne@68:
jpayne@68:
jpayne@68: jpayne@68: jpayne@68: