FireBirdLib - Topfield TMS PVR TAP Programming Library
FM_InitAlphaLUT.c
Go to the documentation of this file.
1#include "FBLib_FontManager.h"
2
4
5void FM_InitAlphaLUT(dword fgColor, dword bgColor, float AntiAliasFactor)
6{
8
9 int i;
10 dword x;
11
12 for(i = 0; i < 255; i++)
13 {
14 x = FM_AlphaBlend(i, (fgColor >> 16) & 0xff, (bgColor >> 16) & 0xff, AntiAliasFactor);
15 AlphaLUT[i].r = (x > 255) ? 255 : x;
16
17 x = FM_AlphaBlend(i, (fgColor >> 8) & 0xff, (bgColor >> 8) & 0xff, AntiAliasFactor);
18 AlphaLUT[i].g = (x > 255) ? 255 : x;
19
20 x = FM_AlphaBlend(i, fgColor & 0xff, bgColor & 0xff, AntiAliasFactor);
21 AlphaLUT[i].b = (x > 255) ? 255 : x;
22 }
23
24 TRACEEXIT();
25}
byte FM_AlphaBlend(byte Alpha, byte FG, byte BG, float AntiAliasFactor)
Definition: FM_AlphaBlend.c:3
tAlphaLUT AlphaLUT[256]
void FM_InitAlphaLUT(dword fgColor, dword bgColor, float AntiAliasFactor)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243