home *** CD-ROM | disk | FTP | other *** search
- #include "Color.h"
-
- const Color::Table Color::alpha_table;
-
- Color::Table::Table()
- {
- for( int alp = 0; alp < 256; ++alp )
- for( int val = 0; val < 256; ++val )
- {
- float result = 0.49f + val*alp/255.0f;
- data[alp][val] = (result > 255) ? 255 : (unsigned char)result;
- }
- }
-