CBevelFillSmooth Class Reference

Do a smoothed fill. More...

#include <bevfill.h>

Inheritance diagram for CBevelFillSmooth:

CBevelFill CCObject SimpleCCObject List of all members.

Public Member Functions

COLORREF CalcPixelValue (BYTE value, double Pos, INT32 Contrast)
 Do a flat fill.

Private Member Functions

 CC_DECLARE_DYNAMIC (CBevelFillSmooth)

Detailed Description

Do a smoothed fill.

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

Definition at line 231 of file bevfill.h.


Member Function Documentation

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

Do a flat fill.

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 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 }

CBevelFillSmooth::CC_DECLARE_DYNAMIC CBevelFillSmooth   )  [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