Skip to content

Add performance warning to Sprite.draw docstring #1770

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

Merged
Merged
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
9 changes: 8 additions & 1 deletion arcade/sprite/sprite.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,14 @@ def face_point(self, point: Point) -> None:

def draw(self, *, filter=None, pixelated=None, blend_function=None) -> None:
"""
Draw the sprite.
A debug method which draws the sprite into the current OpenGL context.

.. warning:: You are probably looking for :py:meth:`SpriteList.draw() <arcade.SpriteList.draw>`!

Drawing individual sprites is slow compared to using :py:class:`~arcade.SpriteList`.
See :ref:`pg_spritelists_why` for more information.

This method should not be relied on. It may be removed one day.

:param filter: Optional parameter to set OpenGL filter, such as
`gl.GL_NEAREST` to avoid smoothing.
Expand Down