I’m developping an apication and the sprites I have to use has an
anti-aliasing effect. When I blit them on the background surface, I got
an ugly border because of the transparecy.
Any ideias how to have transparency on anti-aliased images? Is an alpha
channel the solution? If so, how?
I’m developping an apication and the sprites I have to use has an
anti-aliasing effect. When I blit them on the background surface, I got
an ugly border because of the transparecy.
Any ideias how to have transparency on anti-aliased images? Is an alpha
channel the solution? If so, how?
Alpha channels are certainly ‘a’ solution, and probably the simplest if
not the most efficient. Just changing your base files to png’s that are
anti-aliased against a transparent background and using those instead of
whatever format you’re currently using might be enough, unless you’re
forcing the surface formats to match the display.
An important thing to remember though is that if you’re using hardware
surfaces you’ll no longer be using hardware accelerated blits if you add
an alpha channel. 99.999% of cards (none that I know of) don’t have 2D
alpha acceleration, so everything will be done in software. This could
lead to a HUGE loss of fps.
The only other option I know of would be to use OpenGL or to clean up
your art so the aliasing isn’t as apparent.On Fri, 2002-12-20 at 15:00, Adilson Oliveira wrote: