-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs (both web and in C) and refactors
- Loading branch information
1 parent
b60a413
commit 2a4daf0
Showing
6 changed files
with
101 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,6 +337,7 @@ def lowercase_name(d): | |
"music", | ||
"pygame", | ||
"Rect", | ||
"geometry", | ||
"Surface", | ||
"sprite", | ||
"time", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.. include:: common.txt | ||
|
||
:mod:`pygame.geometry` | ||
====================== | ||
|
||
.. module:: pygame.geometry | ||
:synopsis: pygame geometry module | ||
|
||
| :sl:`pygame module for the Circle, Rect, and Polygon objects` | ||
.. currentmodule:: pygame | ||
|
||
.. class:: Circle | ||
|
||
| :sl:`pygame object representing a circle` | ||
| :sg:`Circle(center, radius) -> Circle` | ||
| :sg:`Circle(x, y, radius) -> Circle` | ||
| :sg:`Circle(object) -> Circle` | ||
.. attribute:: x | ||
|
||
| :sl:`center x coordinate of the circle` | ||
| :sg:`x -> float` | ||
The `x` coordinate of the center of the circle. | ||
|
||
.. ## Circle.x ## | ||
.. attribute:: y | ||
|
||
| :sl:`center y coordinate of the circle` | ||
| :sg:`y -> float` | ||
The `y` coordinate of the center of the circle. | ||
|
||
.. ## Circle.y ## | ||
.. attribute:: r | ||
|
||
| :sl:`radius of the circle` | ||
| :sg:`r -> float` | ||
The `r` coordinate of the center of the circle. You cannot set the radius to a negative value. | ||
|
||
.. ## Circle.r ## | ||
.. method:: copy | ||
|
||
| :sl:`returns a copy of the circle` | ||
| :sg:`copy() -> Circle` | ||
The `copy` method returns a new `Circle` object having the same position and radius | ||
as the original `Circle`. The function takes no arguments. | ||
|
||
.. ## Circle.copy ## | ||
.. ## pygame.Circle ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* Auto generated file: with makeref.py . Docs go in docs/reST/ref/ . */ | ||
#define DOC_GEOMETRY "pygame module for the Circle, Rect, and Polygon objects" | ||
#define DOC_CIRCLE "Circle(center, radius) -> Circle\nCircle(x, y, radius) -> Circle\nCircle(object) -> Circle\npygame object representing a circle" | ||
#define DOC_CIRCLE_X "x -> float\ncenter x coordinate of the circle" | ||
#define DOC_CIRCLE_Y "y -> float\ncenter y coordinate of the circle" | ||
#define DOC_CIRCLE_R "r -> float\nradius of the circle" | ||
#define DOC_CIRCLE_COPY "copy() -> Circle\nreturns a copy of the circle" |