Closed damusss closed 1 month ago
It is new behaviour but it wasn't a common and long awaited bugfix like the one about filling with negative topleft area, the c code was just betraying the stubs (someone encountering a value error before this fix should have reported it). Stub-wise, nothing changed, so I think it's not too big of a deal to add a line in the docs. A note in the changelog for 2.5.2 should suffice the people that were using the function anyways.
The c internal function
_color_from_obj
only allows mapped colors for some reason, but all color arguments in the stubs forpygame.transform.threshold
pretend to allowColorLike
which also allows strings. My modification makes sure all the promised color types are allowed and add a test to make sure it doesn't break in the future.pygame.transform.threshold
should be the only function using the internal c function because all new api coming for transform is going to use the pygame C api function by default.