SFML community forums
Help => Graphics => Topic started by: FellowCoder on January 25, 2020, 02:15:46 am
-
::)I was trying to check the sf::RectangleShape color using std::cout<<map.blocos.getFillColor().r<<std::endl; and the output is just "☺", can someone explain me how this happened and what i have to do to get the shape color?
Edit: i specifically want the color alpha, i was just trying new things and this happened. Also the RGB of the shape is (1, 0, 0)
-
r is Uint8, a typedef of unsigned char, so it cout as a char.
Cast it to an unsigned int before printing it.
-
In addition to what G. said above, since you specifically want the alpha, you should use a instead of r.