Skip to content

Renderer.blit rework. #2623

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
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
2 changes: 1 addition & 1 deletion buildconfig/stubs/pygame/_sdl2/video.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Renderer:
target: Optional[Texture]
def blit(
self,
source: Union[Texture, Image],
source: Union[Texture, Image, Surface],
dest: Optional[RectValue] = None,
area: Optional[RectValue] = None,
special_flags: int = 0,
Expand Down
4 changes: 3 additions & 1 deletion docs/reST/ref/sdl2_video.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,14 @@
For compatibility purposes. Draws :class:`Texture` objects onto the
Renderer using a method signature similar to :meth:`pygame.Surface.blit`.

:param source: A :class:`Texture` or :class:`Image` to draw.
:param source: A :class:`Texture` or :class:`Image` or :class:`Surface` to draw.
:param dest: The drawing destination on the rendering target.
:param area: The portion of the source texture or image to draw from.
:param special_flags: have no effect at this moment.

.. note:: Textures created by different Renderers cannot shared with each other!
.. note:: Blitting a surface to the renderer is slow. If you want to blit a surface
frequently, convert it to a Texture first.

.. method:: draw_line

Expand Down
Loading