ChangeContourStepsAction Class Reference

An action which undoes the modification of a path's filled bit (or redoes it) It can also be used to undo the IsStroked flag as well. More...

#include <opcntr.h>

Inheritance diagram for ChangeContourStepsAction:

Action ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ChangeContourStepsAction ()
 Constructor for the action.
 ~ChangeContourStepsAction ()
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, Node *pThisNodeBlend, UINT32 NumSteps, double DistanceEntered, ChangeContourStepsAction **NewAction)
 This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.

Protected Attributes

NodepNodeBlend
UINT32 OldNumSteps
double OldDistanceEntered

Detailed Description

An action which undoes the modification of a path's filled bit (or redoes it) It can also be used to undo the IsStroked flag as well.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/11/94
See also:
-

Definition at line 500 of file opcntr.h.


Constructor & Destructor Documentation

ChangeContourStepsAction::ChangeContourStepsAction  ) 
 

Constructor for the action.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 2634 of file opcntr.cpp.

02635 {
02636     pNodeBlend  = NULL;
02637     OldNumSteps = 0;
02638 }

ChangeContourStepsAction::~ChangeContourStepsAction  ) 
 

Definition at line 2734 of file opcntr.cpp.

02735 {
02736 }


Member Function Documentation

ActionCode ChangeContourStepsAction::Execute  )  [virtual]
 

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.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/11/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
ActionCode, one of AC_OK, AC_NO_RECORD or AC_FAIL

Errors: -

See also:
Action::Init()

Reimplemented from Action.

Definition at line 2709 of file opcntr.cpp.

02710 {
02711     ActionCode Act;
02712     ChangeContourStepsAction* pAction;
02713 
02714     UINT32 NumSteps = 0;
02715     double DistanceEntered = 0.0;
02716 
02717     NumSteps = ((NodeContourController *)pNodeBlend)->GetNumberOfSteps();
02718 
02719     Act = ChangeContourStepsAction::Init(   pOperation, 
02720                                         pOppositeActLst,
02721                                         pNodeBlend,
02722                                         NumSteps,
02723                                         DistanceEntered,
02724                                         &pAction);
02725     if (Act != AC_FAIL)
02726     {
02727         ((NodeContourController *)pNodeBlend)->SetNumberOfSteps(OldNumSteps);
02728         pNodeBlend->RegenerateNode(NULL, FALSE);
02729     }
02730 
02731     return Act;
02732 }

ActionCode ChangeContourStepsAction::Init Operation pOp,
ActionList pActionList,
Node pThisNodeBlend,
UINT32  NumSteps,
double  DistanceEntered,
ChangeContourStepsAction **  ppNewAction
[static]
 

This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
7/11/94
Parameters:
pOp = ptr to the operation to which this action belongs [INPUTS] pActionList = ptr to action list to which this action should be added pThisNodeBlend = ptr to NodeBlend to change NumSteps = Num steps to applied to pThisNodeBlend
ppNewAction = ptr to a ptr to an action, allowing the function to return [OUTPUTS] a pointer to the created action
Returns:
ActionCode, one of AC_OK, AC_NO_RECORD or AC_FAIL

Errors: -

See also:
Action::Init()

Definition at line 2672 of file opcntr.cpp.

02678 {
02679     UINT32 ActSize = sizeof(ChangeContourStepsAction);
02680 
02681     ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(ChangeContourStepsAction),(Action**)ppNewAction);
02682 
02683     if (Ac != AC_FAIL)
02684     {
02685         (*ppNewAction)->pNodeBlend  = pThisNodeBlend;
02686         (*ppNewAction)->OldNumSteps = NumSteps;
02687         (*ppNewAction)->OldDistanceEntered = DistanceEntered;
02688     }
02689 
02690     return Ac;
02691 }


Member Data Documentation

double ChangeContourStepsAction::OldDistanceEntered [protected]
 

Definition at line 518 of file opcntr.h.

UINT32 ChangeContourStepsAction::OldNumSteps [protected]
 

Definition at line 517 of file opcntr.h.

Node* ChangeContourStepsAction::pNodeBlend [protected]
 

Definition at line 516 of file opcntr.h.


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