Wrong ordering on circleColor (and others)
Brought to you by:
ferzkopp
Hi,
In the doc, for the circleColor, rectangleColor (and probably the others), the color argument means:
The color value of the rectangle to draw (0xRRGGBBAA).
However when looking at the source code for circleColor:
Uint8 *c = (Uint8 *)&color;
return ellipseRGBA(renderer, x, y, rad, rad, c[0], c[1], c[2], c[3]);
Here c[0] should be the AA part, c[1] the BB part etc.
However here's the ellipseRGB prototype:
int ellipseRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
Here you can see the order is r,g,b,a whereas the circleColor calls it as a,b,g,r.
This means that the color argument is actually 0xAABBGGRR.