Bug 430165 - When working on a vector layer and applying a colour gradient to a line and manually moving the direction arrow (or vector) from the gradient, if the layer is exported as .SVG then the exported result is blank.
Summary: When working on a vector layer and applying a colour gradient to a line and m...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (other bugs)
Version First Reported In: 4.4.1
Platform: Snap Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-08 20:04 UTC by Víctor
Modified: 2021-05-20 20:50 UTC (History)
1 user (show)

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


Attachments
The steps to reproduce are recorded using krita for Linux (Snap) (2.06 MB, video/x-matroska)
2020-12-08 20:04 UTC, Víctor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Víctor 2020-12-08 20:04:48 UTC
Created attachment 133938 [details]
The steps to reproduce are recorded using krita for Linux (Snap)

SUMMARY

When working on a vector layer and applying a colour gradient to a line and manually moving the direction arrow (or vector) from the gradient, if the layer is exported as .SVG then the exported result is blank. 

STEPS TO REPRODUCE
1. Add new vector layer
2. Draw a line
3. Apply a colour gradient (any)
4. Move the arrow of the gradient direction
5. Layer > Import/Export > Save layer as .SVG
6. Blank final result

OBSERVED RESULT

The exported vector layer is blank.

EXPECTED RESULT

The line with the colour gradient should appear in the exported result. 

SOFTWARE/OS VERSIONS

macOS: Y
Linux/KDE Plasma: Y

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2020-12-11 11:12:30 UTC
I can confirm this for the 4.3.0 and 4.4.2-beta-1 appimages.
As noted, it happens when you adjust the gradient start and end point handles.

The resulting .svg file does not display in an .svg capable file viewer but if it's Imported back into krita then it looks ok.

If the .svg file is opened in Inkscape, the image is blank but the line fill gradient control handles seem to be in the correct location. If you set the line fill to solid colour then the vector object is there.

A similar vector object, created in Inkscape, with a rotated gradient line fill, then passed to krita via an .svg file has very offset start and end points on the gradient control line.

Setting to Confirmed.
Comment 2 sh_zam 2021-05-20 20:50:34 UTC
Git commit d7911d93ccddb5759135261e46ffaa0b483110cf by Sharaf Zaman.
Committed on 20/05/2021 at 20:45.
Pushed by szaman into branch 'master'.

Bugfix: Stroke Gradient becomes invisible if edited

We set opacity of Stroke Fills to 0 when editing making them invisible.
Currently there is no way to change opacity of a stroke as whole (which
are filled with gradient).

M  +3    -2    libs/flake/svg/SvgStyleWriter.cpp

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