#include <opgrad.h>
Inheritance diagram for RestoreFillRampAction:
Public Member Functions | |
RestoreFillRampAction () | |
Constructor for the action. | |
~RestoreFillRampAction () | |
virtual ActionCode | Execute () |
Executes the action. This will reset the num blend steps in pThisNodeBlend to OldNumSteps, after creating another action to record the current num steps of pThisNodeBlend. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, AttrFillGeometry *pFill, RestoreFillRampAction **NewAction) |
Stores the fill ramp of the given attribute for restoring on undo. | |
Protected Attributes | |
AttrFillGeometry * | m_pAttr |
ColourRamp | m_LastRamp |
Definition at line 448 of file opgrad.h.
|
Constructor for the action.
Definition at line 3864 of file opgrad.cpp.
|
|
Definition at line 3984 of file opgrad.cpp.
|
|
Executes the action. This will reset the num blend steps in pThisNodeBlend to OldNumSteps, after creating another action to record the current num steps of pThisNodeBlend.
Reimplemented from Action. Definition at line 3938 of file opgrad.cpp. 03939 { 03940 ActionCode Act; 03941 RestoreFillRampAction* pAction; 03942 03943 Act = RestoreFillRampAction::Init( pOperation, 03944 pOppositeActLst, 03945 m_pAttr, 03946 &pAction 03947 ); 03948 03949 if (Act != AC_FAIL) 03950 { 03951 Document * pDoc = Document::GetCurrent(); 03952 03953 if (pDoc) 03954 { 03955 /* 03956 DocRect dr = pController->GetBoundingRect(); 03957 03958 pDoc->ForceRedraw(pController->FindParentSpread(), 03959 dr, FALSE); 03960 */ 03961 03962 // CGS - we need to check for a NULL colour ramp - cause we may have deleted it! 03963 03964 ColourRamp* ColRamp = m_pAttr->GetColourRamp(); 03965 03966 if (ColRamp) 03967 { 03968 *m_pAttr->GetColourRamp() = m_LastRamp; 03969 } 03970 else 03971 { 03972 // if it is NULL, then we need to recreate one BEFORE making the above call! 03973 03974 ColRamp = new ColourRamp (); 03975 m_pAttr->SetColourRamp (ColRamp); 03976 *m_pAttr->GetColourRamp() = m_LastRamp; 03977 } 03978 } 03979 } 03980 03981 return Act; 03982 }
|
|
Stores the fill ramp of the given attribute for restoring on undo.
Definition at line 3894 of file opgrad.cpp. 03898 { 03899 UINT32 ActSize = sizeof(RestoreFillRampAction); 03900 03901 ActionCode Ac = Action::Init(pOp,pActionList,ActSize, 03902 CC_RUNTIME_CLASS(RestoreFillRampAction), 03903 (Action**)NewAction); 03904 03905 // Document * pDoc = Document::GetCurrent(); 03906 03907 DocRect dr; 03908 03909 if (Ac != AC_FAIL) 03910 { 03911 if (pFill->GetColourRamp() != NULL) 03912 { 03913 (*NewAction)->m_LastRamp = *pFill->GetColourRamp(); 03914 } 03915 // bugfix #6835 (Marc 22/09/04) - make sure we store the fill even if there is no ramp 03916 (*NewAction)->m_pAttr = pFill; 03917 } 03918 03919 return Ac; 03920 }
|
|
|
|
|