#include <bevfill.h>
Inheritance diagram for CBevelFillSquare:
Public Member Functions | |
COLORREF | CalcPixelValue (BYTE value, double Pos, INT32 Contrast) |
Do a flat fill. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CBevelFillSquare) |
Definition at line 189 of file bevfill.h.
|
Do a flat fill.
Implements CBevelFill. Definition at line 323 of file bevfill.cpp. 00324 { 00325 double RValue = value; 00326 double GValue = value; 00327 double BValue = value; 00328 double AValue = value; 00329 00330 double Gradient = 0; 00331 00332 00333 if (Pos <= 0.3) 00334 { 00335 // do nothing 00336 } 00337 else if (Pos >= 0.7) 00338 { 00339 RValue = 255.0 - RValue; 00340 } 00341 else 00342 { 00343 RValue = 128.0; 00344 } 00345 00346 BYTE RByte = (BYTE)RValue; 00347 BYTE GByte = (BYTE)RValue; 00348 BYTE BByte = (BYTE)RValue; 00349 BYTE AByte = (BYTE)AValue; 00350 00351 return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24); 00352 }
|
|
|