-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Added area
kwarg to mask.to_surface
#2670
base: main
Are you sure you want to change the base?
Added area
kwarg to mask.to_surface
#2670
Conversation
Should the size of the area rectangle also be used to determine the size of the final surface created here - where no surface is provided? It feels a bit odd to effectively ask for a chunk of a mask to be turned into a surface and then get more than that chunk back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to approve this, despite my slight quibbles about functionality as I think it will work either way. How it currently works is more similar to the .blit()
version of the area parameter -but it does feel more logical to produce a cropped mask surface if we aren't explicitly supplying a surface.
I did use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response, but I agree with Myre here. It would be better to use the rect's size for creating the surface. Otherwise looks good to me!
Some TODOs for myself:
Other than that, please do check my C code, I went through tons of iterations on this, so something might have got lost or I might have missed something. |
Close #661
(I don't think any of that renaming mentioned there is going to happen, so, adding the area kwarg is about all there's left to it)