CBevelFillFlat Class Reference

Do a flat fill. More...

#include <bevfill.h>

Inheritance diagram for CBevelFillFlat:

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 (CBevelFillFlat)

Detailed Description

Do a flat fill.

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

Definition at line 144 of file bevfill.h.


Member Function Documentation

COLORREF CBevelFillFlat::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 224 of file bevfill.cpp.

00225 {
00226     double RValue = value;
00227     double GValue = value;
00228     double BValue = value;
00229     double AValue = value;
00230 
00231     if (AValue < SplitValue)
00232     {
00233         AValue *= 255.0 / SplitValue;
00234     }
00235     else 
00236     {
00237         AValue = 255.0 - AValue;
00238         AValue *= 255.0 / (255.0 - SplitValue);
00239 
00240         AValue = 1.0 - (AValue / 255.0);
00241         AValue *= AValue;
00242         AValue = (1.0 - AValue) * 255.0;
00243     }
00244     
00245     AValue *= 200.0 / 255.0;
00246 
00247     RValue += 0.5;
00248     GValue += 0.5;
00249     BValue += 0.5;
00250 
00251     EnsureValueRange(&AValue);
00252     
00253     BYTE RByte = (BYTE)RValue;
00254     BYTE GByte = (BYTE)GValue;
00255     BYTE BByte = (BYTE)BValue;
00256     BYTE AByte = (BYTE)AValue;
00257 
00258     return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24);
00259 }

CBevelFillFlat::CC_DECLARE_DYNAMIC CBevelFillFlat   )  [private]
 


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