PathOps with open paths

12 views
Skip to first unread message

Erik Sombroek

unread,
Jun 3, 2024, 9:09:57 PMJun 3
to skia-discuss
The image below illustrates the current Intersection (green) between open path (red) and closed path (blue) . When you clip the open red path with the closed blue path, it returns the green result.
As shown, the red path ends up being closed before being operated. I believe this happens because the SkOpEdgeBuilder sets fAllowOpenContours to false and adds the missing segment.

For my use case, it would be ideal if the operation only returned paths originally from the red path, making it more of a clipping operation than an intersection.

Additionally, it would be beneficial if we could union multiple open paths together without forcing them to close. This would function more like a combine.

Any pointers on where to look would be greatly appreciated. In the meantime, I'll continue experimenting.

image.png
Reply all
Reply to author
Forward
0 new messages