CBevelFillRuffle Class Reference

Do a ruffle fill. More...

#include <bevfill.h>

Inheritance diagram for CBevelFillRuffle:

CBevelFill CCObject SimpleCCObject List of all members.

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)

Detailed Description

Do a ruffle fill.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/10/98
See also:
CBeveler

Definition at line 273 of file bevfill.h.


Member Function Documentation

COLORREF CBevelFillRuffle::CalcPixelValue BYTE  value,
double  Pos,
INT32  Contrast
[virtual]
 

Do a ruffled fill This is the same as 3 rounded fills.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/11/98
Parameters:
[INPUTS] 
Returns:
TRUE for success
See also:
-

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 }

CBevelFillRuffle::CC_DECLARE_DYNAMIC CBevelFillRuffle   )  [private]
 


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:54 2007 for Camelot by  doxygen 1.4.4