[gegl/soc-2011-warp: 13/16] 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/16] GeglPath: add a gegl_path_get_flat_path function
- Date: Wed, 29 Jun 2011 09:17:54 +0000 (UTC)
commit dcdfa180c2bde22efd2445adf3b54f531ffba8ce
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]