AttrColourChange Class Reference

Change Fill colour Attribute class. This Attribute never exists in the Tree. It is used for changing the colours of an existing Fill Geometry. More...

#include <fillattr2.h>

Inheritance diagram for AttrColourChange:

AttrValueChange AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject AttrColourDrop List of all members.

Public Member Functions

 AttrColourChange ()
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
virtual AttributeValueGetAttributeValue ()
virtual CCRuntimeClassGetAttributeType ()
 Determines the scope of the value change.
virtual AttrFillGeometryMutateFill (AttrFillGeometry *FillToMutate)
 Changes the colour of a fill.

Protected Attributes

FlatFillAttribute Value

Detailed Description

Change Fill colour Attribute class. This Attribute never exists in the Tree. It is used for changing the colours of an existing Fill Geometry.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
8/8/94
See also:
AttrFillGeometry

Definition at line 123 of file fillattr2.h.


Constructor & Destructor Documentation

AttrColourChange::AttrColourChange  )  [inline]
 

Definition at line 128 of file fillattr2.h.

00128 : AttrValueChange() {}


Member Function Documentation

virtual CCRuntimeClass* AttrColourChange::GetAttributeType  )  [inline, virtual]
 

Determines the scope of the value change.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/94
Returns:
A CC_RUNTIME_CLASS depending on whether this should change colour or transparency attribute.

Reimplemented from AttrValueChange.

Definition at line 133 of file fillattr2.h.

virtual AttributeValue* AttrColourChange::GetAttributeValue  )  [inline, virtual]
 

Implements AttrValueChange.

Definition at line 132 of file fillattr2.h.

00132 { return &Value; }

UINT32 AttrColourChange::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
3/01/95
Returns:
Attribute description ID

Reimplemented from AttrValueChange.

Reimplemented in AttrColourDrop.

Definition at line 4373 of file fillattr.cpp.

04374 {
04375     return (_R(IDS_COLOUR_CHANGE));
04376 }                                  

AttrFillGeometry * AttrColourChange::MutateFill AttrFillGeometry FillToMutate  )  [virtual]
 

Changes the colour of a fill.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/94
Parameters:
The fill that is to be changed. [INPUTS]

Reimplemented from AttrValueChange.

Reimplemented in AttrColourDrop.

Definition at line 3986 of file fillattr.cpp.

03987 { 
03988 #if !defined(EXCLUDE_FROM_RALPH)
03989     if (FillToMutate->IsVisible() && 
03990         FillToMutate->GetSelectionCount() == 0 &&
03991         SelectionCount > 0)
03992         return NULL;
03993 
03994     // Make a copy of this Fill to change
03995     AttrFillGeometry* NewFill = (AttrFillGeometry*)FillToMutate->SimpleCopy();
03996     if (NewFill == NULL)
03997         return NULL;
03998 
03999     BOOL Changed = NewFill->ChangeControlColour(this);
04000 
04001     // Did we change any colours ?
04002     if (!Changed)
04003     {
04004         if (NewFill->IsABitmapFill() &&
04005             NewFill->GetSelectionCount() > 0)
04006         {
04007             if (GetApplication()->GetBlobManager()->GetCurrentInterest().Fill && IsVisible())
04008             {
04009                 // We must have failed when trying to set a contone colour,
04010                 // so we'll do nothing
04011 
04012                 delete NewFill;
04013                 return NULL;
04014             }
04015         }
04016 
04017         // No Control points selected, so make a flat fill instead
04018         delete NewFill;
04019 
04020         NewFill = new AttrFlatColourFill;
04021         if (NewFill == NULL)
04022             return NULL;
04023 
04024         // and use the mutants colour
04025         *(FillGeometryAttribute*)(NewFill->GetAttributeValue()) = *(FillGeometryAttribute*)(this->GetAttributeValue());
04026 
04027         if (GetApplication()->GetBlobManager()->GetCurrentInterest().Fill && 
04028             FillToMutate->IsVisible() &&
04029             FillToMutate->FindParent() &&
04030             FillToMutate->FindParent()->IsSelected())
04031         {
04032             FillToMutate->RenderFillBlobs();
04033         }
04034     }
04035     // Return the Mutated Fill
04036     return NewFill;
04037 #else
04038     return NULL;
04039 #endif
04040 }


Member Data Documentation

FlatFillAttribute AttrColourChange::Value [protected]
 

Definition at line 138 of file fillattr2.h.


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