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

Attempt to make pygame.Rect() possible - DRAFT #2554

Closed
wants to merge 3 commits into from

Conversation

damusss
Copy link
Member

@damusss damusss commented Nov 7, 2023

The reason I'm making a draft PR is because I'm having issues with setting up a local environment, in particular with the vsvarsal.bat file. If anyone reading this want to help, I'm on the dc pygame-ce server as Damus666 (@damusss).
Making the PR should technically give me compilation and run the py tests automatically.

There are a few reasons why I think pygame.Rect() should be a thing:

  • Less code, faster to type. Typing pygame.Rect(0,0,0,0) is different than pygame.Rect()
  • Cleaner code. pygame.Rect() is a lot cleaner than the other version
  • Consistency. If pygame.Vector2() exists, not forced to type pygame.Vector2(0,0), why shouldn't pygame.Rect() be a thing?

Where could you need to make an empty rect?

  • When you want to make a rect and assign positions using the attributes
  • When you need a rect you want to assign the properties of later

I've never edited the C source code in a PR (except for some PyObject *_null arguments, which i couldn't really mess up) so i could mess up a lot of things, reviews are welcome.

@Matiiss
Copy link
Member

Matiiss commented Jan 13, 2024

I suppose you can close this PR now? Since you have opened another one: #2655

@damusss
Copy link
Member Author

damusss commented Jan 14, 2024

I suppose you can close this PR now? Since you have opened another one: #2655

You are totally right, I forgot about it, Thanks!

@damusss damusss closed this Jan 14, 2024
@damusss damusss deleted the rect-no-args branch January 28, 2024 18:40
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.

2 participants