Join and cap shape changing without user input

Post questions on how to use or achieve an effect in Inkscape.
Natural Reject
Posts: 24
Joined: Sun Jan 15, 2012 12:27 am

Join and cap shape changing without user input

Postby Natural Reject » Thu Mar 15, 2012 6:20 pm

I have a problem with how the stroke style is behaving when it comes to setting the tool style for :tool_pencil: and :tool_pen: .

Normally, if I create an object which has a path stroke, and the join and cap shapes are set to round, this setting will be preserved if I would turn the stroke paint off and then on again on that object. So far so good. My problem is that if I take this object and turn off the stroke paint, and then use that object to set the style for either :tool_pencil: or :tool_pen: , then it will not preserve the round join and caps, but reset them to miter join and butt cap if I were to turn stroke paint on for that new object. This is independant of whether the setting for creating new object is "Last used style" or if I use the "Take from selection" button using a set style for that tool.

Is there a workaround for this? I would like to be able to use "Last used style" for my pen tools without having to reset the stroke style every time my last object lacked stroke paint. As I mostly draw with round joins and ends it gets kind of frustrating needing to change it manually so often.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Join and cap shape changing without user input

Postby brynn » Fri Mar 16, 2012 11:12 am

I don't understand the problem. Of course if you turn off the stroke on an object, and use it to set the stroke style for Pen and Pencil tools in Inkscape Preferences, it won't retain any of the stroke properties (and probably revert to defaults). Because the object has no stroke, there are no properties to be saved. Then I assume it reverts to defaults.

If you set the stroke style using Inkscape Preferences, you should not have to keep changing it. So for example, if you set the stroke style to include rounded ends and corners, and this tool's own style, then that's what it will always draw.....until you change it again. But when you change it, and you set the style for the Pen or Pencil using an object with no stroke, those tools will again be using the defaults.

You should make the settings in Inks Prefs for the way that you usually use the tools. Then in cases where you need something different, just change that object.

I think the problem with me not understanding, is because you tried to say the whole problem in one sentence. Would you please write the steps for reproducing the problem?

Natural Reject
Posts: 24
Joined: Sun Jan 15, 2012 12:27 am

Re: Join and cap shape changing without user input

Postby Natural Reject » Fri Mar 16, 2012 10:30 pm

I suppose my main problem is that it actually does preserve some settings, but not all. I'll try to explain my reasoning a bit further and hopefully clearer.

I draw a shape using :tool_pencil: . I give the stroke of this object a red colour, 0.7 mm width and round joins and caps.
I turn off the stroke paint and leave the object alone for an indefinite amount of time.
I go back and turn the stroke paint on again.
The object will now show a stroke with a red colour, 0.7 mm width and round joins and caps.

This tells me that turning the stroke paint off doesn't erase the properties of the stroke, it just hides the stroke alltogether.

Now I select the object and turn the stroke paint off.
With the object still selected, in the preferences for :tool_pencil: under "Create new objects with:" I select "This tool's own style" and hit the "Take from selection" button.
I proceed to draw a new shape using :tool_pencil: .
I select my newly drawn shape and turn the stroke paint on.
The object will now show a stroke with a red colour, 0.7 mm width and miter joins and butt caps.

This is what confuses me. The colour and the stroke width are preserved, but the join and cap shapes aren't. If I copy the style of an object for my new shapes, then I expect the newly drawn objects to have the exact same properties as my copied style. If I turn the stroke paint on for both objects, I expect them to look the same (or at the least for all settings to be defaulted, not just some).

I did some quick testing, and I came up with this set of changes (or lack of changes) for when this procedure is done:

Colour: Same as previous object
Stroke width: Same as previous objects
Width unit: Same as previous objects
Join shape: Reset to Miter join
Miter limit: Reset to 4.00
Cap shape: Reset to Butt cap
Dash pattern and marker: Reset to none

