CODRotateCommand Class

class CODRotateCommand: public CODCommand

Rotates a set of components.

Defined in: OdRotateCmd.h

Class Members

 CODRotateCommand(CODModel* pModel)

Constructor.

virtual  ~CODRotateCommand()

Destructor.

int m_nAngle

The angle to rotate the components by, in tenths of a degree.

CSize m_sizeAspectRatio

The aspect ratio of the viewport the components are being rotated in.

CMap&ltCODComponent*,CODComponent*,float,float> m_mapOriginX

The horizontal values of the origins to be used to rotate the&#09individual components.

CMap&ltCODComponent*,CODComponent*,float,float> m_mapOriginY

The vertical values of the origins to be used to rotate the individual components.

int  GetRotation() const

Gets the angle of rotation.

void  SetRotation(const int nAngle)

Sets the angle of rotation.

CSize  GetAspectRatio() const

Gets the aspect ratio of the viewport the components are being rotated in.

void  SetAspectRatio(const CSize sizeAspectRatio)

Sets the aspect ratio of the viewport the components are being rotated in.

void  ClearOrigins()

Removes all entries from both maps of origin values.

BOOL  GetOrigin(CODComponent* pComp, float& fOriginX, float& fOriginY) const

Gets the origin to be used for rotation for a particular component.

void  SetOrigin(CODComponent* pComp, float fOriginX, float fOriginY)

Sets the origin to be used for rotation for a particular component.

virtual BOOL  Execute()

Rotates the components.

virtual BOOL  Unexecute()

Rotate the components back to their old positions.

virtual sfl::MvcCommand*  Dup() const

Make a copy of this rotate command.

virtual void  GetUpdateSet(CODComponentSet& setUpdate) const

Returns a list of components that are affected by this command.

virtual void  Sprint(CString& strCmd)

Print information on this command for logging purposes.