[gegl/soc-2011-warp: 13/23] GeglPath: add a gegl_path_get_flat_path function
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2011-warp: 13/23] GeglPath: add a gegl_path_get_flat_path function
- Date: Tue, 5 Jul 2011 15:18:47 +0000 (UTC)
commit 8e00d93fc22af18e5af24c2f09e45be4bf6020ea
Author: Michael Murà <batolettre gmail com>
Date: Tue Jun 28 21:32:07 2011 +0200
GeglPath: add a gegl_path_get_flat_path function
gegl/property-types/gegl-path.c | 9 +++++++++
gegl/property-types/gegl-path.h | 7 +++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index 22017dd..8fb5ccb 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -1019,6 +1019,15 @@ gegl_path_add_flattener (GeglPathList *(*flattener) (GeglPathList *original))
}
}
+GeglPathList *
+gegl_path_get_flat_path (GeglPath *path)
+{
+ GeglPathPrivate *priv = GEGL_PATH_GET_PRIVATE (path);
+
+ ensure_flattened (path);
+ return priv->flat_path;
+}
+
static const gchar *
parse_float_pair (const gchar *p,
gdouble *x,
diff --git a/gegl/property-types/gegl-path.h b/gegl/property-types/gegl-path.h
index 33520c4..28a1e3d 100644
--- a/gegl/property-types/gegl-path.h
+++ b/gegl/property-types/gegl-path.h
@@ -434,6 +434,13 @@ typedef GeglPathList *(*GeglFlattenerFunc) (GeglPathList *original);
*/
void gegl_path_add_flattener (GeglFlattenerFunc func);
+/**
+ * gegl_path_get_flat_path:
+ * @path: a @GeglPath
+ *
+ * Return a polyline version of @path
+ */
+GeglPathList * gegl_path_get_flat_path (GeglPath *path);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]