feat: adding ClipComponent
Description
Adds a new component called ClipComponent that clips the canvas area based on its size and shape.
Checklist
- [x] The title of my PR starts with a Conventional Commit prefix (
fix:,feat:,docs:etc). - [x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
- [x] I have updated/added tests for ALL new/updated/fixed functionality.
- [x] I have updated/added relevant documentation in
docsand added dartdoc comments with///. - [x] I have updated/added relevant examples in
examples.
Breaking Change
- [ ] Yes, this is a breaking change.
- [x] No, this is not a breaking change.
Related Issues
Related issue: #1274
@alestiago @st-pasha @renancaraujo @spydon here is what I am going to do. I will keep the rect, circle and polygon constructors as they are a nice and friendlier API than to just receive a Shape.
I will refactor so this uses a shape internally too, so I can easily implement the containsPoint method.
I will not include a constructor that receive a Shape yet though, since that class is on the experimental package. But since it will be used internally, it will be super simple to add that constructor once it gets out of the experimental state.
it will be super simple to add that constructor once it gets out of the experimental state.
I guess we never actually discussed about when to move things out of experimental. Should it be after some future release? After a certain features that are currently lacking are implemented? Any other trigger?
I guess we never actually discussed about when to move things out of experimental. Should it be after some future release? After a certain features that are currently lacking are implemented? Any other trigger?
I think it can vary depending on the complexity of the feature. But we should definitely discuss on some guidelines, maybe it is worth to open a discussion or an issue so we can discuss that.