summaryrefslogtreecommitdiff
path: root/gdk/gdkrectangle.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>1998-11-06 22:05:02 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-11-06 22:05:02 +0000
commite2a521922085c8010028e227f61bba59ea6b8242 (patch)
tree2500d6aa6f63aab4b58c17546532ecce8fdcca37 /gdk/gdkrectangle.c
parent3c0df19a588bd96f328bda975db8eb9fa7f79e81 (diff)
downloadgtk+-e2a521922085c8010028e227f61bba59ea6b8242.tar.gz
Merge from themes-2. See the ChangeLog for a somewhat detailed
history of the evolution of the changes involved. Most of this is actually minor painting tweaks.
Diffstat (limited to 'gdk/gdkrectangle.c')
-rw-r--r--gdk/gdkrectangle.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c
index 18bfa653a4..e1d1d300fa 100644
--- a/gdk/gdkrectangle.c
+++ b/gdk/gdkrectangle.c
@@ -19,6 +19,20 @@
#include "gdk.h"
+
+void
+gdk_rectangle_union (GdkRectangle *src1,
+ GdkRectangle *src2,
+ GdkRectangle *dest)
+{
+ dest->x = MIN (src1->x, src2->x);
+ dest->y = MIN (src1->y, src2->y);
+ dest->width =
+ MAX (src1->x + src1->width, src2->x + src2->width) - dest->x;
+ dest->height =
+ MAX (src1->y + src1->height, src2->y + src2->height) - dest->y;
+}
+
gint
gdk_rectangle_intersect (GdkRectangle *src1,
GdkRectangle *src2,