Bug 473770 - [SVG2 support] Add support for stroke-linejoin: arcs property
Summary: [SVG2 support] Add support for stroke-linejoin: arcs property
Status: REPORTED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.1.5
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-26 09:01 UTC by Volga
Modified: 2024-04-29 16:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2023-08-26 09:01:56 UTC
SUMMARY
The stroke-linejoin property have added new value arcs as a new way to join the strokes at the corner of paths, this value indicates that an arcs corner is to be used to join path segments. The arcs shape is formed by extending the outer edges of the stroke at the join point with arcs that have the same curvature as the outer edges at the join point.
With this support it's possible to make a stroke with this property produce even more desired output in Krita, whigh give benifits to stroke to path convention or export to other image formats.


STEPS TO REPRODUCE
1. Open Krita
2. Add a SVG stroke, which is a sharp angle consist of two curves
3. Set stroke color and width
4. Set stroke-linejoin: arcs property for stroke
5. See error

OBSERVED RESULT
The sharp angle looks still straight, not curved.

EXPECTED RESULT
The sharp angle should be curved as well

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
See MDN Web Docs:
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linejoin
Comment 1 Dmitry Kazakov 2023-08-30 13:04:48 UTC
Hi, Volga!

Thank you for your report! 

This option is an extension of SVG2, which is neither officially supported nor targeted by Krita. So I will downgrade this report to a wishlist. When we start working on full integration with SVG2, we shall look into it.

The relevant part of SVG2 sepcification:
https://www.w3.org/TR/SVG2/painting.html#LineJoin
Comment 2 Volga 2023-09-07 12:53:39 UTC
Yeah, althrough this is part of of SVG 2, it's meanful for graphic design, for example, if you want to create a shape with multiple layers of outline, while the stroke go through an arcs corner, this value would allow all layers curved as well at there, rather than ugly straight corner, thus you will be able to produce desirable design, even if other SVG-capable softwares can't support this, you can also choose to convert such stroke into path. So when you wnat to got support for SVG 2, you should pay attention to such innovative value, and give higher priority to implement, thus making Krita better.
Comment 3 Volga 2024-04-29 16:15:53 UTC
In this draft, W3C gives some instructions to you, which would help you to build strokes from curves corner for more desirable look, and pave ways of proper rendition for three types of curves.

https://svgwg.org/svg2-draft/painting.html#CurvatureCalculation