-
Notifications
You must be signed in to change notification settings - Fork 13
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
Shape loses its fill styling with successive subtracts #99
Comments
Making the second cut changes the nature of the shape from a single shape to a GROUP shape (now having 2 child shapes). During shape boolean operations, PGS creates a new, non-stylised shape. To preserve styling (color, fill, etc.) it then copies the style of the input shape to the new shape. In your case the new shape is a GROUP shape and the apply styling operation is happening to the group shape, but that doesn't automatically apply styling to child shapes -- I suppose this is an oversight in the code. For now you can use this to get the styling as intended:
|
Thanks, that makes sense. It seems surprising when you are not familiar with the internals of it, especially when I see that From my novice point of view I would have expected that these 2 lines you provided are somehow automatically applied. Anyway, for my current usage, I'll manage with this workaround, feel free to close this issue if you consider you won't touch the current behavior. Thanks again! |
Yes, I agree. It's oversight in the code and I'll fix it. |
Hello,
Your library is (almost) a life savior for me, thanks!
I have an issue with a shape that I want to create. I want so subtract several rectangles from a circle, like so:
I would expect the result to be the same as the second shape + one more hole, but it loses its color.
Is there a limitation in subtractions, or did I discover a bug?
Thank you!
The text was updated successfully, but these errors were encountered: