summaryrefslogtreecommitdiff
path: root/gsk/gskpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'gsk/gskpath.c')
-rw-r--r--gsk/gskpath.c81
1 files changed, 81 insertions, 0 deletions
diff --git a/gsk/gskpath.c b/gsk/gskpath.c
index cfaf636741..4fc2c1945e 100644
--- a/gsk/gskpath.c
+++ b/gsk/gskpath.c
@@ -1432,4 +1432,85 @@ gsk_path_offset (GskPath *self,
return gsk_path_builder_free_to_path (builder);
}
+/**
+ * gsk_path_simplify:
+ * @self: a `GskPath`
+ *
+ * Create a new path that describes the same area as @self,
+ * without overlapping contours.
+ *
+ * Returns: a new `GskPath`
+ */
+GskPath *
+gsk_path_simplify (GskPath *self)
+{
+ return gsk_path_op (GSK_PATH_OP_SIMPLIFY, self, NULL);
+}
+
+/**
+ * gsk_path_union:
+ * @first: a `GskPath`
+ * @second: a `GskPath`
+ *
+ * Create a new path that describes the union of the areas
+ * of the given paths.
+ *
+ * Returns: a new `GskPath`
+ */
+GskPath *
+gsk_path_union (GskPath *first,
+ GskPath *second)
+{
+ return gsk_path_op (GSK_PATH_OP_UNION, first, second);
+}
+
+/**
+ * gsk_path_intersection:
+ * @first: a `GskPath`
+ * @second: a `GskPath`
+ *
+ * Create a new path that describes the intersection of the areas
+ * of the given paths.
+ *
+ * Returns: a new `GskPath`
+ */
+GskPath *
+gsk_path_intersection (GskPath *first,
+ GskPath *second)
+{
+ return gsk_path_op (GSK_PATH_OP_INTERSECTION, first, second);
+}
+
+/**
+ * gsk_path_difference:
+ * @first: a `GskPath`
+ * @second: a `GskPath`
+ *
+ * Create a new path that describes the difference of the areas
+ * of the given paths.
+ *
+ * Returns: a new `GskPath`
+ */
+GskPath *
+gsk_path_difference (GskPath *first,
+ GskPath *second)
+{
+ return gsk_path_op (GSK_PATH_OP_DIFFERENCE, first, second);
+}
+/**
+ * gsk_path_symmetric_difference:
+ * @first: a `GskPath`
+ * @second: a `GskPath`
+ *
+ * Create a new path that describes the symmetric difference
+ * of the areas of the given paths.
+ *
+ * Returns: a new `GskPath`
+ */
+GskPath *
+gsk_path_symmetric_difference (GskPath *first,
+ GskPath *second)
+{
+ return gsk_path_op (GSK_PATH_OP_XOR, first, second);
+}