Skip to content

circle fails with float parameters due to internal mismatch with drawEllipse #4

@sombrero-dev

Description

@sombrero-dev

Ubuntu 24.10
easygraphics==2.0.1.2

Code that fails:
import easygraphics as eg

def main():
eg.init_graph(640, 480)
eg.circle(200.0, 260.0, 50)
eg.pause()
eg.close_graph()

eg.easy_run(main)

Error:

Exception in thread Thread-1 (main):
Traceback (most recent call last):
File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
self.run()
File "/usr/lib/python3.12/threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "/home/dave/devel/python/graphics/foo2.py", line 10, in main
eg.circle(200.0, 260.0, 50)
File "/home/dave/.local/lib/python3.12/site-packages/easygraphics/easygraphics.py", line 960, in circle
image.circle(x,y,r)
File "/home/dave/.local/lib/python3.12/site-packages/easygraphics/image.py", line 667, in circle
p.drawEllipse(x - r, y - r, 2 * r, 2 * r)
TypeError: arguments did not match any overloaded call:
drawEllipse(self, r: QRectF): argument 1 has unexpected type 'float'
drawEllipse(self, r: QRect): argument 1 has unexpected type 'float'
drawEllipse(self, x: int, y: int, w: int, h: int): argument 1 has unexpected type 'float'
drawEllipse(self, center: Union[QPointF, QPoint], rx: float, ry: float): argument 1 has unexpected type 'float'
drawEllipse(self, center: QPoint, rx: int, ry: int): argument 1 has unexpected type 'float'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions