-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clone metrics path when a path is added
When multiple strokes are added to the same path with trim path applied to them, and some are affected by transform, and some aren't, there's contention between the localPath and worldPath metrics. This PR solves it by storing a unique metrics path per instance added. It copies the values from the original path so they aren't calculated more than needed. There was the same contention with follow paths and trim paths, and it was solved in a slightly similar way, but there might be ramifications I'm missing from this approach. NOTE: it also addresses this [TODO](https://github.com/rive-app/rive/blob/master/packages/runtime/src/shapes/metrics_path.cpp#L72), which ended up not being needed for this fix but left it since there was a TODO for it. I can remove it if it makes things more clear. Diffs= b58df4ba7 clone metrics path when a path is added (#6394) Co-authored-by: hernan <[email protected]>
- Loading branch information
Showing
4 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
124a8f4e23baa003af40515d04686e2960cc5809 | ||
b58df4ba70205b17dbe8f4e8204d0a78becabeaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters