Added transparency to nodes
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user