I suppose using a preset style would help with this particular problem, but I had a good reason to want to use the "Last used style" (I just don't remember what it was right now...).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Join and cap shape changing without user input

Postby brynn » Sun Mar 18, 2012 3:03 am

To be honest, I don't know how it "remembers" the stroke width and color. I'm not surprised that it doesn't remember the corner and cap style. If there's a bug anywhere in this scenario, it seems to me it would be that Inkscape took a stroke width and color from the last object drawn, even though the object had no stroke at all when you did "take from selection". Because you literally saved no stroke style! Perhaps Inkscape doesn't allow that sort of thing, and somehow reverted to a default (which is Last Used Style). To my way of thinking, taking Pencil or Pen settings from selection of an object with no stroke at all, the next time you use it, it should draw no stroke at all!

What I don't understand from your scenario, is why you want to use the "take from selection" option (for Pen or Pencil) using an object with no stroke. That really makes no sense to me!

The corner and cap style are NOT changing without user input. There IS user input, and that is you, using an object with no stroke, to set the stroke style.

Natural Reject
Posts: 24
Joined: Sun Jan 15, 2012 12:27 am

Re: Join and cap shape changing without user input

Postby Natural Reject » Mon Mar 19, 2012 5:10 am

brynn wrote:To be honest, I don't know how it "remembers" the stroke width and color. I'm not surprised that it doesn't remember the corner and cap style. If there's a bug anywhere in this scenario, it seems to me it would be that Inkscape took a stroke width and color from the last object drawn, even though the object had no stroke at all when you did "take from selection". Because you literally saved no stroke style! Perhaps Inkscape doesn't allow that sort of thing, and somehow reverted to a default (which is Last Used Style). To my way of thinking, taking Pencil or Pen settings from selection of an object with no stroke at all, the next time you use it, it should draw no stroke at all!

brynn wrote:The corner and cap style are NOT changing without user input. There IS user input, and that is you, using an object with no stroke, to set the stroke style.

I would actually argue that there is a stroke. My reasoning is this:

In the Fill and Stroke tab, the road to hide the stroke is Stroke paint -> No paint. This suggests to me that I am NOT removing the stroke, only that it isn't painted. There is no "remove stroke" or "delete stroke" button, at least not in the Fill and Stroke tab. The Inkscape manual supports this view, as it quotes the option as "No paint (transparent)", which means to me that the stroke (or fill) is still there, but just completely see through.

There is a discrepancy in the "Inkscape: basic" tutorial. Here it actually says "you can remove the stroke (outline) of the object". However, since it does not specifically adress how to, I think this is just a poor choice of words as it is contradicting what is in the program itself.

So my interpretation (probably a much better one than I have given before) is that when I copy a style of an object that appears to have no stroke, I am actually copying a transparent stroke, and not a non-existing stroke.


On a separate note, this works when duplicating objects with Ctrl+D too.

brynn wrote:What I don't understand from your scenario, is why you want to use the "take from selection" option (for Pen or Pencil) using an object with no stroke. That really makes no sense to me!


Sometimes I want to draw several shapes that has no stroke. Why doesn't that make sense?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Join and cap shape changing without user input

Postby brynn » Mon Mar 19, 2012 12:37 pm

Sometimes I want to draw several shapes that has no stroke. Why doesn't that make sense?

2 reasons:

1 - The Pen and Pencil tools only draw paths, which require strokes to be visible. While they can be given a fill, in most uses of the Pen and Pencil, having a fill gives usually unacceptable results (like if you draw a line that curves one way, and then the other way, the fill shows up in the curves). I would be surprised if anyone has given those tools any fill properties, on purpose. If you happen to draw only or mostly closed shapes with those tools, I guess it would make sense to have a fill and no stroke.

2 - Typically one sets the tool styles in Inkscape Preferences for the way they use those tools most of the time. Then if they need to draw a few things differently, like with no stroke, they just remove the stroke. I would go crazy having to change the settings in Inks Prefs every time I need to remove a stroke!

I can't speak to the technical issues, of whether a stroke exists but is invisible, or whether it's completely removed, when you use No Paint (F/S dialog > Stroke Paint tab). I always thought the "No paint" label was just a way to avoid the confusion some people can have about the difference between paths and strokes. You may be over thinking it. You don't need to change the preference every time you need a different style -- just change it on the canvas :D

Oh, well you are correct in a sense, that the stroke exists but is not visible. But technically that's the path (as long as we're talking about the Pen and Pencil -- shapes are a different story). The path continues to exist even if you remove the stroke. Technically it is possible to have a path with no fill or stroke, but it's not selectable....or not easily selectable. That may have changed with a recent new version. At least it was the last time I read a discussion about either transparent strokes or strokes with 0 width. The last I knew for sure, you could select such a path using the selection box technique or Ctrl + A or Tab. But that's another story.


Return to “Help with using Inkscape”