Skip to content

Remove aaline width for 2.5.2 #3182

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion buildconfig/stubs/pygame/draw.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def aaline(
color: ColorLike,
start_pos: Point,
end_pos: Point,
width: int = 1,
) -> Rect: ...
def aalines(
surface: Surface,
Expand Down
Binary file modified docs/reST/ref/code_examples/draw_module_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions docs/reST/ref/draw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,8 @@ object around the draw calls (see :func:`pygame.Surface.lock` and

| :sl:`draw a straight antialiased line`
| :sg:`aaline(surface, color, start_pos, end_pos) -> Rect`
:sg:`aaline(surface, color, start_pos, end_pos, width=1) -> Rect`

Draws a straight antialiased line on the given surface. There are no endcaps.
For thick lines the ends are squared off.

.. note::
Regarding float values for coordinates, a point with coordinate
Expand All @@ -476,11 +474,6 @@ object around the draw calls (see :func:`pygame.Surface.lock` and
:param end_pos: end position of the line, (x, y)
:type end_pos: tuple(int or float, int or float) or
list(int or float, int or float) or Vector2(int or float, int or float)
:param int width: (optional) used for line thickness

| if width >= 1, used for line thickness (default is 1)
| if width < 1, nothing will be drawn
|

:returns: a rect bounding the changed pixels, if nothing is drawn the
bounding rect's position will be the ``start_pos`` parameter value (float
Expand All @@ -493,7 +486,6 @@ object around the draw calls (see :func:`pygame.Surface.lock` and
.. versionchangedold:: 2.0.0 Added support for keyword arguments.
.. versionchanged:: 2.4.0 Removed deprecated 'blend' argument
.. versionchanged:: 2.5.0 ``blend`` argument readded for backcompat, but will always raise a deprecation exception when used
.. versionchanged:: 2.5.2 Added line width

.. ## pygame.draw.aaline ##

Expand Down
2 changes: 1 addition & 1 deletion src_c/doc/draw_doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
#define DOC_DRAW_ARC "arc(surface, color, rect, start_angle, stop_angle) -> Rect\narc(surface, color, rect, start_angle, stop_angle, width=1) -> Rect\ndraw an elliptical arc"
#define DOC_DRAW_LINE "line(surface, color, start_pos, end_pos) -> Rect\nline(surface, color, start_pos, end_pos, width=1) -> Rect\ndraw a straight line"
#define DOC_DRAW_LINES "lines(surface, color, closed, points) -> Rect\nlines(surface, color, closed, points, width=1) -> Rect\ndraw multiple contiguous straight line segments"
#define DOC_DRAW_AALINE "aaline(surface, color, start_pos, end_pos) -> Rect\naaline(surface, color, start_pos, end_pos, width=1) -> Rect\ndraw a straight antialiased line"
#define DOC_DRAW_AALINE "aaline(surface, color, start_pos, end_pos) -> Rect\ndraw a straight antialiased line"
#define DOC_DRAW_AALINES "aalines(surface, color, closed, points) -> Rect\ndraw multiple contiguous straight antialiased line segments"
8 changes: 4 additions & 4 deletions src_c/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ aaline(PyObject *self, PyObject *arg, PyObject *kwargs)
int drawn_area[4] = {INT_MAX, INT_MAX, INT_MIN,
INT_MIN}; /* Used to store bounding box values */
Uint32 color;
static char *keywords[] = {"surface", "color", "start_pos", "end_pos",
"width", "blend", NULL};
static char *keywords[] = {"surface", "color", "start_pos",
"end_pos", "blend", NULL};

if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OOO|iO", keywords,
if (!PyArg_ParseTupleAndKeywords(arg, kwargs, "O!OOO|O", keywords,
&pgSurface_Type, &surfobj, &colorobj,
&start, &end, &width, &blend)) {
&start, &end, &blend)) {
return NULL; /* Exception already set. */
}

Expand Down
Loading