What i am trying to do is draw "Hero.png" 50x50 image to screen.
Problem is that i don't know how to ignore one color, so it does not draw a square of pink(color i use for background on "Hero.png" around my character. Therefore make the (255,0,255) color transparent on my sprite.
I cant find a function to do this in sfml.
in SDL the function is something like
//Set all pixels of color R 0, G 0xFF, B 0xFF to be transparent //SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, colorkey ); //int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key); This is definition SDL_SetColorKey(MyImage, SDL_SRCCOLORKEY, SDL_MapRGB(Screen->format, 255, 0, 255);
Edited by BaneTrapper, 22 October 2012 - 02:37 PM.






