Skip to content
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

Reform the Render.blit API #4430

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Reform the Render.blit API #4430

wants to merge 4 commits into from

Conversation

Gouvernathor
Copy link
Member

The first commit may be cherrypicked on its own.
I initially planned to have blit = _blit in the class body and have the compat edit the class with blit = integer_blit, but unfortunately you can't edit classes out of pyx files.
This also needs to be tested.

There is also the issue that the blit method is used a lot internally, and was used in the perspective of the pos being rounded to int.
These need to be checked, and I believe the simplest way forward would be to add an integer_blit method and massively rename dubious entries in the repo to using that one. (dubious meaning not calling it with literal (0, 0) as the pos or other simple cases)
I'll wait for confirmation before doing that though.

An argument could be made (and easily won, in my opinion) to drop subpixel_blit, since it's now replaced with absolute_blit.

If you want the pos to be rounded, blit's old job, you can call integer_blit.
Converting to pure-floats is useless, since nothing checks, so subpixel_blit is made an alias of absolute_blit which uses the good type.
The base behavior is to take elements of pos as style and transform properties do : as positions.
@Gouvernathor Gouvernathor linked an issue Mar 8, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge Render.blit, absolute_blit and relative_blit
1 participant