#include <bevfill.h>
Inheritance diagram for CBevelFillRound:
Public Member Functions | |
COLORREF | CalcPixelValue (BYTE value, double Pos, INT32 Contrast) |
Do a flat fill. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CBevelFillRound) |
Definition at line 167 of file bevfill.h.
|
Do a flat fill.
Implements CBevelFill. Definition at line 274 of file bevfill.cpp. 00275 { 00276 double RValue = value; 00277 double GValue = value; 00278 double BValue = value; 00279 double AValue = value; 00280 00281 double Gradient = 0; 00282 00283 00284 if (Pos <= 0.5) 00285 { 00286 Pos = Pos / 0.5; 00287 00288 Gradient = 128 - RValue; 00289 RValue = RValue + (Gradient * Pos); 00290 } 00291 else 00292 { 00293 Pos = 1.0 - Pos; 00294 RValue = 255.0 - RValue; 00295 00296 Pos = Pos / 0.5; 00297 00298 Gradient = 128 - RValue; 00299 RValue = RValue + (Gradient * Pos); 00300 } 00301 00302 BYTE RByte = (BYTE)RValue; 00303 BYTE GByte = (BYTE)RValue; 00304 BYTE BByte = (BYTE)RValue; 00305 BYTE AByte = (BYTE)AValue; 00306 00307 return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24); 00308 }
|
|
|