diff options
author | Matthias Clasen <mclasen@redhat.com> | 2023-05-01 09:52:46 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2023-05-01 13:45:20 -0400 |
commit | e453a989dfc211f7c5fbf1873b7d90324e7805cc (patch) | |
tree | 021c79439f1155ec1f1ad3d438610c6dc4b38af5 /gsk/gskroundedrectprivate.h | |
parent | f56328a6cc3cb1f2fb8a2692eedc6dd0db4f44c8 (diff) | |
download | gtk+-e453a989dfc211f7c5fbf1873b7d90324e7805cc.tar.gz |
Improve rounded rect intersection
Move the rounded rect/rect intersection code to
gskroundedrect.c, make it more precise, and add
tests for it.
Update the callers in the GL renderer.
Diffstat (limited to 'gsk/gskroundedrectprivate.h')
-rw-r--r-- | gsk/gskroundedrectprivate.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gsk/gskroundedrectprivate.h b/gsk/gskroundedrectprivate.h index 5be1a4ab0c..b9afb754cc 100644 --- a/gsk/gskroundedrectprivate.h +++ b/gsk/gskroundedrectprivate.h @@ -34,6 +34,16 @@ gboolean gsk_rounded_rect_equal (gconstpointer gconstpointer rect2) G_GNUC_PURE; char * gsk_rounded_rect_to_string (const GskRoundedRect *self) G_GNUC_MALLOC; +typedef enum { + GSK_INTERSECTION_EMPTY, + GSK_INTERSECTION_NONEMPTY, + GSK_INTERSECTION_NOT_REPRESENTABLE +} GskRoundedRectIntersection; + +GskRoundedRectIntersection gsk_rounded_rect_intersect_with_rect (const GskRoundedRect *self, + const graphene_rect_t *rect, + GskRoundedRect *result) G_GNUC_PURE; + G_END_DECLS |