#include <bevfill.h>
Inheritance diagram for CBevelFillFrame:
Public Member Functions | |
COLORREF | CalcPixelValue (BYTE value, double Pos, INT32 Contrast) |
Do a Mesa fill. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CBevelFillFrame) |
Definition at line 210 of file bevfill.h.
|
Do a Mesa fill.
Implements CBevelFill. Definition at line 367 of file bevfill.cpp. 00368 { 00369 Pos = 1.0 - Pos; 00370 00371 double RValue = value; 00372 double GValue = value; 00373 double BValue = value; 00374 double AValue = value; 00375 00376 double kValue = value; 00377 00378 // deal with the outside inwards 00379 if (value <= 128) 00380 { 00381 kValue = 128.0 - kValue; 00382 kValue *= (1.0 - Pos); 00383 kValue = 128.0 - kValue; 00384 } 00385 else 00386 { 00387 kValue -= 127.0; 00388 kValue *= (1.0 - Pos); 00389 kValue += 127.0; 00390 } 00391 00392 RValue = kValue; 00393 GValue = kValue; 00394 BValue = kValue; 00395 AValue = kValue; 00396 00397 BYTE RByte = (BYTE)RValue; 00398 BYTE GByte = (BYTE)GValue; 00399 BYTE BByte = (BYTE)BValue; 00400 BYTE AByte = (BYTE)AValue; 00401 00402 return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24); 00403 }
|
|
|