#include <fillattr2.h>
Inheritance diagram for AttrColourChange:
Public Member Functions | |
AttrColourChange () | |
virtual UINT32 | GetAttrNameID (void) |
Returns a string resource ID describing the attribute. | |
virtual AttributeValue * | GetAttributeValue () |
virtual CCRuntimeClass * | GetAttributeType () |
Determines the scope of the value change. | |
virtual AttrFillGeometry * | MutateFill (AttrFillGeometry *FillToMutate) |
Changes the colour of a fill. | |
Protected Attributes | |
FlatFillAttribute | Value |
Definition at line 123 of file fillattr2.h.
|
Definition at line 128 of file fillattr2.h. 00128 : AttrValueChange() {}
|
|
Determines the scope of the value change.
Reimplemented from AttrValueChange. Definition at line 133 of file fillattr2.h. 00133 { return CC_RUNTIME_CLASS(AttrFillGeometry); }
|
|
Implements AttrValueChange. Definition at line 132 of file fillattr2.h. 00132 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from AttrValueChange. Reimplemented in AttrColourDrop. Definition at line 4373 of file fillattr.cpp. 04374 { 04375 return (_R(IDS_COLOUR_CHANGE)); 04376 }
|
|
Changes the colour of a fill.
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 }
|
|
Definition at line 138 of file fillattr2.h. |