20 #include "abstractEditMode.h" |
20 #include "abstractEditMode.h" |
21 |
21 |
22 class CircleMode : public AbstractDrawMode |
22 class CircleMode : public AbstractDrawMode |
23 { |
23 { |
24 DEFINE_CLASS (CircleMode, AbstractDrawMode) |
24 DEFINE_CLASS (CircleMode, AbstractDrawMode) |
25 double m_angleOffset; |
|
26 |
25 |
27 public: |
26 public: |
28 CircleMode (GLRenderer* renderer); |
27 CircleMode (GLRenderer* renderer); |
29 |
28 |
30 virtual void render (QPainter& painter) const override; |
29 void endDraw() override; |
31 virtual EditModeType type() const override; |
|
32 |
|
33 double getCircleDrawDist (int pos) const; |
30 double getCircleDrawDist (int pos) const; |
34 Matrix getCircleDrawMatrix (double scale); |
31 Matrix getCircleDrawMatrix (double scale); |
35 bool mouseReleased (const AbstractEditMode::MouseEventData& data) override; |
32 int maxVertices() const override; |
36 bool preAddVertex (Vertex const&) override; |
33 bool preAddVertex (Vertex const&) override; |
|
34 void render (QPainter& painter) const override; |
|
35 EditModeType type() const override; |
37 |
36 |
38 private: |
37 private: |
|
38 double m_angleOffset; |
|
39 |
39 void buildCircle(); |
40 void buildCircle(); |
40 double getAngleOffset() const; |
41 double getAngleOffset() const; |
41 }; |
42 }; |