#include <bevfill.h>
Inheritance diagram for CBevelFillRuffle:
Public Member Functions | |
COLORREF | CalcPixelValue (BYTE value, double Pos, INT32 Contrast) |
Do a ruffled fill This is the same as 3 rounded fills. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (CBevelFillRuffle) |
Definition at line 273 of file bevfill.h.
|
Do a ruffled fill This is the same as 3 rounded fills.
Implements CBevelFill. Definition at line 512 of file bevfill.cpp. 00513 { 00514 // change the position 00515 if (Pos >= 0 && Pos < 0.3) 00516 { 00517 Pos = Pos * (1.0/0.3); 00518 } 00519 else if (Pos >= 0.3 && Pos < 0.6) 00520 { 00521 Pos = (Pos - 0.3) * (1.0 / 0.3); 00522 } 00523 else 00524 { 00525 Pos = (Pos - 0.6) * (1.0 / 0.4); 00526 } 00527 00528 double RValue = value; 00529 double GValue = value; 00530 double BValue = value; 00531 double AValue = value; 00532 00533 double kValue = value; 00534 00535 if (Pos < 0.5) 00536 { 00537 // do nothing 00538 } 00539 else 00540 { 00541 kValue = 255.0 - kValue; 00542 } 00543 00544 RValue = kValue; 00545 GValue = kValue; 00546 BValue = kValue; 00547 AValue = kValue; 00548 00549 BYTE RByte = (BYTE)RValue; 00550 BYTE GByte = (BYTE)GValue; 00551 BYTE BByte = (BYTE)BValue; 00552 BYTE AByte = (BYTE)AValue; 00553 00554 return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24); 00555 }
|
|
|