1
Graphics / Grey box displaying around sprite's loaded image.
« on: April 01, 2011, 01:26:58 am »
I'm a teammate of the OP and have new information. I just found a solution of calling SetSmooth(false) but not sure why that prevented the artifact. It'd be great if we still had the option of smoothing. Any ideas?
The image in question (as on disk, without the artifact created when displayed in SFML):
Code: [Select]
void ViewBase::drawImage(sf::RenderWindow & target, const std::string & filename, const Point & origin)
{
sf::Image sfi;
sfi.SetSmooth(false);
sf::Sprite sprite;
if (!sfi.LoadFromFile(filename))
{
Log::debug("Failed to load file");
return;
}
sprite.SetImage(sfi);
sprite.SetPosition(origin.x,origin.y);
target.Draw(sprite);
}
The image in question (as on disk, without the artifact created when displayed in SFML):