以交互绘制圆形为例:
- /// j-operator-create-circle.h
-
- #pragma once
-
- #include "j-operator.h"
- #include "j-geometry/j-geometry-circle.h"
-
- namespace JNSOperator {
-
- enum class JCreateCircleStep {
- eCreateCircleStepInit = 0,
- eCreateCircleStepFirstDown,
- eCreateCircleStepFirstRelease,
- eCreateCircleStepSecondDown,
- eCreateCircleStepSecondRelease
- };
-
- class JOperatorCreateCircle : public JOperator {
- public:
- JOperatorCreateCircle(JOperatorManager *manager);
- virtual ~JOperatorCreateCircle();
-
- unsigned GetClassId() const override {
- return ID_OP_CREATE_CIRCLE;