Short question:
On the Tool Controls Bar there is an option to scale (or not) the stroke proportionally when resizing/scaling objects.
It seems that tiled clones are ignoring this setting.
Is there way to tell "Tiled Cloning" NOT to scale the stroke?
Tiled clones: stroke is always scaled
Tiled clones: stroke is always scaled
Win7/64, Inkscape 0.92.2
Re: Tiled clones: stroke is always scaled
Does it work correctly when you unset the stroke on the original? Can't test right now.
(there seem to be quite a few bugs related to this, I only just stumbled about the clones loosing their stroke width... see https://answers.launchpad.net/inkscape/+question/633481 , last couple of comments)
(there seem to be quite a few bugs related to this, I only just stumbled about the clones loosing their stroke width... see https://answers.launchpad.net/inkscape/+question/633481 , last couple of comments)
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: Tiled clones: stroke is always scaled
Seems the issue exists when stroke is unset.
Win8.1/64, Inkscape 0.92.1 r15371
Win8.1/64, Inkscape 0.92.1 r15371
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: Tiled clones: stroke is always scaled
Seems to work for me if you unset the stroke on the original, then explicitly set the stroke on the clones once they've been created. It's nothing to do with the state of the toolbar button. Not exactly the best workflow though (in fact anything that involves unsetting the stroke is tricky and confusing, IMO).
Re: Tiled clones: stroke is always scaled
@Xav, hmmm, doesn't work for me.
I start with a yellow rectangle, stroke "unset".
If I "tile clone" + scale this, I get clones with a red stroke which get's thicker.
If I click on the clones it says in the status bar, fill: red, stroke: red
Completely out of the blue...
If I set the stroke of a clone to a different value it tells me in the status bar that the value has changed but it fact it stays (visually) the same.
I start with a yellow rectangle, stroke "unset".
If I "tile clone" + scale this, I get clones with a red stroke which get's thicker.
If I click on the clones it says in the status bar, fill: red, stroke: red
Completely out of the blue...
If I set the stroke of a clone to a different value it tells me in the status bar that the value has changed but it fact it stays (visually) the same.
Win7/64, Inkscape 0.92.2
Re: Tiled clones: stroke is always scaled
Try selecting your original object and removing the stroke entirely (context menu on the stroke swatch at the bottom left of the window). Then unset it afterwards. There does seem to be some inconsistency as to what happens if you've played around with the stroke on either the object or the clones previously. I was able to get this workflow to work consistently:
1) New document.
2) Draw a yellow square.
3) Remove stroke on the square (even if none is visible).
4) Unset stroke.
5) Create tiled clones.
6) Select the clones, but not the original object.
7) Set the desired stroke colour and width.
1) New document.
2) Draw a yellow square.
3) Remove stroke on the square (even if none is visible).
4) Unset stroke.
5) Create tiled clones.
6) Select the clones, but not the original object.
7) Set the desired stroke colour and width.
Re: Tiled clones: stroke is always scaled
Sorry, @Xav, I exactly followed your steps... opened a new file... I still got red strokes with different width.
... ok, well, I had a second instance of Inkscape running...
When I closed that one and started over it seemed to work.
However, I cannot always create a new document and start from scratch. It should be possible on any existing file! Independent on how many instances of Inkscape are running.
Something else is interfering...?! Some default/temporary settings...? Hidden somewhere...? Apparently, it depends on the stroke history...?
... ok, well, I had a second instance of Inkscape running...
When I closed that one and started over it seemed to work.
However, I cannot always create a new document and start from scratch. It should be possible on any existing file! Independent on how many instances of Inkscape are running.
Something else is interfering...?! Some default/temporary settings...? Hidden somewhere...? Apparently, it depends on the stroke history...?
Win7/64, Inkscape 0.92.2
Re: Tiled clones: stroke is always scaled
The steps above were just to show that it can work. The problem is down to the fact that "unset" is a crude tool, particularly when it comes to strokes. A stroke isn't a single value to unset, but a combination of things - the colour, width, join-style, mitre-limit, end caps, dash array, and more.
When you unset the stroke on the parent object, what it really means is "use the clone's values for any of the stroke properties that are not set on the parent". If any of those properties are set on the parent, they will override the value on the clone. That's the problem you're seeing - the width is still set on the parent, even though you've "unset" the stroke.
Here's a demonstration of the problem:
1) Follow the steps in my previous post (with all other instances of Inkscape closed, if necessary) to get to a point where you have several clones with the same stroke width and colour. Give each one a different colour stroke, for good measure.
2) Select the parent object.
3) Right-click on the stroke width in the bottom left of the Inkscape window and select a much thicker or thinner width for the parent.
4) Notice that the parent is still showing as "unset", but the clones have adopted the base width from the parent (which will then get scaled with each clone). But each clone will still have its own stroke colour, as that is still "unset".
5) Remove the stroke on the parent completely. That gets rid of all the properties, including the stroke width.
6) Unset the stroke again, and the clones should go back to their own individual colours and stroke widths.
It can be a bit easier to see what's going on if you open the XML editor and look at the "style" attribute of the parent. When it has none of the stroke properties the clones will use their own; if some are present, they will override the clone's. Note what happens to the stroke-width property as you follow the steps above.
So if you have this issue in another document, try removing the stroke before unsetting it. If that still fails, check the XML editor and manually remove any "stuck" stroke properties.
When you unset the stroke on the parent object, what it really means is "use the clone's values for any of the stroke properties that are not set on the parent". If any of those properties are set on the parent, they will override the value on the clone. That's the problem you're seeing - the width is still set on the parent, even though you've "unset" the stroke.
Here's a demonstration of the problem:
1) Follow the steps in my previous post (with all other instances of Inkscape closed, if necessary) to get to a point where you have several clones with the same stroke width and colour. Give each one a different colour stroke, for good measure.
2) Select the parent object.
3) Right-click on the stroke width in the bottom left of the Inkscape window and select a much thicker or thinner width for the parent.
4) Notice that the parent is still showing as "unset", but the clones have adopted the base width from the parent (which will then get scaled with each clone). But each clone will still have its own stroke colour, as that is still "unset".
5) Remove the stroke on the parent completely. That gets rid of all the properties, including the stroke width.
6) Unset the stroke again, and the clones should go back to their own individual colours and stroke widths.
It can be a bit easier to see what's going on if you open the XML editor and look at the "style" attribute of the parent. When it has none of the stroke properties the clones will use their own; if some are present, they will override the clone's. Note what happens to the stroke-width property as you follow the steps above.
So if you have this issue in another document, try removing the stroke before unsetting it. If that still fails, check the XML editor and manually remove any "stuck" stroke properties.
Re: Tiled clones: stroke is always scaled
Thank you, @Xav.
Your detailed explanations made a bit clearer.
So, again for me to summarize: It's not possible to directly create scaled Tiled Clones without scaling the stroke at the same time.
You always have to:
1. remove the stroke of the original
2. unset the stroke of the original
3. set the desired stroke of all clones only (not of the original)
So far so good.
If I want to change the stroke of the clones I always have to work on the clones, leaving the original unchanged. Otherwise if I change the stroke of the original then the stroke of all clones will be scaled again.
So, I would have to select all clones again... etc... Well, this might be tedious to select all clones again if you have e.g. clones randomized all over the place. (Well, there might be a tool to select them easily?)
That's why I hoped that there is a checkbox which simply keeps the stroke width of the clones the same as the original.
With this, the actual original object is without stroke, which is not intended. So what to do with the original? Always hiding it behind the first clone? I tried to delete it but then all clones are unlinked and become independent objects.
Your detailed explanations made a bit clearer.
So, again for me to summarize: It's not possible to directly create scaled Tiled Clones without scaling the stroke at the same time.
You always have to:
1. remove the stroke of the original
2. unset the stroke of the original
3. set the desired stroke of all clones only (not of the original)
So far so good.
If I want to change the stroke of the clones I always have to work on the clones, leaving the original unchanged. Otherwise if I change the stroke of the original then the stroke of all clones will be scaled again.
So, I would have to select all clones again... etc... Well, this might be tedious to select all clones again if you have e.g. clones randomized all over the place. (Well, there might be a tool to select them easily?)
That's why I hoped that there is a checkbox which simply keeps the stroke width of the clones the same as the original.
With this, the actual original object is without stroke, which is not intended. So what to do with the original? Always hiding it behind the first clone? I tried to delete it but then all clones are unlinked and become independent objects.
Win7/64, Inkscape 0.92.2
Re: Tiled clones: stroke is always scaled
Yes, your summary is broadly correct, but there are a couple of things that could make your process easier:
1) To select all the clones, use the Find/Replace dialog. Leave the Find field empty, expand the "Options" section and restrict "Object types" to only Clones. If you have multiple sets of clones on your page, use the "Scope" buttons to limit the search.
2) Once you've got all the clones you want selected, you can use the Object > Selection Sets dialog (new in 0.92) to save that selection to re-use later.
Because the clones use their own values for properties that are not set on the parent, you can also use this workflow (though it requires you to be comfortable with the XML dialog):
1) Create your parent object and its clones.
2) Select the clones and give them the stroke width you want. At this point you'll see no change, because your value is being overridden by the one on the parent, but it is still saved against each clone.
3) Select the parent object (select a clone, then press SHIFT-D), then open Edit > XML Editor.
4) Select the "style" property in the pane on the right.
5) Edit the style to remove the "stroke-width:4;" section (where 4 is the width you set on the parent).
6) Click the "Set" button to apply the new style to the parent.
7) The clones should now be using their own stroke widths.
Importantly, you can still change the stroke colour or style of the parent, and those properties will be inherited by the clones. Depending on what you change, the stroke-width might also get set, in which case you need to follow steps 3-7 above to remove it from the parent's style and let the clones use their own width again. It's not as tricky as it sounds from the description above.
1) To select all the clones, use the Find/Replace dialog. Leave the Find field empty, expand the "Options" section and restrict "Object types" to only Clones. If you have multiple sets of clones on your page, use the "Scope" buttons to limit the search.
2) Once you've got all the clones you want selected, you can use the Object > Selection Sets dialog (new in 0.92) to save that selection to re-use later.
Because the clones use their own values for properties that are not set on the parent, you can also use this workflow (though it requires you to be comfortable with the XML dialog):
1) Create your parent object and its clones.
2) Select the clones and give them the stroke width you want. At this point you'll see no change, because your value is being overridden by the one on the parent, but it is still saved against each clone.
3) Select the parent object (select a clone, then press SHIFT-D), then open Edit > XML Editor.
4) Select the "style" property in the pane on the right.
5) Edit the style to remove the "stroke-width:4;" section (where 4 is the width you set on the parent).
6) Click the "Set" button to apply the new style to the parent.
7) The clones should now be using their own stroke widths.
Importantly, you can still change the stroke colour or style of the parent, and those properties will be inherited by the clones. Depending on what you change, the stroke-width might also get set, in which case you need to follow steps 3-7 above to remove it from the parent's style and let the clones use their own width again. It's not as tricky as it sounds from the description above.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Tiled clones: stroke is always scaled
... Once you've got all the clones you want selected, you can use the Object > Selection Sets dialog (new in 0.92) to save that selection to re-use later.
Beware, selection sets will be deleted when using document cleanup.
https://bugs.launchpad.net/inkscape/+bug/1652510
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: Tiled clones: stroke is always scaled
Uuuh :-/ Didn't know about that bug yet. Thanks for the warning, TD!
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)