Bug 402250

Summary: Arrow markers looks terrible, Inkscape has more useful ones
Product: [Applications] krita Reporter: Tiar <tamtamy.tymona>
Component: Tools/VectorAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: bugs-kde, dimula73, griffinvalley
Priority: NOR    
Version First Reported In: 4.1.7   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The attached screenshots shows both markers: the invalid one (left one) and the new better one got from Inkscape (right one). There is no way to get this marker in Krita.

Description Tiar 2018-12-17 18:09:08 UTC
Created attachment 116969 [details]
The attached screenshots shows both markers: the invalid one (left one) and the new better one got from Inkscape (right one). There is no way to get this marker in Krita.

SUMMARY
The lines are visible behind arrows and I see no way to make them less visible unless I use transparency mask. 

After opening the svg exported layer in Inkscape, you can see the same view, which means the rendering is (probably) correct. But in Inkscape 0.92.3 you can select different arrows that covers the line correctly. Importing to Krita those changed arrows works correctly: arrows are rendered like in Inkscape (without visible lines). Unfortunately there is still no way to select those other markers in Krita.

The attached screenshots shows both markers: the invalid one (left one) and the new better one got from Inkscape (right one). There is no way to get this marker in Krita.


STEPS TO REPRODUCE
1. Make a new vector line. Select arrows pointing outwards.
OBSERVED RESULT
1a. Lines visible behind arrows.
EXPECTED RESULT
1b. Arrows covers the lines.

2. Save layer as svg, open in Inkscape, change markers to a different arrows that covers the lines. It is possible. Save file.

3. Open svg in Krita. Marker rendered correctly, no line visible behind arrow. Change marker.
OBSERVED RESULT
3a. No way to change marker to something that covers the lines.
EXPECTED RESULT
3b. It is possible to choose markers similar to those in Inkscape.


SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
I've heard Krita has marker file from Inkscape and it's possible that Inkscape improved their markers after Krita got the file. I was asked to make a bug report as a note to remember to retrieve the newer file.
Comment 1 wolthera 2018-12-17 18:11:46 UTC
It shouldn't be too hard to update the default marker set, I think.
Comment 2 Tiar 2020-06-03 13:38:29 UTC
*** Bug 422371 has been marked as a duplicate of this bug. ***
Comment 3 Dmitry Kazakov 2020-06-04 21:00:27 UTC
SVG files for markers need adjusting of refX and refY attributes:

https://www.w3.org/TR/SVG11/painting.html#MarkerElement
Comment 4 Dmitry Kazakov 2020-06-05 19:03:36 UTC
Git commit 10c4734c15cfcfbd9884e4bdacb20bc94205b550 by Dmitry Kazakov.
Committed on 05/06/2020 at 19:03.
Pushed by dkazakov into branch 'krita/4.3'.

Fix arrow markers to look better

The markers were generated in Inkscape. And there they had a stroke of
1pt. But(!) in Inkscape, the meaning of pt/px is a bit different. In
Inkscape 1px equals 1mm. But is Krita 1px is more or less equal to 1 pt.
Therefore the arrows looked ugly.

This patch just sets the arrow stroke width to a fixed value in 'px',
which solves the uncertainty caused by using configurable values.
2.8 = 72 pt/in / 25.4mm/in

M  +9    -9    libs/flake/styles/markers.svg

https://invent.kde.org/graphics/krita/commit/10c4734c15cfcfbd9884e4bdacb20bc94205b550
Comment 5 Dmitry Kazakov 2020-06-05 19:05:03 UTC
Git commit 0ffed8a5c678c0c8eb9f58611dea310c62e22661 by Dmitry Kazakov.
Committed on 05/06/2020 at 19:04.
Pushed by dkazakov into branch 'master'.

Fix arrow markers to look better

The markers were generated in Inkscape. And there they had a stroke of
1pt. But(!) in Inkscape, the meaning of pt/px is a bit different. In
Inkscape 1px equals 1mm. But is Krita 1px is more or less equal to 1 pt.
Therefore the arrows looked ugly.

This patch just sets the arrow stroke width to a fixed value in 'px',
which solves the uncertainty caused by using configurable values.
2.8 = 72 pt/in / 25.4mm/in

M  +9    -9    libs/flake/styles/markers.svg

https://invent.kde.org/graphics/krita/commit/0ffed8a5c678c0c8eb9f58611dea310c62e22661
Comment 6 Dmitry Kazakov 2020-06-05 19:57:37 UTC
Git commit d4f6ed09437b58bf5f2c2160262d65e37644a637 by Dmitry Kazakov.
Committed on 05/06/2020 at 19:05.
Pushed by dkazakov into branch 'krita/4.3.0'.

Fix arrow markers to look better

The markers were generated in Inkscape. And there they had a stroke of
1pt. But(!) in Inkscape, the meaning of pt/px is a bit different. In
Inkscape 1px equals 1mm. But is Krita 1px is more or less equal to 1 pt.
Therefore the arrows looked ugly.

This patch just sets the arrow stroke width to a fixed value in 'px',
which solves the uncertainty caused by using configurable values.
2.8 = 72 pt/in / 25.4mm/in

M  +9    -9    libs/flake/styles/markers.svg

https://invent.kde.org/graphics/krita/commit/d4f6ed09437b58bf5f2c2160262d65e37644a637