Added transparency to nodes

This commit is contained in:
2011-06-22 18:24:20 -04:00
parent fc08adcade
commit fc8a76c1db
3 changed files with 19 additions and 1 deletions

View File

@ -87,3 +87,13 @@ void DrawUtils::draw_line(Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint16 wid
cy += dy;
}
}
bool DrawUtils::transpare(SDL_Surface* surface, int r, int g, int b)
{
if (surface == NULL) return false;
SDL_SetColorKey(surface, SDL_SRCCOLORKEY|SDL_RLEACCEL, SDL_MapRGB(surface->format, r, g, b));
return true;
}