CBevelFills Class Reference

Encapsulates all the bevel filling stuff. More...

#include <bevfill.h>

Inheritance diagram for CBevelFills:

CCObject SimpleCCObject List of all members.

Public Member Functions

 CBevelFills ()
 ~CBevelFills ()
COLORREF CalcPixelValue (BYTE value, INT32 bevType, double Pos, INT32 Contrast)

Private Member Functions

 CC_DECLARE_DYNAMIC (CBevelFills)
BOOL SetUpFills ()
 Set up the bevel filling array.

Private Attributes

CBevelFill ** m_pBevFills
INT32 m_NumFills

Detailed Description

Encapsulates all the bevel filling stuff.

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

Definition at line 294 of file bevfill.h.


Constructor & Destructor Documentation

CBevelFills::CBevelFills  ) 
 

Definition at line 135 of file bevfill.cpp.

00136 {
00137     SetUpFills();
00138 }

CBevelFills::~CBevelFills  ) 
 

Definition at line 140 of file bevfill.cpp.

00141 {
00142     for (INT32 i = 0 ; i < m_NumFills; i++)
00143     {
00144         TRACE( _T("deleting bevel fill %d\n"), i);
00145         delete m_pBevFills[i];
00146     }
00147 
00148     delete m_pBevFills;
00149     m_pBevFills = NULL;
00150 }


Member Function Documentation

COLORREF CBevelFills::CalcPixelValue BYTE  value,
INT32  bevType,
double  Pos,
INT32  Contrast
 

Definition at line 188 of file bevfill.cpp.

00189 {
00190     if (Pos < 0.00)
00191     {
00192         Pos = 0.00;
00193     }
00194 
00195     if (Pos >= 1.00)
00196     {
00197         Pos = 1.00;
00198     }
00199 
00200     if (bevType < 0 || bevType >= m_NumFills)
00201     {
00202         return m_pBevFills[0]->CalcPixelValue(value, Pos, Contrast);
00203     }
00204     
00205     return m_pBevFills[bevType]->CalcPixelValue(value, Pos, Contrast);
00206 }

CBevelFills::CC_DECLARE_DYNAMIC CBevelFills   )  [private]
 

BOOL CBevelFills::SetUpFills  )  [private]
 

Set up the bevel filling array.

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

Definition at line 165 of file bevfill.cpp.

00166 {
00167     // set up the list first
00168     m_NumFills = 7;
00169 
00170     m_pBevFills = new CBevelFill *[m_NumFills];
00171     m_pBevFills[0] = new CBevelFillFlat;
00172 
00173     m_pBevFills[1] = new CBevelFillRound;
00174 
00175     m_pBevFills[2] = new CBevelFillSquare;
00176 
00177     m_pBevFills[3] = new CBevelFillFrame;
00178 
00179     m_pBevFills[4] = new CBevelFillSmooth;
00180 
00181     m_pBevFills[5] = new CBevelFillPoint;
00182 
00183     m_pBevFills[6] = new CBevelFillRuffle;
00184 
00185     return TRUE;
00186 }


Member Data Documentation

INT32 CBevelFills::m_NumFills [private]
 

Definition at line 309 of file bevfill.h.

CBevelFill** CBevelFills::m_pBevFills [private]
 

Definition at line 304 of file bevfill.h.


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