diff options
author | Benjamin Otte <otte@redhat.com> | 2020-02-13 07:33:18 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-02-13 07:36:38 +0100 |
commit | 77d7c713d4be60ec45a78668b6667aa24b5c6eb5 (patch) | |
tree | a1d9c99b8b9ab20150a2a389e9d8301c71cb8b6d | |
parent | b0369fc3008b69a37f239ff1788a1b1b00403e65 (diff) | |
download | gtk+-77d7c713d4be60ec45a78668b6667aa24b5c6eb5.tar.gz |
roundedrect: Fix inlining of graphene functions
graphene treats equality for contains() operations as always matching,
so do the same thing.
This is because unlike integer math, floating point cannot do the "as
close as possible to the point, but not reaching it" operation that
integer does by just subtracting 1.
-rw-r--r-- | gsk/gskroundedrect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gsk/gskroundedrect.c b/gsk/gskroundedrect.c index 2e01589639..4d95d52666 100644 --- a/gsk/gskroundedrect.c +++ b/gsk/gskroundedrect.c @@ -340,8 +340,8 @@ gsk_rounded_rect_locate_point (const GskRoundedRect *self, { if (point->x < self->bounds.origin.x || point->y < self->bounds.origin.y || - point->x >= self->bounds.origin.x + self->bounds.size.width || - point->y >= self->bounds.origin.y + self->bounds.size.height) + point->x > self->bounds.origin.x + self->bounds.size.width || + point->y > self->bounds.origin.y + self->bounds.size.height) return OUTSIDE; if (self->bounds.origin.x + self->corner[GSK_CORNER_TOP_LEFT].width > point->x && @@ -417,8 +417,8 @@ gsk_rounded_rect_contains_rect (const GskRoundedRect *self, { if (rect->origin.x < self->bounds.origin.x || rect->origin.y < self->bounds.origin.y || - rect->origin.x + rect->size.width >= self->bounds.origin.x + self->bounds.size.width || - rect->origin.y + rect->size.height >= self->bounds.origin.y + self->bounds.size.height) + rect->origin.x + rect->size.width > self->bounds.origin.x + self->bounds.size.width || + rect->origin.y + rect->size.height > self->bounds.origin.y + self->bounds.size.height) return FALSE; if (!gsk_rounded_rect_contains_point (self, &rect->origin) || |