CBevelFillFrame Class Reference

Do a rounded fill. More...

#include <bevfill.h>

Inheritance diagram for CBevelFillFrame:

CBevelFill CCObject SimpleCCObject List of all members.

Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNAMIC (CBevelFillFrame)

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 210 of file bevfill.h.


Member Function Documentation

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

Do a Mesa 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 367 of file bevfill.cpp.

00368 {
00369     Pos = 1.0 - Pos;
00370     
00371     double RValue = value;
00372     double GValue = value;
00373     double BValue = value;
00374     double AValue = value;
00375 
00376     double kValue = value;
00377 
00378     // deal with the outside inwards
00379     if (value <= 128)
00380     {
00381         kValue = 128.0 - kValue;
00382         kValue *= (1.0 - Pos);
00383         kValue = 128.0 - kValue;
00384     }
00385     else
00386     {
00387         kValue -= 127.0;
00388         kValue *= (1.0 - Pos);
00389         kValue += 127.0;
00390     }
00391 
00392     RValue = kValue;
00393     GValue = kValue;
00394     BValue = kValue;
00395     AValue = kValue;
00396     
00397     BYTE RByte = (BYTE)RValue;
00398     BYTE GByte = (BYTE)GValue;
00399     BYTE BByte = (BYTE)BValue;
00400     BYTE AByte = (BYTE)AValue;
00401 
00402     return RByte | (GByte << 8) | (BByte << 16) | (AByte << 24);
00403 }

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