Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/ColorSceneLayer.h @ 632:500c3f70b6c2
- Added a ClearAllChains method to PolylineSceneLayer --> revision must change
when calling it ==> BumpRevision has been added to base class
- Added some docs
= Added GetMinDepth + GetMaxDepth to Scene2D (to alleviate the need for app-
specific "Z depth registry" : clients may simply add a new layer on top or at
the bottom of the existing layer set.
- Added the line tracker measurement tools, commands and trackers. Generic base
classes + Line measure
- started work on the line measure handles
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Thu, 09 May 2019 10:41:31 +0200 |
parents | 434ceeb0bcab |
children | f0008c55e5f7 |
comparison
equal
deleted
inserted
replaced
618:0925b27e8750 | 632:500c3f70b6c2 |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "ISceneLayer.h" | 24 #include "ISceneLayer.h" |
25 #include <Core/Enumerations.h> | |
25 | 26 |
26 #include <stdint.h> | 27 #include <stdint.h> |
27 | 28 |
28 namespace OrthancStone | 29 namespace OrthancStone |
29 { | 30 { |
31 { | 32 { |
32 private: | 33 private: |
33 uint8_t red_; | 34 uint8_t red_; |
34 uint8_t green_; | 35 uint8_t green_; |
35 uint8_t blue_; | 36 uint8_t blue_; |
36 | 37 uint64_t revision_; |
38 protected: | |
39 void BumpRevision() | |
40 { | |
41 // this is *not* thread-safe!!! | |
42 revision_++; | |
43 } | |
37 public: | 44 public: |
38 ColorSceneLayer() : | 45 ColorSceneLayer() : |
39 red_(255), | 46 red_(255), |
40 green_(255), | 47 green_(255), |
41 blue_(255) | 48 blue_(255) |
42 { | 49 { |
50 } | |
51 | |
52 virtual uint64_t GetRevision() const ORTHANC_OVERRIDE | |
53 { | |
54 return revision_; | |
43 } | 55 } |
44 | 56 |
45 void SetColor(uint8_t red, | 57 void SetColor(uint8_t red, |
46 uint8_t green, | 58 uint8_t green, |
47 uint8_t blue) | 59 uint8_t blue) |
48 { | 60 { |
49 red_ = red; | 61 red_ = red; |
50 green_ = green; | 62 green_ = green; |
51 blue_ = blue; | 63 blue_ = blue; |
64 BumpRevision(); | |
52 } | 65 } |
53 | 66 |
54 uint8_t GetRed() const | 67 uint8_t GetRed() const |
55 { | 68 { |
56 return red_; | 69 return red_; |