#include <fillattr2.h>
Inheritance diagram for AttrTranspChange:
Public Member Functions | |
AttrTranspChange () | |
Constructor for an attribute value change. | |
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. | |
virtual NodeAttribute * | GetOtherAttrToApply (BOOL *IsMutate) |
Some attributes require a secondary atribute to be changed when they are changed. This routine obtains a pointer to the secondary attribute to apply. | |
Protected Attributes | |
FlatTranspFillAttribute | Value |
Definition at line 366 of file fillattr2.h.
|
Constructor for an attribute value change.
Definition at line 3933 of file fillattr.cpp.
|
|
Determines the scope of the value change.
Reimplemented from AttrValueChange. Definition at line 376 of file fillattr2.h. 00376 { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
|
|
Implements AttrValueChange. Definition at line 375 of file fillattr2.h. 00375 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from AttrValueChange. Reimplemented in AttrTranspTypeChange. Definition at line 4485 of file fillattr.cpp. 04486 { 04487 return (_R(IDS_TRANSP_CHANGE)); //_R(IDS_FLATTRANSPFILL)); 04488 }
|
|
Some attributes require a secondary atribute to be changed when they are changed. This routine obtains a pointer to the secondary attribute to apply.
Reimplemented from NodeAttribute. Reimplemented in AttrTranspTypeChange, AttrRemoveTransp, and AttrMakeFlatTransp. Definition at line 3952 of file fillattr.cpp. 03953 { 03954 ERROR3IF(IsMutate == NULL, "NULL flag pointer passed to GetOtherAttrToApply"); 03955 03956 // A transparency change also needs to set the Stroke Transparency 03957 03958 if (AttrFillGeometry::FillSelectionCount() > 0) 03959 return NULL; // Only set line transparency if no control 03960 // points are selected 03961 03962 NodeAttribute* OtherAttr = new AttrStrokeTranspChange; 03963 if (OtherAttr == NULL) 03964 return NULL; 03965 03966 UINT32 Transp = *GetStartTransp(); 03967 03968 ((AttrStrokeTranspChange *)OtherAttr)->SetStartTransp(&Transp); 03969 03970 *IsMutate = TRUE; 03971 03972 return OtherAttr; 03973 }
|
|
Changes the colour of a fill.
Reimplemented from AttrValueChange. Reimplemented in AttrTranspTypeChange, AttrRemoveTransp, and AttrMakeFlatTransp. Definition at line 4053 of file fillattr.cpp. 04054 { 04055 #if !defined(EXCLUDE_FROM_RALPH) 04056 if (FillToMutate->IsVisible() && 04057 FillToMutate->GetSelectionCount() == 0 && 04058 SelectionCount > 0) 04059 return NULL; 04060 04061 // Make a copy of this Fill to change 04062 AttrFillGeometry* NewFill = (AttrFillGeometry*)FillToMutate->SimpleCopy(); 04063 if (NewFill == NULL) 04064 return NULL; 04065 04066 BOOL Changed = NewFill->ChangeControlTransp(this); 04067 04068 // Did we change any colours ? 04069 if (!Changed) 04070 { 04071 // No Control points selected, so make a flat fill instead 04072 delete NewFill; 04073 04074 NewFill = new AttrFlatTranspFill; 04075 if (NewFill == NULL) 04076 return NULL; 04077 04078 // and use the mutants colour 04079 *(FillGeometryAttribute*)(NewFill->GetAttributeValue()) = *(FillGeometryAttribute*)(this->GetAttributeValue()); 04080 04081 NewFill->SetTranspType(FillToMutate->GetTranspType()); 04082 04083 if (GetApplication()->GetBlobManager()->GetCurrentInterest().Fill && 04084 FillToMutate->IsVisible() && 04085 FillToMutate->FindParent() && 04086 FillToMutate->FindParent()->IsSelected()) 04087 { 04088 FillToMutate->RenderFillBlobs(); 04089 } 04090 } 04091 04092 // Return the Mutated Fill 04093 return NewFill; 04094 #else 04095 return NULL; 04096 #endif 04097 }
|
|
Definition at line 385 of file fillattr2.h. |