[solved] How to realize invisible paths with visible markers?

Post questions on how to use or achieve an effect in Inkscape.
theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

[solved] How to realize invisible paths with visible markers?

Postby theozh » Sat Feb 25, 2017 7:36 pm

In some cases it might be desirable to place markers along a path but without having the path visible. The idea is to draw a path with markers and set the line width to zero. Actually, I would have expected that the markers also disappear. However, they don't and moreover they show a inconsistent behaviour:
1. draw a path, set stroke e.g. to 1 mm
2. choose start and end markers
3. set stroke to 0, markers are not gone (what I would have expected)
4. move this path: path is moved but markers keep size and stay at the same position (bug!?)
5. if you duplicate this path, the markers of the duplicate are gone

Left: Two paths (left stroke width 0.0, right stroke width 0.5mm)
Right: outline view
ZeroLineWidthWithMarkers.png
ZeroLineWidthWithMarkers.png (2.02 KiB) Viewed 2409 times
Do others also observe the above mentioned strange behaviour with line width zero?

If I look at the Fill&Stroke Dialog (Shift+Ctrl+F), apparently and unfortunately, the marker size cannot be set independent of the line width. (--> Feature request?)
Any ideas to realize an invisible path with visible markers?
As I understand the markes always have the same color as the stroke. I haven't found yet a way to have different color for path and markers. If I could make just the path fully transparent (i.e. opacity 0%) the problem would be solved.
... of course, I could do "stroke to path" but I am hoping for a better solution.
Last edited by theozh on Sun Feb 26, 2017 4:04 am, edited 1 time in total.
Win7/64, Inkscape 0.92.2

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

Re: How to realize invisible paths with visible markers?

Postby Lazur » Sat Feb 25, 2017 7:46 pm

Hi.

Markers are assigned to paths in their original size to paths with width of 1 px.
You can make them visible without the stroke rendered if you add 0 alpha to the stroke colour.

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How to realize invisible paths with visible markers?

Postby theozh » Sun Feb 26, 2017 12:30 am

sorry, I can't follow.
If I set the stroke color alpha to 0, the markers also become invisible.
Win7/64, Inkscape 0.92.2

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

Re: How to realize invisible paths with visible markers?

Postby brynn » Sun Feb 26, 2017 3:16 am

When I change the stroke width, the marker size changes proportionally.....for the most part. When I put the stroke width at 0, I can still see the marker, although I can't tell what it is - it just looks like a tiny dot. Although if I zoom in, I can see it's still the marker. It seems like the marker ought to disappear. Although if you wanted that, you could just remove the marker.

I agree that there ought to be a way to make the stroke disappear and leave the markers visible.

If I change the alpha value for the stroke, as Lazur suggested, the markers are also affected. Zero alpha, zero visibility of markers and stroke both.

I wonder if there might be a pref affecting this? Because it really needs to be possible to hide the stroke.

Ok, in Inkscape Preferences > Behavior > Markers, are 3 options. Maybe changing those can help? I'll try. But for sure, you can make the markers a different color from the stroke, by changing the pref. "Color" might include transparency (alpha or opacity).

Oh yes, it does! You just need to uncheck the appropriate option.

I don't have your same experience with #4 and #5. Markers move with stroke, and markers are duplicated with stroke.

Which version of Inkscape are you using? I think there might have been bugs like that with previous versions.

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How to realize invisible paths with visible markers?

Postby theozh » Sun Feb 26, 2017 4:04 am

Thanks, @brynn, for clarification. In contrast to me, @Lazur probably had these options already unchecked.
As I want to change the color of the line, in terms of good usability I certainly would expect an option or hint in the Fill&Stroke dialog... well, there might be a reason to do it this way...
Win7/64, Inkscape 0.92.2

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

Re: [solved] How to realize invisible paths with visible markers?

Postby brynn » Sun Feb 26, 2017 4:29 am

Well I think most people use markers for arrowheads. While there are other uses for markers, those where the stroke needs to not be seen are probably not very commonly used. Although if you have a use case that has been overlooked, you could always make a feature request.

Markers recently got a lot of attention (well, relatively a lot) from developers. It used to be markers could only be black, and you had to alter the XML code, to get a different color. Then if you change the stroke color, the marker would not change. Their size used to change exponentially to changes in the stroke width. So just a 0.1 or 0.2 px increase of stroke width would double the size of the marker. A 2 px wide stroke would make the marker huge! So that got fixed. And now we have the z-order for strokes and markers. So that's relatively a lot of improvements!

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

Re: [solved] How to realize invisible paths with visible markers?

Postby Lazur » Sun Feb 26, 2017 6:25 am

Oh there was an option to change the marker colour -probably got saved in the preferences because I can't recall changing it and had installed a few versions since.

Off topic:
Personally I think the handling of path style attributes is quite a mess. Probably due to the strict svg useage concept.
They put too many options to one object in the specs which will always call for brute-force solutions by the user for a specific problem regardless how general that use case would be.

