Added background image color support. Changed "transparency" to "alpha" for layouts. Fixed code syling.

This commit is contained in:
emb
2015-01-02 09:23:49 -06:00
parent ccdafb0e8f
commit d309c3b96f
20 changed files with 195 additions and 78 deletions

View File

@@ -60,6 +60,8 @@ void Image::AllocateGraphicsMemory()
void Image::Draw()
{
Component::Draw();
if(Texture)
{
ViewInfo *info = GetBaseViewInfo();
@@ -70,6 +72,6 @@ void Image::Draw()
rect.h = static_cast<int>(info->GetHeight());
rect.w = static_cast<int>(info->GetWidth());
SDL::RenderCopy(Texture, static_cast<char>((info->GetTransparency() * 255)), NULL, &rect, info->GetAngle());
SDL::RenderCopy(Texture, static_cast<char>((info->GetAlpha() * 255)), NULL, &rect, info->GetAngle());
}
}