Hi,
We discussed variable placement of stroke (e.g. inside/outside/10% inside,90% outside). The key to implementing this is having a good way to offset a path as then one can use existing rendering libraries to draw the stroke (including things like dashes, line-caps).
If I can provide a clear (testable) algorithm for how to offset a path, there is a good chance we can get this into SVG 2. The current Inkscape code for offsetting is a bit buggy. I believe lib2geom has better code. Can anybody comment?
Thanks,
Tav
Hi Tav, Very quick reply. Powerstroke does/should do path offsetting. You can visualize that by displaying the stroke of the generated path instead of filling it. In the attached example, you can see what happens. For some offsets, troubles arise that I do not know how to solve (as a human).
regards, Johan
On 26-8-2014 17:36, Tavmjong Bah wrote:
Hi,
We discussed variable placement of stroke (e.g. inside/outside/10% inside,90% outside). The key to implementing this is having a good way to offset a path as then one can use existing rendering libraries to draw the stroke (including things like dashes, line-caps).
If I can provide a clear (testable) algorithm for how to offset a path, there is a good chance we can get this into SVG 2. The current Inkscape code for offsetting is a bit buggy. I believe lib2geom has better code. Can anybody comment?
Thanks,
Tav
Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Tue, 2014-08-26 at 21:56 +0200, Johan Engelen wrote:
Hi Tav, Very quick reply. Powerstroke does/should do path offsetting. You can visualize that by displaying the stroke of the generated path instead of filling it. In the attached example, you can see what happens. For some offsets, troubles arise that I do not know how to solve (as a human).
The trouble you point out in the sample SVG can be solved by doing path intersections (think fill-rule non-zero). A more interesting problems is when the handle for an end node is on the "wrong" side.
BTW, Gravit has path inset/offset:
The code has been open-sourced:
http://libregraphicsworld.org/blog/entry/quasado-opensources-gravit-web-base...
Tav
On 3-9-2014 11:50, Tavmjong Bah wrote:
On Tue, 2014-08-26 at 21:56 +0200, Johan Engelen wrote:
Hi Tav, Very quick reply. Powerstroke does/should do path offsetting. You can visualize that by displaying the stroke of the generated path instead of filling it. In the attached example, you can see what happens. For some offsets, troubles arise that I do not know how to solve (as a human).
The trouble you point out in the sample SVG can be solved by doing path intersections (think fill-rule non-zero). A more interesting problems is when the handle for an end node is on the "wrong" side.
So what you want is just Powerstroke's behavior? (rounded joins, butt ends)
BTW, Gravit has path inset/offset:
The code has been open-sourced:
http://libregraphicsworld.org/blog/entry/quasado-opensources-gravit-web-base...
I don't agree with the results that Gravit produces... (path inside/outside produces weird results at the path's end)
cheers, Johan
On Wed, Sep 3, 2014 at 10:17 AM, Johan Engelen <jbc.engelen@...2592...> wrote:
I don't agree with the results that Gravit produces... (path inside/outside produces weird results at the path's end)
Also, path insetting can produce some rather unexpected results. In the following image two different issues are showing up. https://www.dropbox.com/s/yjwmork5vukg5j3/gravit-inset.png?dl=0
Cheers, Josh
On Wed, 2014-09-03 at 15:10 -0700, Josh Andler wrote:
On Wed, Sep 3, 2014 at 10:17 AM, Johan Engelen <jbc.engelen@...2592...> wrote:
I don't agree with the results that Gravit produces... (path inside/outside produces weird results at the path's end)
Also, path insetting can produce some rather unexpected results. In the following image two different issues are showing up. https://www.dropbox.com/s/yjwmork5vukg5j3/gravit-inset.png?dl=0
I agree that Gravit doesn't produce satisfactory results.
Tav
On Wed, 2014-09-03 at 19:17 +0200, Johan Engelen wrote:
On 3-9-2014 11:50, Tavmjong Bah wrote:
On Tue, 2014-08-26 at 21:56 +0200, Johan Engelen wrote:
Hi Tav, Very quick reply. Powerstroke does/should do path offsetting. You can visualize that by displaying the stroke of the generated path instead of filling it. In the attached example, you can see what happens. For some offsets, troubles arise that I do not know how to solve (as a human).
The trouble you point out in the sample SVG can be solved by doing path intersections (think fill-rule non-zero). A more interesting problems is when the handle for an end node is on the "wrong" side.
So what you want is just Powerstroke's behavior? (rounded joins, butt ends)
Not quite. I am preparing a web page to describe what I see as the problem in more detail... but I got some other half finished projects I want to finsish first.
Tav
Why not an algorithm based on what the Cross-smooth filter does, like in this svg example ?
This filter is based on Gaussian blur.
ivan
Le 03/09/14 11:50, Tavmjong Bah a écrit :
On Tue, 2014-08-26 at 21:56 +0200, Johan Engelen wrote:
Hi Tav, Very quick reply. Powerstroke does/should do path offsetting. You can visualize that by displaying the stroke of the generated path instead of filling it. In the attached example, you can see what happens. For some offsets, troubles arise that I do not know how to solve (as a human).
The trouble you point out in the sample SVG can be solved by doing path intersections (think fill-rule non-zero). A more interesting problems is when the handle for an end node is on the "wrong" side.
BTW, Gravit has path inset/offset:
The code has been open-sourced:
http://libregraphicsworld.org/blog/entry/quasado-opensources-gravit-web-base...
Tav
Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (4)
-
ivan louette
-
Johan Engelen
-
Josh Andler
-
Tavmjong Bah