1
Graphics / Shape.Rectangle() not working?
« on: August 10, 2009, 07:41:21 pm »
Alright, I guess I'm just using the function the wrong way - Anyway, here's the problem (using SFML 1.5 if that matters):
The above code works just fine and draws a rect as expected, however
doesn't seem to work (not drawing anything when calling RenderWindow.Draw()).
The weird thing is, GetPosition() still returns the right coordinates for the 2nd code.
Am i doing something wrong?
Edit: Just realised its a static function and won't work that way, nevermind this thread :/
Code: [Select]
sf::Shape test1 = sf::Shape::Rectangle(200, 200, 400, 400, sf::Color(222, 222, 222));
The above code works just fine and draws a rect as expected, however
Code: [Select]
sf::Shape test2;
test2.Rectangle(200, 200, 400, 400, sf::Color(222, 222, 222));
doesn't seem to work (not drawing anything when calling RenderWindow.Draw()).
The weird thing is, GetPosition() still returns the right coordinates for the 2nd code.
Am i doing something wrong?
Edit: Just realised its a static function and won't work that way, nevermind this thread :/