BlendedPathProcessorBrush Class Reference

This class of path processor is generated when two brushed nodes are blended. It differs from a regular PPB in that it does not retrieve its ink objects from a brush definition stored in the brush component, instead it has its own pointer to a BlendedBrushDefinition object. More...

#include <blppbrsh.h>

Inheritance diagram for BlendedPathProcessorBrush:

PathProcessorBrush PathProcessor CCObject SimpleCCObject List of all members.

Public Member Functions

 BlendedPathProcessorBrush ()
 Constructor, mostly just calls the base class version.
 ~BlendedPathProcessorBrush ()
 Destructor.
virtual BrushDefinitionGetOurBrushDefinition ()
 As above.
virtual PathProcessorBrushClone (void)
 To copy BlendedPathProcessorBrush or derived-class object, exactly the same as the PPB fn. except for the BlendedBrushDef.
virtual BOOL IsBlended ()
void SetBlendedBrushDefinition (BlendedBrushDefinition *pBrushDef)
 As above.
BOOL SetBlendRatio (double Ratio)
 As above.
double GetBlendRatio ()
 As above.
void DeleteBlendedBrushDefinition ()
 Deletes the blended brush definition, use with caution, as the brush defintions are often used by multiple path processors.

Protected Attributes

BlendedBrushDefinitionm_pBlendedBrushDef
double m_BlendRatio

Private Member Functions

 CC_DECLARE_DYNAMIC (BlendedPathProcessorBrush)

Detailed Description

This class of path processor is generated when two brushed nodes are blended. It differs from a regular PPB in that it does not retrieve its ink objects from a brush definition stored in the brush component, instead it has its own pointer to a BlendedBrushDefinition object.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/2000
See also:
if you're not familiar with ppbrush.h/.cpp this will make little sense to you

Definition at line 123 of file blppbrsh.h.


Constructor & Destructor Documentation

BlendedPathProcessorBrush::BlendedPathProcessorBrush  ) 
 

Constructor, mostly just calls the base class version.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/2000

Definition at line 120 of file blppbrsh.cpp.

00120                                                      : PathProcessorBrush()
00121 {
00122     m_pBlendedBrushDef = NULL;
00123 }

BlendedPathProcessorBrush::~BlendedPathProcessorBrush  ) 
 

Destructor.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/3/2000

Definition at line 136 of file blppbrsh.cpp.

00137 {
00138 
00139 }


Member Function Documentation

BlendedPathProcessorBrush::CC_DECLARE_DYNAMIC BlendedPathProcessorBrush   )  [private]
 

PathProcessorBrush * BlendedPathProcessorBrush::Clone void   )  [virtual]
 

To copy BlendedPathProcessorBrush or derived-class object, exactly the same as the PPB fn. except for the BlendedBrushDef.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/99
Returns:
NULL if we're out of memory, else a pointer to a clone (exact copy) of this object

Reimplemented from PathProcessorBrush.

Definition at line 238 of file blppbrsh.cpp.

