Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

int Impala::Application::VideoExcel::TableCell::Gradient ( double  val,
int  grtype = GRADIENT_REDFADE 
) [inline, private]

Definition at line 82 of file TableCell.h.

References GRADIENT_BLACKFADE, GRADIENT_BLUEFADE, GRADIENT_GREENFADE, GRADIENT_REDFADE, and NONE.

Referenced by UpdateRow().

00083     {
00084         int r=0,g=0,b=0, a=255;
00085         if (grtype == NONE) grtype = GRADIENT_BLACKFADE;
00086         switch (grtype)
00087         {
00088             case GRADIENT_BLACKFADE:
00089                 a = val * 256;
00090                 r = g = b = 0;
00091                 break;
00092             case GRADIENT_REDFADE:
00093                 a = val * 256;
00094                 r = 128;
00095                 break;
00096             case GRADIENT_GREENFADE:
00097                 a = val * 256;
00098                 g = 128;
00099                 break;
00100             case GRADIENT_BLUEFADE:
00101                 a = val * 256;
00102                 b = 128;
00103                 break;
00104         }
00105         if (a>255) a = 255;
00106         if (r>255) r = 255;
00107         if (g>255) g = 255;
00108         if (b>255) b = 255;
00109         return ARGB2COLOR(a,r,g,b);
00110     }


Generated on Thu Jan 13 09:16:41 2011 for ImpalaSrc by  doxygen 1.5.1