For example this topic raised a good point way off the spec's capability.
(On a side note, way off how drafting specifications define dashed lines.)
Or in general, how defining a stroke's custom dasharray is always in the percentage of the stroke width, and rendered as set only if the stroke is 1 px wide (?).

Custom markers are brute-force solutions for effects that should be way simpler to pull off.
Like this one, positionong a set of objects along a path without bending.
Or, to bend a gradient along a path,
which, "should be" as simple as switching the gradient fill to a gradient mesh, and bending that.

These use cases might not be easy programmatically but there are no options other than "draw manually" -(and which hardly equals "draw freely").

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

Re: [solved] How to realize invisible paths with visible markers?

Postby brynn » Sun Feb 26, 2017 9:23 am

Hhmm...these thoughts of yours are over my head. I don't know how to answer. But I'd be interested to read developers' answers.

But don't you think that LPE will be a way to make the strict SVG usage easier? Like Jabier is already working on the dashes thing.

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

Re: [solved] How to realize invisible paths with visible markers?

Postby Lazur » Sun Feb 26, 2017 10:52 am

Off topic:
Yes, lpe-s can be a solution -hard-wired ones. There is no way a regular user could come up with a procedural drawing structure from scratch.
With an analogy lpe-s are the filter primitives you can rig together/put in a chain but there is no option on making one "filter primitive" from your own.

Like an option to design "dynamic blocks". As in msword, you have various drawing objects you can modify the shape by simple handles as you can do with the rectangle/star/ellipse tools.
Image

This topic was related to that functionality.
Personally I wouldn't think it is a good idea to blot in alot of such custom shapes -and filters for that matter- but the ability to make your own and easy share/loading them in would be better. If you could make your own shapes, of course.

How would that be with the developers?
The mentioned rectangle/star/ellipse are using svg shapes, only the 3D box is a hard-wired, "inkscape specific" "dynamic block".
Meaning there is no 3D box svg element, and that you can modify it more or less, preserving its structure -with the tool's handles in the first place-.
Off specs features are not welcomed, everyone remembers the flowed text option.
Also would need a conceptual rethinking of the gui, which is not likely to happen any time in the near future (?).

My guess would be such a structure that svg provides /inkscape is using for lpe-s is limiting on the performance. From an "outsider" point of view the rendering is truncated between the defs section and the object's data and needs to rely storing too much temporary information.
In general I think there are parts where inkscape's main use is maxing out the svg specs limits, while others as animation or javascript are kept to a minimum.

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

Re: [solved] How to realize invisible paths with visible markers?

Postby brynn » Sun Feb 26, 2017 11:21 am

How would that be with the developers?


I don't know. You'd have to ask.

But for all those "quick shapes" options, it seems like an extension could provide that very easily. Open the extension, choose which shape you want, done.

See, you have all these ideas. Why not take them to developers? I'm sure they would be willing to discuss it - assuming you're your usual polite self, and you don't drop it on them, in the middle of releasing a new version or something.

Currently there are a lot of interested people who aren't necessarily programmers either, who have been putting forth ideas, and you never know when something will catch on and a developer will become interested. On the near horizon will be some investigation, possible user testing, and possible changes to UX. In general, I think the UX for Inskcape is pretty good, but it sure could use some polishing in places. But that's been brought up by people who are not necessarily programmers, and it sounds like it's catching on. And sometimes there are developers looking for a project

And sometimes we have someone who decides to make some changes which are not necessarily good for all users. So it's valuable for developers to hear from people who are not programmers.

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

Re: [solved] How to realize invisible paths with visible markers?

Postby Lazur » Sun Feb 26, 2017 11:45 am

Off topic:
brynn wrote:But for all those "quick shapes" options, it seems like an extension could provide that very easily. Open the extension, choose which shape you want, done.


Guess you are right that they could be generated by an extension taking in all the parametres and that you could switch to a live preview, taking more seconds for updating, and then you'd need to click another button.

And sometime it could even end up as a path effect for a live updating -but why on earth would you start by drawing a path to have live updating on a parametric object that looks nothing like the path it was added to?
Like the gears lpe or the ellipse by 5 points lpe? Practically seaking there they would be hidden and their use wouldn't be intuitive at all.

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

Re: [solved] How to realize invisible paths with visible markers?

Postby brynn » Sun Feb 26, 2017 11:50 am

Your ideas are too much over my head, to be able to make any meaningful response. But I'd love to follow a discussion with developers.

Signing off for dinner :)

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: [solved] How to realize invisible paths with visible markers?

Postby Moini » Mon Feb 27, 2017 10:48 am

@brynn/Lazur: That 'quick shape' extension already exists: https://inkscape.org/en/~PacoGarcia/%E2 ... es-creator (but it's currently a bit more limited than Lazur's screenshot)
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)


Return to “Help with using Inkscape”