aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-09-20 17:51:31 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-09-22 10:45:39 -0600
commitfdc22449d6f7ac38388812d7f0da7c93e110d28a (patch)
tree91a5b8336fccd1a4ddb6d202503a444d98ce8b3d /include
parent7939bf8cc6b81d5bbd11da08b905eea1bba81ce3 (diff)
util/box: introduce wlr_fbox_empty
Same as wlr_box_empty, but for wlr_fbox.
Diffstat (limited to 'include')
-rw-r--r--include/wlr/util/box.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/wlr/util/box.h b/include/wlr/util/box.h
index b9ddca25..83ea5001 100644
--- a/include/wlr/util/box.h
+++ b/include/wlr/util/box.h
@@ -42,7 +42,7 @@ struct wlr_fbox {
/**
* Finds the closest point within the box bounds
- *
+ *
* Returns NAN if the box is empty
*/
void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
@@ -59,7 +59,7 @@ bool wlr_box_intersection(struct wlr_box *dest, const struct wlr_box *box_a,
/**
* Verifies if a point is contained within the bounds of a given wlr_box.
*
- * For example:
+ * For example:
* - A point at (100, 50) is not contained in the box (0, 0, 100, 50).
* - A point at (10, 10) is contained in the box (10, 0, 50, 50).
*/
@@ -67,7 +67,7 @@ bool wlr_box_contains_point(const struct wlr_box *box, double x, double y);
/**
* Checks whether a box is empty or not.
- *
+ *
* A wlr_box is considered empty if its width and/or height is zero or negative.
*/
bool wlr_box_empty(const struct wlr_box *box);
@@ -79,8 +79,16 @@ void wlr_box_transform(struct wlr_box *dest, const struct wlr_box *box,
enum wl_output_transform transform, int width, int height);
/**
+ * Checks whether a box is empty or not.
+ *
+ * A wlr_box is considered empty if its width and/or height is zero or negative.
+ */
+bool wlr_fbox_empty(const struct wlr_fbox *box);
+
+/**
* Transforms a floating-point box inside a (0, 0, width, height) box.
*/
void wlr_fbox_transform(struct wlr_fbox *dest, const struct wlr_fbox *box,
enum wl_output_transform transform, double width, double height);
+
#endif