Adding a different gradient to stroke and fill of an object
Adding a different gradient to stroke and fill of an object
Is there any way to do this easily? The gradient editor seems to be doing everything in its power to prevent me from getting there.
Also, is there any way to turn off the auto-clean feature for the gradients? I don't understand why I can't just create a gradient and keep it around for use later, and not have it disappear as soon as it's deselected.
Also, is there any way to turn off the auto-clean feature for the gradients? I don't understand why I can't just create a gradient and keep it around for use later, and not have it disappear as soon as it's deselected.
Re: Adding a different gradient to stroke and fill of an object
Yes. Open the Fill and stroke dialog and choose different gradients for the fill and the stroke. With the gradient tool, make sure to not have the gradients linked.
There is no such autoclean feature, as far as I know. You need to trigger that with File > Clean up document, and for that you can set whether to remove swatches or not. What file format are you saving to?
There is no such autoclean feature, as far as I know. You need to trigger that with File > Clean up document, and for that you can set whether to remove swatches or not. What file format are you saving to?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Adding a different gradient to stroke and fill of an object
Looks like my version of Inkscape (0.92.2) is deleting gradients that have no users.
That leaves a couple of options:
Make a copy of the object and hide it on a layer
Save the gradients as a swatches, but ensure the cleanup button is unchecked in preferences. Otherwise, the swatches will auto-prune (before cleanup) just like the gradients do.
Notice that swatch #838 has zero users.
The attached SVG has one gradient, #884, that is not a swatch. If you delete that rectangle object, the gradient is also deleted. :-\
That leaves a couple of options:
Make a copy of the object and hide it on a layer
Save the gradients as a swatches, but ensure the cleanup button is unchecked in preferences. Otherwise, the swatches will auto-prune (before cleanup) just like the gradients do.
Notice that swatch #838 has zero users.
The attached SVG has one gradient, #884, that is not a swatch. If you delete that rectangle object, the gradient is also deleted. :-\
- Attachments
-
- grads1.svg
- (5.48 KiB) Downloaded 62 times
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Adding a different gradient to stroke and fill of an object
Okay, I checked, it's correct. However, gradients that you *name* will not be removed automatically. Give them a name in the editor, and they will stay, even when the object is removed.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Adding a different gradient to stroke and fill of an object
Moini wrote:...gradients that you *name* will not be removed automatically. Give them a name in the editor, and they will stay, even when the object is removed.
I was so excited, but alas, I must be doing something wrong. Named gradients also seem to go away when I delete a single user.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Adding a different gradient to stroke and fill of an object
Works for me. What version?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Adding a different gradient to stroke and fill of an object
Oookay. Work*ed* for me. What's that?...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Adding a different gradient to stroke and fill of an object
It works *sometimes*...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Adding a different gradient to stroke and fill of an object
Okay. The difference is that if I edit the gradient with the legacy gradient editor, it will not be cleaned out.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Adding a different gradient to stroke and fill of an object
It's not the name at all.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Adding a different gradient to stroke and fill of an object
There's the property 'inkscape:collect' set to 'always' on gradients edited with the old gradient editor. This property is not added to gradients that are edited on canvas only.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Adding a different gradient to stroke and fill of an object
I'm still running 0.92.2 on Win 8.1.
I used the legacy editor and also named the gradients, and.... it still purges the gradients from the defs when I delete the last user of a gradient.
At least the swatches are available as a fallback.
I used the legacy editor and also named the gradients, and.... it still purges the gradients from the defs when I delete the last user of a gradient.
At least the swatches are available as a fallback.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Adding a different gradient to stroke and fill of an object
Hm... That works for me, using 0.92.4 on Linux Mint 19 Tara. But it seems it's not intended to work - in 2013, someone removed that, so as not to clutter memory and gradient list with unused things.
Swatches would be the intended alternative, if they worked so well that one could trust them.
Problem with swatches is that:
- they fork gradients on edit (https://gitlab.com/inkscape/inbox/issues/648) (maybe that depends on the preferences setting for linking gradients)
- they don't keep radial gradients (https://gitlab.com/inkscape/inbox/issues/647)
- and probably many usability issues and other bugs ...
Swatches would be the intended alternative, if they worked so well that one could trust them.
Problem with swatches is that:
- they fork gradients on edit (https://gitlab.com/inkscape/inbox/issues/648) (maybe that depends on the preferences setting for linking gradients)
- they don't keep radial gradients (https://gitlab.com/inkscape/inbox/issues/647)
- and probably many usability issues and other bugs ...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: Adding a different gradient to stroke and fill of an object
Oh, I also submitted a feature request for a 'last used styles' list.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Adding a different gradient to stroke and fill of an object
Here's what I see happening...
With the new gradient editor, the inkscape:collect attribute is added to any new parent gradient, and to any duplicates made from that parent. The attribute causes the gradients to purge when the last object using the gradient is deleted.
This can be overcome by deleting the attribute on the parent gradient in the defs, using the XML editor. A duplicate of the edited gradient can be spawned without the attribute, by using the plus-sign in the Fill/Stroke dialog, or by using the edited parent gradient on another object, then changing its colors to create new gradients.
Gradients without the attribute will still be removed when the document is cleaned, if no objects are using them.
Another way to remove the attribute is to use the legacy gradient editor, but the process must use the edit-gradient button in the Fill/Stroke dialog.
With the new gradient editor, the inkscape:collect attribute is added to any new parent gradient, and to any duplicates made from that parent. The attribute causes the gradients to purge when the last object using the gradient is deleted.
This can be overcome by deleting the attribute on the parent gradient in the defs, using the XML editor. A duplicate of the edited gradient can be spawned without the attribute, by using the plus-sign in the Fill/Stroke dialog, or by using the edited parent gradient on another object, then changing its colors to create new gradients.
Gradients without the attribute will still be removed when the document is cleaned, if no objects are using them.
Another way to remove the attribute is to use the legacy gradient editor, but the process must use the edit-gradient button in the Fill/Stroke dialog.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Adding a different gradient to stroke and fill of an object
So that's basically the opposite from what I saw... I'm confused, but too tired to re-check at the moment. Patrick suggested to make a bug report about this, as the inconsistent behaviour is strange, so devs could figure out what to do, and decide if they should do anything about it. Would you like to make one, tylerdurden?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Adding a different gradient to stroke and fill of an object
Moini wrote:Patrick suggested to make a bug report about this, as the inconsistent behaviour is strange, so devs could figure out what to do, and decide if they should do anything about it. Would you like to make one, tylerdurden?
Will do.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Adding a different gradient to stroke and fill of an object
Bug report here:
https://gitlab.com/inkscape/inbox/issues/655
https://gitlab.com/inkscape/inbox/issues/655
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: Adding a different gradient to stroke and fill of an object
Thank you!
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)