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

Add more Line attributes #3268

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

- center
- centerx/y
- angle
- slope

Co-authored-by: Emc2356 <[email protected]>
Co-authored-by: NovialRiptide <[email protected]>
Co-authored-by: ScriptLineStudios <[email protected]>
Co-authored-by: Avaxar <[email protected]>
Co-authored-by: maqa41 <[email protected]>
@itzpr3d4t0r itzpr3d4t0r added New API This pull request may need extra debate as it adds a new class or function to pygame geometry pygame.geometry labels Dec 16, 2024
@itzpr3d4t0r itzpr3d4t0r requested a review from a team as a code owner December 16, 2024 12:16
@itzpr3d4t0r itzpr3d4t0r mentioned this pull request Dec 16, 2024
89 tasks
@itzpr3d4t0r itzpr3d4t0r added this to the 2.5.3 milestone Dec 16, 2024
| :sl:`the coordinate of the middle point of the line`
| :sg:`center -> (float, float)`

The center of the line. Calculated using the `((xa + xb) / 2, (ya + yb) / 2)` formula.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for consistency, new docs should use ax and ay


The angle of the line representing its orientation. Calculated using
the `atan2(yb - ya, xb - xa)` formula. This attribute is read-only, it cannot
be reassigned. To change the line's angle use the `rotate` method or change
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm blind, the rotate method doesn't exist yet, does it have to be ported or was it descarted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep it's yet to be ported, changed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
geometry pygame.geometry New API This pull request may need extra debate as it adds a new class or function to pygame
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants