CBevelFillRound Class Reference

Do a rounded fill. More...

#include <bevfill.h>

Inheritance diagram for CBevelFillRound:

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

Detailed Description

Do a rounded fill.

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

Definition at line 167 of file bevfill.h.


Member Function Documentation

COLORREF CBevelFillRound::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 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 }

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