[gimp] app: fix a few comments in last commits
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix a few comments in last commits
- Date: Sat, 3 Feb 2018 15:15:17 +0000 (UTC)
commit 53f7da04089b6909ea6bf94b2cb687de69d067e6
Author: Ell <ell_se yahoo com>
Date: Sat Feb 3 09:36:07 2018 -0500
app: fix a few comments in last commits
app/core/gimp-transform-utils.c | 4 ++--
app/vectors/gimpbezierstroke.c | 10 ++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimp-transform-utils.c b/app/core/gimp-transform-utils.c
index 4e0860a..e5c273d 100644
--- a/app/core/gimp-transform-utils.c
+++ b/app/core/gimp-transform-utils.c
@@ -937,8 +937,8 @@ polynomial_odd_roots (const gdouble *poly,
* clipped segments is 2.
*
* if the first clipped segment is an initial segment of 'bezier', sets
- * '*start_in' to TRUE, otherwise to FALSE. if the last transformed segment is
- * a final segment of 'bezier', sets '*end_in' to TRUE, otherwise to FALSE.
+ * '*start_in' to TRUE, otherwise to FALSE. if the last clipped segment is a
+ * final segment of 'bezier', sets '*end_in' to TRUE, otherwise to FALSE.
*
* 'c_bezier' may not alias 'bezier'.
*/
diff --git a/app/vectors/gimpbezierstroke.c b/app/vectors/gimpbezierstroke.c
index e4144a3..d5745e5 100644
--- a/app/vectors/gimpbezierstroke.c
+++ b/app/vectors/gimpbezierstroke.c
@@ -1779,13 +1779,19 @@ gimp_bezier_stroke_transform (GimpStroke *stroke,
if (first_stroke && stroke->closed)
{
/* connect the first and last strokes */
+
+ /* remove the first anchor, which is a synthetic control point */
gimp_anchor_free (g_queue_pop_head (first_stroke->anchors));
+ /* remove the last anchor, which is the same anchor point as the
+ * first anchor
+ */
gimp_anchor_free (g_queue_pop_tail (last_stroke->anchors));
if (first_stroke == last_stroke)
{
- /* the result is a single stroke. remove the superfluous
- * anchors, and close the stroke.
+ /* the result is a single stroke. move the last anchor, which is
+ * an orphan control point, to the front, to fill in the removed
+ * control point of the first anchor, and close the stroke.
*/
g_queue_push_head (first_stroke->anchors,
g_queue_pop_tail (first_stroke->anchors));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]