Bug 328537 - Random holes in vector lines
Summary: Random holes in vector lines
Status: RESOLVED UPSTREAM
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: 2.7.2
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL: http://imgur.com/oUW2GIi
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-08 13:33 UTC by riftyful
Modified: 2017-09-30 09:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description riftyful 2013-12-08 13:33:47 UTC
Whenever I draw a picture with vector paths and then make them into lines, there are white chunks at some points of the lines. 
(It's either me or Krita handling the lines wrong, I suppose)

Reproducible: Always

Steps to Reproduce:
1. Draw a path. Ideally have two or more paths intersect at some point. (Try drawing a picture)
2. Increase the width of the path to 5 or so.
3. Where a line ends or intersects with other (or the same) line, try moving around the handles of the curve to see if you also get the chunks.
Actual Results:  
White chunks in my lines appeared.

Expected Results:  
I expected the line to stay black and smooth, with no holes in it.

My computer: Lenovo IdeaPad B590
Operating System: Kubuntu 13.10
Krita version: 2.7.2

Here is link to the picture (2.4 MiB) I linked to in order to demonstrate this bug, so that you can open it in Krita and see where the mistake could be:
http://ubuntuone.com/4vyazGSbAu73ldYPPnXsU9
Comment 1 Halla Rempt 2013-12-10 13:30:34 UTC
Hi,

Thanks for your report. I'm trying to reproduce with 2.7 and 2.8 beta, but I am not succeeding. Have you got OpenGL enabled?
Comment 2 Dmitry Kazakov 2013-12-10 14:11:39 UTC
I could reproduce it. This is a bug in a path shape it seems. It happens when the end of the path is curved too firmly.
Comment 3 Dmitry Kazakov 2013-12-10 14:14:14 UTC
Here is the screenshot:
http://wstaw.org/m/2013/12/10/plasma-desktopzJ2434.jpg

Although I don't know, what tool was used for creating this shape, it seems like I don't have it, since I don't compile Karbom.
Comment 4 Sven Langkamp 2013-12-10 14:28:45 UTC
There are two tools that can do that, the path and freehand path tool and both are available without Karbon.
Comment 5 riftyful 2013-12-10 14:47:07 UTC
(In reply to comment #1)
> Hi,
> 
> Thanks for your report. I'm trying to reproduce with 2.7 and 2.8 beta, but I
> am not succeeding. Have you got OpenGL enabled?

Hello, thank you for reply.

I do not have OpenGL enabled. I tried enabling it after reading your comment, though, and the bug would still not disappear.

(In reply to comment #4)
> There are two tools that can do that, the path and freehand path tool and
> both are available without Karbon.

I used the freehand path tool.
Comment 6 Halla Rempt 2017-03-21 16:48:22 UTC
Partial patch: 

http://nonaynever.ru/pub/qt_bezier_curve_degradation_clean.diff
Comment 7 Dmitry Kazakov 2017-03-22 07:17:24 UTC
Yes, the bug is actually in the stroker in Qt. When offsetting the cure it doesn't handle the case that the curvature radius of the spline can be smaller than the offset value. That causes the offset line to start retrograde motion and self-intersect, which gives the described effect.

The same bug is present in Gimp and Inkscape. The paper which at least mentions the problem:

https://pdfs.semanticscholar.org/9679/e1295261d77cd9ef514b9c875953fe1d2c80.pdf
Comment 8 Halla Rempt 2017-09-30 09:10:58 UTC
If it's a bug in Qt, we should close the bug as upstream.