[gimp] app: add gimp_tool_polygon_is_closed()



commit f84f1d89dc382ea8179a08f11f3e646c67151066
Author: Ell <ell_se yahoo com>
Date:   Thu Apr 25 04:24:58 2019 -0400

    app: add gimp_tool_polygon_is_closed()

 app/display/gimptoolpolygon.c | 12 ++++++++++++
 app/display/gimptoolpolygon.h |  1 +
 2 files changed, 13 insertions(+)
---
diff --git a/app/display/gimptoolpolygon.c b/app/display/gimptoolpolygon.c
index 0be68e866e..017e713cae 100644
--- a/app/display/gimptoolpolygon.c
+++ b/app/display/gimptoolpolygon.c
@@ -1432,6 +1432,18 @@ gimp_tool_polygon_new (GimpDisplayShell *shell)
                        NULL);
 }
 
+gboolean
+gimp_tool_polygon_is_closed (GimpToolPolygon *polygon)
+{
+  GimpToolPolygonPrivate *private;
+
+  g_return_val_if_fail (GIMP_IS_TOOL_POLYGON (polygon), FALSE);
+
+  private = polygon->private;
+
+  return private->polygon_closed;
+}
+
 void
 gimp_tool_polygon_get_points (GimpToolPolygon    *polygon,
                               const GimpVector2 **points,
diff --git a/app/display/gimptoolpolygon.h b/app/display/gimptoolpolygon.h
index a01507a7e1..d7b7eb193d 100644
--- a/app/display/gimptoolpolygon.h
+++ b/app/display/gimptoolpolygon.h
@@ -54,6 +54,7 @@ GType            gimp_tool_polygon_get_type   (void) G_GNUC_CONST;
 
 GimpToolWidget * gimp_tool_polygon_new        (GimpDisplayShell   *shell);
 
+gboolean         gimp_tool_polygon_is_closed  (GimpToolPolygon    *polygon);
 void             gimp_tool_polygon_get_points (GimpToolPolygon    *polygon,
                                                const GimpVector2 **points,
                                                gint               *n_points);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]