diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-12-04 19:36:13 +0100 |
---|---|---|
committer | Alexander Larsson <alex@localhost.localdomain> | 2009-04-02 10:14:06 +0200 |
commit | 5ff017e64ef34cd13f8ffd0364dd2133aba09817 (patch) | |
tree | ec80aa63214053ba564e6bd31e273e97839f4cc4 /gdk/gdkgc.c | |
parent | 6a82287005d0c5edfef2237acd970fd7345eff98 (diff) | |
download | gtk+-5ff017e64ef34cd13f8ffd0364dd2133aba09817.tar.gz |
Move clip offsetting into _gdk_gc_intersect_clip_region
Diffstat (limited to 'gdk/gdkgc.c')
-rw-r--r-- | gdk/gdkgc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c index 7b7e4eed59..6bc3a994ce 100644 --- a/gdk/gdkgc.c +++ b/gdk/gdkgc.c @@ -564,17 +564,25 @@ _gdk_gc_set_clip_region_internal (GdkGC *gc, _gdk_windowing_gc_set_clip_region (gc, region, reset_origin); } -/* Takes ownership of passed in region, returns old clip region */ +/* returns old clip region */ void _gdk_gc_intersect_clip_region (GdkGC *gc, GdkRegion *region, + int offset_x, + int offset_y, GdkRegion **old_clip_region) { GdkGCPrivate *priv = GDK_GC_GET_PRIVATE (gc); GdkRegion *old_clip; + gboolean free; old_clip = priv->clip_region; + region = gdk_region_copy (region); + + if (offset_x != 0 || offset_y != 0) + gdk_region_offset (region, offset_x, offset_y); + priv->clip_region = region; if (old_clip) gdk_region_intersect (region, old_clip); |