#include <bevfill.h>
Inheritance diagram for CBevelFillSmooth:
Public Member Functions | |
COLORREF | CalcPixelValue (BYTE value, double Pos, INT32 Contrast) |
Do a flat fill. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CBevelFillSmooth) |
Definition at line 231 of file bevfill.h.
|
Do a flat fill.
Implements CBevelFill. Definition at line 418 of file bevfill.cpp. 00419 { 00420 double RValue = value; 00421 double GValue = value; 00422 double BValue = value; 00423 double AValue = value; 00424 00425 double kValue = value; 00426 00427 // deal with the outside inwards 00428 if (value <= 128) 00429 { 00430 kValue = 128.0 - kValue; 00431 kValue *= (1.0 - Pos); 00432 kValue = 128.0 - kValue; 00433 } 00434 else 00435 { 00436 kValue -= 127.0; 00437 kValue *= (1.0 - Pos); 00438 kValue += 127.0; 00439 } 00440 00441 RValue = kValue; 00442 GValue = kValue; 00443 BValue = kValue; 00444 AValue = kValue; 00445 00446 BYTE RByte = (BYTE)RValue; 00447 BYTE GByte = (BYTE)GValue; 00448 BYTE BByte = (BYTE)BValue; 00449 BYTE AByte = (BYTE)AValue; 00450 00451 return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24); 00452 }
|
|
|