summaryrefslogtreecommitdiff
path: root/gtk/gtkroundedbox.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-19 04:39:33 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-20 18:01:12 +0100
commit4fc64ae3dd5dde99b0a47e184b9428635012825c (patch)
treea1c67fde2d573b91198d867493d017fc33c0ceb1 /gtk/gtkroundedbox.c
parent2480e0d57530b72a8efa4fefeff98971b61e16da (diff)
downloadgtk+-4fc64ae3dd5dde99b0a47e184b9428635012825c.tar.gz
gsk: Add contains/intersect functions for GskRoundedRect
... and use them.
Diffstat (limited to 'gtk/gtkroundedbox.c')
-rw-r--r--gtk/gtkroundedbox.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c
index 5dafd63d25..e51722f6a6 100644
--- a/gtk/gtkroundedbox.c
+++ b/gtk/gtkroundedbox.c
@@ -592,50 +592,3 @@ _gtk_rounded_box_clip_path (const GskRoundedRect *box,
box->bounds.size.width, box->bounds.size.height);
}
-gboolean
-_gtk_rounded_box_intersects_rectangle (const GskRoundedRect *box,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2)
-{
- if (x2 < box->bounds.origin.x ||
- y2 < box->bounds.origin.y ||
- x1 >= box->bounds.origin.x + box->bounds.size.width ||
- y1 >= box->bounds.origin.y + box->bounds.size.height)
- return FALSE;
-
- return TRUE;
-}
-
-gboolean
-_gtk_rounded_box_contains_rectangle (const GskRoundedRect *box,
- gdouble x1,
- gdouble y1,
- gdouble x2,
- gdouble y2)
-{
- if (x1 < box->bounds.origin.x ||
- y1 < box->bounds.origin.y ||
- x2 > box->bounds.origin.x + box->bounds.size.width ||
- y2 > box->bounds.origin.y + box->bounds.size.height)
- return FALSE;
-
- if (x1 < box->bounds.origin.x + box->corner[GSK_CORNER_TOP_LEFT].width &&
- y1 < box->bounds.origin.y + box->corner[GSK_CORNER_TOP_LEFT].height)
- return FALSE;
-
- if (x2 > box->bounds.origin.x + box->bounds.size.width - box->corner[GSK_CORNER_TOP_RIGHT].width &&
- y1 < box->bounds.origin.y + box->corner[GSK_CORNER_TOP_RIGHT].height)
- return FALSE;
-
- if (x2 > box->bounds.origin.x + box->bounds.size.width - box->corner[GSK_CORNER_BOTTOM_RIGHT].width &&
- y2 > box->bounds.origin.y + box->bounds.size.height - box->corner[GSK_CORNER_BOTTOM_RIGHT].height)
- return FALSE;
-
- if (x1 < box->bounds.origin.x + box->corner[GSK_CORNER_BOTTOM_LEFT].width &&
- y2 > box->bounds.origin.y + box->bounds.size.height - box->corner[GSK_CORNER_BOTTOM_LEFT].height)
- return FALSE;
-
- return TRUE;
-}