[mutter] clutter/base-types: Clarify docs for point_inside_quadrilateral
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/base-types: Clarify docs for point_inside_quadrilateral
- Date: Thu, 3 Oct 2019 17:12:23 +0000 (UTC)
commit 26b76ee95d060fe4b72d1c9474f37c2b4f043f74
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Sat Sep 7 10:49:55 2019 +0800
clutter/base-types: Clarify docs for point_inside_quadrilateral
The final version of the function was changed to allow points that are
touching the edge of a quadrilateral to be counted as "inside". Update
the function documentation to refect this.
Also clarify that the function is written in such a way that it is
agnostic to clockwise or anticlockwise vertex ordering.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/783
clutter/clutter/clutter-base-types.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-base-types.c b/clutter/clutter/clutter-base-types.c
index c84f9aa64..61e6fcd26 100644
--- a/clutter/clutter/clutter-base-types.c
+++ b/clutter/clutter/clutter-base-types.c
@@ -592,13 +592,13 @@ clutter_point_compare_line (const ClutterPoint *p,
/**
* clutter_point_inside_quadrilateral:
* @point: a #ClutterPoint to test
- * @vertices: array of vertices of the quadrilateral, in clockwise order,
- * from top-left to bottom-left
+ * @vertices: array of vertices of the quadrilateral, in either clockwise or
+ * anticlockwise order.
*
* Determines whether a point is inside the convex quadrilateral provided,
- * and not on any of its edges or vertices.
+ * or on any of its edges or vertices.
*
- * Returns: %TRUE if @point is inside the quadrilateral
+ * Returns: %TRUE if @point is inside or touching the quadrilateral
*/
gboolean
clutter_point_inside_quadrilateral (const ClutterPoint *point,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]