You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
C++
60 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "ActionItem.h"
|
|
|
|
class CActionRotationItem
|
|
: public CActionItem
|
|
{
|
|
public:
|
|
CActionRotationItem();
|
|
|
|
/**
|
|
* 构造函数
|
|
* 注意,如果调用该构造函数,表示将旋转图件中所有图元
|
|
*
|
|
* \param ppDoc
|
|
* \param actionType Action 类型
|
|
* \param x 旋转原点 x 坐标
|
|
* \param y 旋转原点 y 坐标
|
|
* \param angle 旋转角度
|
|
*/
|
|
CActionRotationItem(CSigmaDoc* ppDoc, UINT actionType, double x, double y, double angle);
|
|
|
|
/**
|
|
* 构造函数
|
|
*
|
|
* \param ppDoc
|
|
* \param actionType Action 类型
|
|
* \param x 旋转原点 x 坐标
|
|
* \param y 旋转原点 y 坐标
|
|
* \param angle 旋转角度
|
|
* \param elements 要旋转的元素,如果为空,则依然表示旋转整个图件中所有图元
|
|
*/
|
|
CActionRotationItem(CSigmaDoc* ppDoc, UINT actionType,double x, double y, double angle, const CPositionList &elements);
|
|
|
|
std::string GetActionName() const override
|
|
{
|
|
return typeid(*this).name();
|
|
}
|
|
|
|
|
|
void Undo() override;
|
|
|
|
void Redo() override;
|
|
|
|
void Do() override;
|
|
|
|
void accept(CActionVisitor& visitor) override;
|
|
|
|
friend class BlobSerializer;
|
|
|
|
private:
|
|
void Rotation(double angle);
|
|
|
|
double m_x = 0.0;
|
|
double m_y = 0.0;
|
|
double m_angle = 0.0;
|
|
CPositionList m_elements;
|
|
};
|
|
|