-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for invariants on BezPath #284
Comments
is this in order to match the semantics of SVG's |
The motivation is partly to match SVG's semantics, and partly to represent paths that can be encoded more efficiently (in Vello) when the endpoint of one subpath matches the start point of another - in that case, in all APIs I've researched (going back to PostScript), the moveto of the second subpath can be elided. I'd rather not have a proliferation of types if that can be avoided. If there is actual breakage, I'd like to know about it and figure out the best solution to address it. One idea that comes to mind is a validation method that can be applied when stricter semantics are needed, otherwise the relaxed semantics would be in place. One problem that occurs to me about allowing (0.0, 0.0) as a default start point when there is no initial moveto is that paths are no longer translation invariant, at least by straightforward element-wise application of the transform. |
Hmm perhaps I'm convinced that the first MoveTo should stay, given what's been said. Rather than remove invariant states, we could either prevent them (in this case checking the first element is MoveTo whenever it is changed). Getting mutable access to the elements would no longer be possible though, as the first element could be swapped out. Yet another option would be just to have the start point as a field on |
Should we relax the current restrictions on BezPath (must start with moveto, and allow segment straight after closepath)
The text was updated successfully, but these errors were encountered: