Closed
Description
I'm trying to pass a tuple to context.sdl_renderer.draw_point(xy) to draw a point
Gives a type error.
_check(lib.SDL_RenderDrawPointF(self.p, (xy,)))
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
TypeError: SDL_RenderDrawPointF expected 3 arguments, got 2
Looking at the code:
python-tcod/tcod/sdl/render.py
Line 584 in 1ba890c
This appears to fix the issue:
def draw_point(self, xy: tuple[float, float]) -> None:
"""Draw a point.
.. versionadded:: 13.5
"""
#_check(lib.SDL_RenderDrawPointF(self.p, (xy,))) <- original
_check(lib.SDL_RenderDrawPointF(self.p, xy[0],xy[1])) #<-fix
Am I doing something wrong with how I am structuring my tuple?
Metadata
Metadata
Assignees
Labels
No labels