00239 {
00240 
00241     // Clone this object 
00242     BlendedPathProcessorBrush *pClone = new BlendedPathProcessorBrush;
00243 
00244     if (pClone == NULL)
00245         return NULL;
00246 
00247     // copy the data
00248     pClone->SetBrushDefinition(m_BrushHandle);
00249     pClone->SetPathOffsetType(m_PathOffsetType);
00250     pClone->SetPathOffsetValue(m_PathOffsetValue);
00251     pClone->SetRotated(m_bRotate);
00252     pClone->SetRotationAngle(m_RotateAngle);
00253     pClone->SetSpacing(m_BrushSpacing);
00254     pClone->SetTiling(m_bTile);
00255     pClone->SetBrushScaling(m_BrushScaling);
00256     pClone->SetBrushScalingIncr(m_BrushScalingIncr);
00257     pClone->SetSpacingIncrProp(m_BrushSpacingIncrProp);
00258     pClone->SetSpacingIncrConst(m_BrushSpacingIncrConst);
00259     pClone->SetPathOffsetIncrConst(m_PathOffsetIncrConst);
00260     pClone->SetPathOffsetIncrProp(m_PathOffsetIncrProp);
00261     pClone->SetSpacingMaxRand(m_BrushSpacingMaxRand);
00262     pClone->SetSpacingRandSeed(m_BrushSpacingRandSeed);
00263     pClone->SetScalingMaxRand(m_BrushScalingMaxRand);
00264     pClone->SetScalingRandSeed(m_BrushScalingRandSeed);
00265     pClone->SetSequenceType(m_SequenceType);
00266     pClone->SetSequenceSeed(m_SequenceRandSeed);
00267     pClone->SetOffsetValueMaxRand(m_OffsetValueMaxRand);
00268     pClone->SetOffsetValueRandSeed(m_OffsetValueRandSeed);
00269     pClone->SetOffsetTypeRandSeed(m_OffsetTypeRandSeed);
00270 
00271     pClone->SetRotationMaxRand(m_RotationMaxRand);
00272     pClone->SetRotationRandSeed(m_RotationRandSeed);
00273 
00274     pClone->SetUseLocalFillColour(m_bUseLocalFillColour);
00275 
00276     pClone->SetParentAttribute(m_pParentAttr);
00277     
00278     pClone->SetBlendedBrushDefinition(m_pBlendedBrushDef);
00279 
00280     return(pClone);
00281 }

void BlendedPathProcessorBrush::DeleteBlendedBrushDefinition  ) 
 

Deletes the blended brush definition, use with caution, as the brush defintions are often used by multiple path processors.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
- [INPUTS]
Returns:
-

Definition at line 194 of file blppbrsh.cpp.

00195 {
00196     if (m_pBlendedBrushDef != NULL)
00197         delete m_pBlendedBrushDef;
00198     m_pBlendedBrushDef = NULL;
00199 }

double BlendedPathProcessorBrush::GetBlendRatio  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
our blend ratio member

Definition at line 294 of file blppbrsh.cpp.

00295 {
00296     return m_BlendRatio;
00297 }

BrushDefinition * BlendedPathProcessorBrush::GetOurBrushDefinition  )  [virtual]
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
if we have a blended brush definition then we will return that, otherwise we will use the base class

Reimplemented from PathProcessorBrush.

Definition at line 154 of file blppbrsh.cpp.

00155 {
00156     if (m_pBlendedBrushDef != NULL)
00157         return m_pBlendedBrushDef;
00158 
00159     return PathProcessorBrush::GetOurBrushDefinition();
00160 }

virtual BOOL BlendedPathProcessorBrush::IsBlended  )  [inline, virtual]
 

Reimplemented from PathProcessorBrush.

Definition at line 135 of file blppbrsh.h.

00135 { return TRUE;}

void BlendedPathProcessorBrush::SetBlendedBrushDefinition BlendedBrushDefinition pDef  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Parameters:
A blended brush definition, this can be NULL [INPUTS]
Returns:
-

Definition at line 175 of file blppbrsh.cpp.

00176 {
00177     m_pBlendedBrushDef = pDef;
00178 }

BOOL BlendedPathProcessorBrush::SetBlendRatio double  Ratio  ) 
 

As above.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/99
Returns:
TRUE if Ratio is in the range 0-1, otherwise false

Definition at line 212 of file blppbrsh.cpp.

00213 {
00214     if (Ratio < 0 || Ratio > 1)
00215         return FALSE;
00216     m_BlendRatio = Ratio;
00217     return TRUE;
00218 }


Member Data Documentation

double BlendedPathProcessorBrush::m_BlendRatio [protected]
 

Definition at line 148 of file blppbrsh.h.

BlendedBrushDefinition* BlendedPathProcessorBrush::m_pBlendedBrushDef [protected]
 

Definition at line 146 of file blppbrsh.h.


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