diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h index 5c4b9651e..891a5612b 100644 --- a/clutter/clutter/clutter-private.h +++ b/clutter/clutter/clutter-private.h @@ -241,6 +241,9 @@ void _clutter_util_fully_transform_vertices (const CoglMatrix *modelview, ClutterVertex *vertices_out, int n_vertices); +void _clutter_util_rect_from_rectangle (const cairo_rectangle_int_t *src, + ClutterRect *dest); + void _clutter_util_rectangle_union (const cairo_rectangle_int_t *src1, const cairo_rectangle_int_t *src2, cairo_rectangle_int_t *dest); diff --git a/clutter/clutter/clutter-util.c b/clutter/clutter/clutter-util.c index 83e15c041..49423e802 100644 --- a/clutter/clutter/clutter-util.c +++ b/clutter/clutter/clutter-util.c @@ -105,6 +105,21 @@ _clutter_util_fully_transform_vertices (const CoglMatrix *modelview, } } +void _clutter_util_rect_from_rectangle (const cairo_rectangle_int_t *src, + ClutterRect *dest) +{ + *dest = (ClutterRect) { + .origin = { + .x = src->x, + .y = src->y + }, + .size = { + .width = src->width, + .height = src->height + } + }; +} + /*< private > * _clutter_util_rectangle_union: * @src1: first rectangle to union