SFML community forums

Help => General => Topic started by: KoeKhaos on March 09, 2015, 10:12:48 pm

Title: 1 pixel wide outline of transparency area bleeding through after rotate or zoom.
Post by: KoeKhaos on March 09, 2015, 10:12:48 pm
I'm using CodeBlock with Mingw on Window 8 with SFML 2.1 with nvidia graphics card. I wasn't sure if it was something to do with the graphics or the window module so I just put it in general. Hope that's ok!

The problem is that a 1 pixel wide outline shows up around my sprite the moment I do a sprite.rotate() or a view.zoom(). It doesn't happen if I turn off setSmooth on the texture. The outline appears to be magenta, which I mask out from the original bmp image. Doing a sprite.move() does not make the outline appear, however.

I searched and found similar topics of the exact problem but in them it indicated that it was fixed in SFML 2 so I was wondering if the problem somehow has returned or if I am missing something. The sprite looks like crap without setSmooth on so I'd like to be able to use it if possible!

Edit: I created a PNG with built in transparency and it still gets a pink outline when sprite.rotate or view.move is setSmooth is enabled for it!

Thanks!
Joe
Title: Re: 1 pixel wide outline of transparency area bleeding through after rotate or zoom.
Post by: KoeKhaos on March 10, 2015, 06:18:54 pm
I read another post by Laurent mentioning about floating point. My application uses a spaceship so it does lands on floating point locations. Does this mean that non pixel perfect, is that the right term, objects will simply not display right when setsmooth(antialiasing?) is enabled and the sprite is not precisely centered on a pixel?
Title: Re: 1 pixel wide outline of transparency area bleeding through after rotate or zoom.
Post by: Voroz on March 12, 2015, 06:11:58 pm
I remember having the same problem with setsmooth, so i always disable it for everything and if i want anti-aliasing i do it in a paint program. Just make sure that it uses transparency pixels for the anti-aliasing.
Title: Re: 1 pixel wide outline of transparency area bleeding through after rotate or zoom.
Post by: KoeKhaos on March 23, 2015, 03:14:00 pm
Apparently I am missing something about anti-aliasing. I was under the impression it was a method of smoothing transformed objects during runtime and not simply an art style... So is the setsmooth simply not used by anyone?