View Issue Details

IDProjectCategoryView StatusLast Update
0012438ScribusGraphics / Image Framespublic2025-03-23 19:08
Reporterale Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.5.0svn 
Summary0012438: [PATCH] remove or change the freehand line tool
Descriptioni would like to suggest to remove the freehand drawing tool.

... except if people can list a few (or at least one!) use cases for it.

in the case, the tool is too be kept, i suggest to remove the current default behavior (drawing a lot of little control points) and only keep the smooth variant that you get when pressing the control key.

if this proposal is accepted, i'm willing to make a patch.
Tagsnodes
PatchYes

Relationships

related to 0009100 new Paths simplification 

Activities

ale

2025-03-23 18:30

manager   ~0052305

pressing ctrl simplifies the path being drawen.

i think that this should be the only mode of the freehand tool

ale

2025-03-23 19:08

manager   ~0052306

the attached patch removes the ctrl modifier from the freehand path and always applies the smooth to the freehand line.

i'm still for completely removing the tool, but i think that making the line "usable" is a good compromise.
(i really don't see in which layout somebody would want a line with sooooo many nodes as the freehand creates when not in smooth mode; but i also wonder if anybody ever used the freehand tool at all...)
freehand-smooth.diff (1,982 bytes)   
From d77c8169f2d88540bd2a31f0d941d28836dffa72 Mon Sep 17 00:00:00 2001
From: ale rimoldi <ale@graphicslab.org>
Date: Sun, 23 Mar 2025 20:05:45 +0100
Subject: always smooth the freehand drawing


diff --git a/scribus/canvasmode_drawfreehand.cpp b/scribus/canvasmode_drawfreehand.cpp
index 1733c0ed1..230ae1905 100644
--- a/scribus/canvasmode_drawfreehand.cpp
+++ b/scribus/canvasmode_drawfreehand.cpp
@@ -217,31 +217,14 @@ void FreehandMode::mouseReleaseEvent(QMouseEvent *m)
 			uint z = m_doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, m_xp, m_yp, 1, 1, m_doc->itemToolPrefs().lineWidth, CommonStrings::None, m_doc->itemToolPrefs().lineColor);
 			currItem = m_doc->Items->at(z);
 			currItem->PoLine.resize(0);
-			if (m->modifiers() & Qt::ControlModifier)
+			QList<QPointF> clip;
+			for (int px = 0; px < m_poly.size()-1; ++px)
 			{
-				QList<QPointF> clip;
-				for (int px = 0; px < m_poly.size()-1; ++px)
-				{
-					FPoint clp = m_poly.point(px);
-					clip.append(QPointF(clp.x(), clp.y()));
-				}
-				QPainterPath pp = bezierFit(clip, 5.0);
-				currItem->PoLine.fromQPainterPath(pp);
-			}
-			else
-			{
-				currItem->PoLine.addPoint(m_poly.point(0));
-				currItem->PoLine.addPoint(m_poly.point(0));
-				for (int px = 1; px < m_poly.size()-1; ++px)
-				{
-					currItem->PoLine.addPoint(m_poly.point(px));
-					currItem->PoLine.addPoint(m_poly.point(px));
-					currItem->PoLine.addPoint(m_poly.point(px));
-					currItem->PoLine.addPoint(m_poly.point(px));
-				}
-				currItem->PoLine.addPoint(m_poly.point(m_poly.size()-1));
-				currItem->PoLine.addPoint(m_poly.point(m_poly.size()-1));
+				FPoint clp = m_poly.point(px);
+				clip.append(QPointF(clp.x(), clp.y()));
 			}
+			QPainterPath pp = bezierFit(clip, 5.0);
+			currItem->PoLine.fromQPainterPath(pp);
 			FPoint tp2(getMinClipF(&currItem->PoLine));
 			currItem->setXYPos(tp2.x(), tp2.y(), true);
 			currItem->PoLine.translate(-tp2.x(), -tp2.y());
freehand-smooth.diff (1,982 bytes)   

Issue History

Date Modified Username Field Change
2014-06-26 12:21 ale New Issue
2015-09-17 20:10 Kunda Category Graphics / Image Frames => Graphics/Img Frames
2015-09-17 20:11 Kunda Category Graphics/Img Frames => Graphics / Image Frames
2025-03-23 18:26 ale Relationship added related to 0009100
2025-03-23 18:30 ale Note Added: 0052305
2025-03-23 18:31 ale Tag Attached: nodes
2025-03-23 19:08 ale Note Added: 0052306
2025-03-23 19:08 ale File Added: freehand-smooth.diff
2025-03-23 19:08 ale Summary remove or change the freehand line tool => [PATCH] remove or change the freehand line tool
2025-03-23 19:08 ale Patch => Yes