-
Notifications
You must be signed in to change notification settings - Fork 142
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
API question: negative space / cutouts #596
Comments
We don't have that feature. Are you using this path as a clip or a fill? In the latter case, you need a bounding box somewhere (though I suppose it could ultimately be the viewport). Just reversing subpaths won't do it, but you can get some of the effect by adding an enclosing rectangle of the opposite winding. That won't be the same for self-intersecting paths though. I'd be open to adding some kind of feature for this, most likely a negative clip. Among other things, it's needed to support more of Skia's imaging model. |
Does this overlap with linebender/kurbo#277? |
Yes! I actually missed that issue when I was searching, thanks for the link. I'll go ahead and close this since my original question has been answered and the feature is being tracked elsewhere. |
Hey there! I have a bit of experience with Skia, and I'm trying to apply some of the techniques I've learned there to Vello, but I can't quite figure out how to handle negative space. For example, in Skia I can use
SkPath::reverseAddPath
to "subtract" a path from an existing one, which has the same effect as drawing the second path withSkPathFillType::kInverseWinding
: the second shape effectively cuts a hole out of the original. But I haven't been able to find anything similar yet with Vello. I tried usingBezPath::reverse_subpaths
+extend
, but that didn't seem to have the intended result. Is this not implemented yet, or am I just missing it?The text was updated successfully, but these errors were encountered: