Bug 141518 - LibreOffice Draw "Curve -> Freeform Draw" tool modifies the curve if it is too tight / pixel perfect free form line
Summary: LibreOffice Draw "Curve -> Freeform Draw" tool modifies the curve if it is to...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 141516 (view as bug list)
Depends on:
Blocks: Shapes
  Show dependency treegraph
 
Reported: 2021-04-06 15:08 UTC by wcedmisten
Modified: 2023-05-30 06:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Drawing a cursive m, sometimes results in large loop where line doubles back on itself (16.27 KB, image/png)
2021-04-06 15:09 UTC, wcedmisten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wcedmisten 2021-04-06 15:08:51 UTC
Description:
When trying to draw tight curves, as are often found in signatures, the Freeform Draw tool modifies the curve to be less tight, which completely changes the signature.

My guess is that this is really a feature, but for my use case it is a bug. I would appreciate a way to disable this curve modification, or modify the tool to not modify tight curves.



Steps to Reproduce:
1. Click the curve tool (pencil icon) which defaults to Freeform Line
2. Draw a cursive m or a cursive W, which both have tight curves.
See this image for more information: https://en.wikipedia.org/wiki/D%27Nealian#/media/File:D'Nealian_Cursive.svg

Actual Results:
curves are modified slightly or sometimes exaggeratedly, e.g. when writing cursive letters m or W

Expected Results:
curves remain as they were drawn in the Freeform Line tool


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 wcedmisten 2021-04-06 15:09:55 UTC
Created attachment 170984 [details]
Drawing a cursive m, sometimes results in large loop where line doubles back on itself
Comment 2 Julien Nabet 2021-04-06 19:16:41 UTC
*** Bug 141516 has been marked as a duplicate of this bug. ***
Comment 3 left_engine 2021-04-17 19:04:16 UTC
This is Reproducible, but may be more up to interpretation.

The freeform line tool does not work as you would see in something like Microsoft Windows Paint which literally tracks and stores your exact cursor position to the pixel.  Unlike Paint, you can edit the freeform line in Draw after it has been created, which is the tradeoff. 

The help description of the freeform line tool states:

Draws a freeform line where you drag in the current document. To end the line, release the mouse button. To draw a closed shape, release the mouse button near the starting point of the line.

It does not indicate as to whether there is a limitation to the degree of "freedom" the tool allow for.  

The overall Draw features file states:

Vector Graphics

LibreOffice Draw creates vector graphics using lines and curves defined by mathematical vectors. Vectors describe lines, ellipses, and polygons according to their geometry.

In other words, not pixel-by-pixel, but using start, end, and curvature coordinates, which makes the object scalable, mutable, and distinguishable from overlapping objects.

If you select the freeform line, then select the Move Points option from the toolbar, you can see that the object is made up of points and curves, and is not actually freeform down to the pixel.  You could adjust the freeform line to your exact needs after the fact, but for a signature application, this would not make sense.  

You could potentially increase the sensitivity of the cursor tracking to the pixel by changing the drawing ratio and increasing the zoom factor of the drawing, but the tradeoff will be more storage and processing.  

I would categorize the need to have a separate tool to draw a truly free form line and store it as an image rather than a vector drawing as an enhancement request.
Comment 4 Regina Henschel 2023-05-29 12:36:34 UTC
A freeform line is not a custom-shape but a Beziér-curve. We have no META bug for Beziér-curves or for polygons, so only the general "Shapes" META bug can be used here.

A custom-shape is not a 'shape drawn by the user', but a shape which is written as <draw:custom-shape> in the file markup. See links in bug 123648.


The smoothing is generated, when you are too far away from the down direction when moving up.


For me the question is, why do you want to draw a 'm' instead of using a text 'm'.
Comment 5 Ventero 2023-05-30 06:40:52 UTC
Because a handwritten authentic signature!

Because you want what you drew to be drawn and not something else!

Is it so damn hard to make this tool scalable or to add another trivial tool that would just blindly draw and not modify the curves in any way?

This crap has been going on for 5 years? Probably because someone thinks this way a bit out of the box..
Comment 6 Ventero 2023-05-30 06:45:51 UTC
The question is what the bezier-curves tool is good for in practice - maybe for some animations, but that's out of the scope of this application ...