Hi all, Jabier has found a fairly common case where LPE Powerstroke is behaving unintuitive / unstable / scale-dependent. See the attachment.
Both paths are exactly the same, except for a very slight (y-coord) change in the right-most width control knot. This instability happens because of how the interpolation between width knots is done. [*] The fix I propose, and committed to experimental in rev. 13620, is to do the interpolation in a 'proper' coordinate system, using the length of the path as a scaling factor for the width knot offsets. This removes the unstable behavior, and also removes the scale-dependent output (noticeable when scaling the path: the result changes if the width points scale with the same factor).
Please test if you like this behavior better. (Compare the attached file in trunk and experimental.)
The problem is that for some cases, this will change the result of powerstroked paths dramatically. Can we apply such changes so shortly before release? An alternative is changing it after release, which would be even worse in my opinion.
regards, Johan
[*] It's technical, but here goes quickly for who is interested. Knots are treated as [offset along path, width] points. The offset along path is the segment number + the location along that segment. The width is (may not be true, but for ease of discussion) in canvas coordinates. This means that the interpolation is performed in a *very* compressed coordinate system, where the x-coords may range from, say, 0 to 5, and the y-coords from 0 to 2000. This is also scale dependent; changing the scale of your path and scaling all widths accordingly will change the look of your path. (The implementation of this scaling is implemented by Jabier and I will commit it shortly.)
2014-10-18 17:01 GMT+02:00 Johan Engelen <jbc.engelen@...2592...>:
The problem is that for some cases, this will change the result of powerstroked paths dramatically. Can we apply such changes so shortly before release? An alternative is changing it after release, which would be even worse in my opinion.
I think these changes should be applied. Scale dependence and instability are bad things, and we can't be expected to support backwards compatibility with unreleased features.
Regards, Krzysztof
On 19-10-2014 17:07, Krzysztof Kosiński wrote:
2014-10-18 17:01 GMT+02:00 Johan Engelen <jbc.engelen@...2592...>:
The problem is that for some cases, this will change the result of powerstroked paths dramatically. Can we apply such changes so shortly before release? An alternative is changing it after release, which would be even worse in my opinion.
I think these changes should be applied. Scale dependence and instability are bad things, and we can't be expected to support backwards compatibility with unreleased features.
As we've branched off, I've committed this change to trunk now too.
-Johan
participants (3)
-
Jabiertxo Arraiza Cenoz
-
Johan Engelen
-
Krzysztof Kosiński