Applying the same gradient to several objects at once

Post questions on how to use or achieve an effect in Inkscape.
Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Applying the same gradient to several objects at once

Postby Raspi » Mon Nov 14, 2016 9:37 pm

Lets say i have text (converted to paths and ungrouped) or 5 rectangles in a row.
How do apply the same gradient at an angle of, say, 45° to all objects at once ?
Also how do i change the gradient so that its applied to all the other objects with the same gradient ?

So far i tried the following:

1.) select all objects, set the gradient angle in the Preferences at 45°.
Result: the gradient is somewhat centered in the middle. If i change the handles of one gradient, the others stay the same.

2.) copy the object with the positioned gradient and paste the style on the others obejcts.
Result: the gradient seems applied in a way, as if the other objects are a mask.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Applying the same gradient to several objects at once

Postby Lazur » Mon Nov 14, 2016 9:50 pm

Hi.

I'd try rotating the objects first -45°, then add the gradient, and rotate them back 45° to finish.

Gradients are heavily related to transformations, so ungrouping the objects may also be necessary.

There is an option in the gradient editor tool since 0.91 wether to link all gradients to one's edit or not.
In 0.48 you just had to edit the gradient definition with the since removed gradient editor dialog instead of using the node tool.

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Applying the same gradient to several objects at once

Postby Raspi » Mon Nov 14, 2016 10:02 pm

That rotating trick works, but i have to set the gradient-angle at 90°in the Preferences.
It feels a little odd, though ;)

Unchecked the "Prevent sharing of gradient definitions". That still doesnt apply changes in direction to all the gradients.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Applying the same gradient to several objects at once

Postby Lazur » Mon Nov 14, 2016 10:46 pm

Image

With default settings.

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Applying the same gradient to several objects at once

Postby Raspi » Mon Nov 14, 2016 11:39 pm

Lazur wrote:There is an option in the gradient editor tool since 0.91 wether to link all gradients to one's edit or not.


Are we talking here about the little lock next to the gradient in the toolbar, or about the checkbox inside the Preferences Editor ?
Are these two the same thing ?


Also when i change the direction of the gradient, the other gradients stay the same. They dont move. I have to apply changes individually.
Only the colors change in unison.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Applying the same gradient to several objects at once

Postby Lazur » Tue Nov 15, 2016 12:06 am

The padlock and the preference's option should be the same.

Other than that, there is no built in way to edit each gradient's handle's direction at once.
Gradients are stored in the defs and linked to each fill where with each object they get a separate transformation.
Editing the defs is doable.
For, like rotating the direction, you need to do some tricks like the mentioned transforming of the objects.
Or use those objects to clip/mask clones of the object you want the fill to be parent.


Return to “Help with using Inkscape”