Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/LineMeasureTool.h @ 865:a29c13497557
Added operators to ScenePoint2D + highlight support on MouseOver for measuring tools
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 25 Jun 2019 15:24:13 +0200 |
parents | e42b491f1fb2 |
children | c71ef52602a0 |
comparison
equal
deleted
inserted
replaced
864:ae3eccd0f545 | 865:a29c13497557 |
---|---|
45 void SetEnd(ScenePoint2D end); | 45 void SetEnd(ScenePoint2D end); |
46 void Set(ScenePoint2D start, ScenePoint2D end); | 46 void Set(ScenePoint2D start, ScenePoint2D end); |
47 | 47 |
48 | 48 |
49 virtual bool HitTest(ScenePoint2D p) const ORTHANC_OVERRIDE; | 49 virtual bool HitTest(ScenePoint2D p) const ORTHANC_OVERRIDE; |
50 virtual void Highlight(ScenePoint2D p) ORTHANC_OVERRIDE; | |
51 virtual void ResetHighlightState() ORTHANC_OVERRIDE; | |
52 | |
53 enum LineHighlightArea | |
54 { | |
55 LineHighlightArea_None, | |
56 LineHighlightArea_Start, | |
57 LineHighlightArea_End, | |
58 LineHighlightArea_Segment | |
59 }; | |
60 | |
61 | |
62 LineHighlightArea LineHitTest(ScenePoint2D p) const; | |
50 | 63 |
51 private: | 64 private: |
52 virtual void RefreshScene() ORTHANC_OVERRIDE; | 65 virtual void RefreshScene() ORTHANC_OVERRIDE; |
53 void RemoveFromScene(); | 66 void RemoveFromScene(); |
67 void SetLineHighlightArea(LineHighlightArea area); | |
54 | 68 |
55 private: | 69 private: |
56 ScenePoint2D start_; | 70 |
57 ScenePoint2D end_; | 71 private: |
58 boost::shared_ptr<LayerHolder> layerHolder_; | 72 ScenePoint2D start_; |
59 int baseLayerIndex_; | 73 ScenePoint2D end_; |
74 boost::shared_ptr<LayerHolder> layerHolder_; | |
75 int baseLayerIndex_; | |
76 LineHighlightArea lineHighlightArea_; | |
60 }; | 77 }; |
61 | 78 |
62 } | 79 } |
63 | 80 |