Method

GtkWidgetregion_intersect

Declaration [src]

cairo_region_t*
gtk_widget_region_intersect (
  GtkWidget* widget,
  const cairo_region_t* region
)

Description [src]

Computes the intersection of a widget’s area and region, returning the intersection. The result may be empty, use cairo_region_is_empty() to check.

Deprecated since:3.14

Use gtk_widget_get_allocation() and cairo_region_intersect_rectangle() to get the same behavior.

Parameters

region cairo_region_t
 

A #cairo_region_t, in the same coordinate system as widget->allocation. That is, relative to widget->window for widgets which return FALSE from gtk_widget_get_has_window(); relative to the parent window of widget->window otherwise.

 The data is owned by the caller of the function.

Return value

Returns: cairo_region_t
 

A newly allocated region holding the intersection of widget and region.

 The caller of the method takes ownership of the data, and is responsible for freeing it.