diff options
author | Benjamin Otte <otte@redhat.com> | 2010-06-28 16:19:30 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-06-29 16:06:38 +0200 |
commit | 6c5dffd1a39133753b865880f1674e6b82d480d2 (patch) | |
tree | e7211a65152a87e421f7394813efc956123ea6ee | |
parent | 300e6b84cd0c36873005dd877e3039870d43741b (diff) | |
download | gtk+-6c5dffd1a39133753b865880f1674e6b82d480d2.tar.gz |
examples: Port example to use cairo region API
https://bugzilla.gnome.org/show_bug.cgi?id=613284
-rw-r--r-- | examples/gdk/composited-window-example.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/gdk/composited-window-example.c b/examples/gdk/composited-window-example.c index b28f712a2e..dbb49ec31d 100644 --- a/examples/gdk/composited-window-example.c +++ b/examples/gdk/composited-window-example.c @@ -45,7 +45,7 @@ static gboolean window_expose_event (GtkWidget *widget, GdkEventExpose *event) { - GdkRegion *region; + cairo_region_t *region; GtkWidget *child; cairo_t *cr; @@ -61,10 +61,11 @@ window_expose_event (GtkWidget *widget, child->allocation.y); /* draw no more than our expose event intersects our child */ - region = gdk_region_rectangle (&child->allocation); - gdk_region_intersect (region, event->region); + region = cairo_region_create_rectangle (&child->allocation); + cairo_region_intersect (region, region, event->region); gdk_cairo_region (cr, region); cairo_clip (cr); + cairo_region_destroy (region); /* composite, with a 50% opacity */ cairo_set_operator (cr, CAIRO_OPERATOR_OVER); |