-
-
Notifications
You must be signed in to change notification settings - Fork 162
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 geometry.Line
base
#3131
Added geometry.Line
base
#3131
Conversation
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]>
woah |
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.
In addition, is it really necessary to add a ..versionadded::
tag for every method and attribute? if the object was added in 2.5.2, it's kind of obvious that everything inside it was also added in the same version.
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.
Nothing else comes to mind, LGTM, thanks :)
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.
OK, LGTM 👍
Tests, docs & code seem fine and it all works locally. Good work! 💯
Is there any specific reason why the coordinates are named with |
Removed Rect/Frect from canbeline stub. Added some more info about passing a Rect/Frect to construct a Line and about degenerate lines potentially making some methods not work.
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.
Alright thanks, changes LGTM
This pull request adds the
Line
class to thepygame.geometry
module.It also adds the ax, ay, bx, by, a, b attributes, str functionality (for printing), and the copy method. It also adds their associated docs and tests.
Credits
Geometry Project:
For code, docs and tests:
@novialriptide @Emc2356 @itzpr3d4t0r @ScriptLineStudios @avaxar @Matiiss @newpaxonian @maqa41 @blankRiot96
Also thanks to @Starbuck5 for kickstarting the idea and the occasional help!
Functionality added in this PR
geometry.pyi
https://github.com/pygame-community/pygame-geometry/blame/main/geometry.pyi
Credits to @Emc2356 @itzpr3d4t0r @novialriptide @ScriptLineStudios @avaxar
geometry.rst
https://github.com/pygame-community/pygame-geometry/blame/main/docs/line.rst
Credits to @Emc2356 @itzpr3d4t0r @ScriptLineStudios @avaxar
line.c
https://github.com/pygame-community/pygame-geometry/blame/main/src_c/line.c
Credits to @Emc2356 @itzpr3d4t0r @novialriptide @ScriptLineStudios @avaxar
geometry.h
https://github.com/pygame-community/pygame-geometry/blame/main/src_c/include/geometry.h
Credits to @Emc2356 @itzpr3d4t0r @maqa41
geometry.c
https://github.com/pygame-community/pygame-geometry/blame/main/src_c/geometry.c
Credits to @Emc2356 @itzpr3d4t0r @novialriptide @ScriptLineStudios @avaxar
geometry_test.py
https://github.com/pygame-community/pygame-geometry/blame/main/test/test_line.py
Credits to @Emc2356 @itzpr3d4t0r @novialriptide @ScriptLineStudios @avaxar