1
Graphics / Grey box displaying around sprite's loaded image.
« on: April 01, 2011, 12:57:42 am »
I am loading a PNG file into an instance of Sprite and then calling draw. The image displays at the proper location, but also has a grey bounding box that is not part of the image itself. This box resizes with the sprite when the window is resized. How can this box be disabled/hidden?
Code where the error originates:
A screenshot showing the bounding box.
http://imgur.com/sEAsq
Code where the error originates:
Code: [Select]
sf::Image sfi;
sf::Sprite sprite;
if (!sfi.LoadFromFile(filename))
{
Log::debug("Failed to load file");
return;
}
sprite.SetPosition(origin.x,origin.y);
sprite.SetImage(sfi);
target.Draw(sprite);
A screenshot showing the bounding box.
http://imgur.com/sEAsq