Sign in to follow this  
SlashOwnsU

SDL_gfx zoomSurface question

Recommended Posts

hi...I'm using SDL_gfx to stretch a surface (after miserably failing to implement a bilinear stretching algorithm myself...sigh) I load bmp's that have RGB(255,0,255) - pink - that becomes transparent using SDL_SetColorKey problem is that I want my surfaces zoomed and anti-alias, so I call zoomSurface(mySurface, ratio, ratio, SMOOTHING_ON); what happens is a)I call SDL_SetColorKey before zoomSurface : the pink pixels don't become transparent...they're replaced by black pixels b)I call SDL_SetColorKey after zoomSurface : the pink pixels become transparent but because the edges of my image were anti-aliased with pink around them, I got semi-pink pixels all around my image what can a man do ?

Share this post


Link to post
Share on other sites
I was experiencing the same problems when implementing my own system. To get to the solution, I had it stretch/rotate the surface and the blit onto a new surface of the same size with the color key filling it. Once it was blited onto the surface, the original color key was still on the background of the new surface image. Yes this pattern is a bit hackish, but it worked. Good luck with everything!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this