diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-12-16 14:38:10 +0100 |
---|---|---|
committer | Alexander Larsson <alex@localhost.localdomain> | 2009-04-02 10:15:16 +0200 |
commit | 062da50b9f5822a9fdd64791701eb3f5720c321d (patch) | |
tree | d74fffc78a1b29a4ea26e4ea16518b0c05867d74 /gdk/gdkregion-generic.c | |
parent | 0d540e935b045c41afbca0e87a5b89d56006c8bf (diff) | |
download | gtk+-062da50b9f5822a9fdd64791701eb3f5720c321d.tar.gz |
Add _gdk_windowing_window_get_shape
Diffstat (limited to 'gdk/gdkregion-generic.c')
-rw-r--r-- | gdk/gdkregion-generic.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gdk/gdkregion-generic.c b/gdk/gdkregion-generic.c index f835ab7d6f..19e03e45c4 100644 --- a/gdk/gdkregion-generic.c +++ b/gdk/gdkregion-generic.c @@ -96,6 +96,7 @@ static void miRegionOp (GdkRegion *newReg, overlapFunc overlapFn, nonOverlapFunc nonOverlap1Fn, nonOverlapFunc nonOverlap2Fn); +static void miSetExtents (GdkRegion *pReg); /** * gdk_region_new: @@ -122,6 +123,31 @@ gdk_region_new (void) return temp; } +GdkRegion * +_gdk_region_new_from_yxbanded_rects (GdkRectangle *rects, + int num_rects) +{ + GdkRegion *temp; + int i; + + temp = g_slice_new (GdkRegion); + + temp->rects = g_new (GdkRegionBox, num_rects); + temp->size = num_rects; + temp->numRects = num_rects; + for (i = 0; i < num_rects; i++) + { + temp->rects[i].x1 = rects[i].x; + temp->rects[i].y1 = rects[i].y; + temp->rects[i].x2 = rects[i].x + rects[i].width; + temp->rects[i].y2 = rects[i].y + rects[i].height; + } + miSetExtents (temp); + + return temp; +} + + /** * gdk_region_rectangle: * @rectangle: a #GdkRectangle |