Issue #56 resolved

sdl2.ext.Renderer.draw_line() error when argument is multiple lines

Matic Kukovec
created an issue

Py-SDL2 version: 0.9.2

Python version: 3.3 (32-bit)

OS: Windows Vista (64-bit)

Same issue as in "Issue 52", the function works for a single line, but fails if the argument is multiple lines as defined in the docs:

(line1_x1, line1_y1, line1_x2, line1_y2, line2_x1, line2_y1, ...)

Error example code:

sdl2.ext.Renderer.draw_line((0,0,700,500,100,100,500,500))

Error message:

File "C:\Python33\lib\site-packages\sdl2\ext\sprite.py", line 144, in draw_line

ptlist = (SDL_Point * pcount / 2)()

TypeError: unsupported operand type(s) for /: '_ctypes.PyCArrayType' and 'int'

Comments (1)

  1. Log in to comment