Comment 3 for bug 1400906

Revision history for this message
Russell Ballestrini (russell-ballestrini) wrote :

The issue seems to be a difference between CPP and Python versions.

The CPP version has 3 constructors for `Rect`, including a constructor that accepts four positional arguments:

        https://github.com/LaurentGomila/SFML/blob/master/include/SFML/Graphics/Rect.hpp#L67

The Python `Rectangle` class only supports the default constructor with no arguments and the constructor with two keyword arguments.

        https://github.com/Sonkun/python-sfml/blob/master/src/sfml/graphics.pyx#L111-L115

Inside the intersection method, an invocation of the four argument constructor is called, which is most likely the reason this breaks in python-sfml but not cpp SFML