/** * clutter_rect_contains_rect: * @a: a #ClutterRect * @b: a #ClutterRect * * Checks whether @a contains @b. * * The first rectangle contains the second if the union of the * two #ClutterRect is equal to the first rectangle. * * Return value: %TRUE if the first rectangle contains the second. * * Since: 1.12 */ gboolean clutter_rect_contains_rect (ClutterRect *a, ClutterRect *b) { ClutterRect res; g_return_val_if_fail (a != NULL, FALSE); g_return_val_if_fail (b != NULL, FALSE); clutter_rect_union (a, b, &res); return clutter_rect_equals (a, &res); }
/** * shell_grid_desaturate_effect_set_unshaded_rect: * @effect: a #ShellGridDesaturateEffect * @rect: (allow-none): the unshaded area * * Sets an unshaded area to the effect */ void shell_grid_desaturate_effect_set_unshaded_rect (ShellGridDesaturateEffect *effect, ClutterRect *rect) { g_return_if_fail (SHELL_IS_GRID_DESATURATE_EFFECT (effect)); if (!clutter_rect_equals (rect, effect->unshaded_rect)) { clutter_rect_free (effect->unshaded_rect); effect->unshaded_rect = clutter_rect_copy (rect); effect->unshaded_uniform_dirty = TRUE; clutter_effect_queue_repaint (CLUTTER_EFFECT (effect)); g_object_notify_by_pspec (G_OBJECT (effect), obj_props[PROP_UNSHADED_RECT]); } }