Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/InfoPanelSceneLayer.h @ 1325:be17fed8c7c5 broker
Added flag in InfoPanelSceneLayer to
apply the scene rotation to the
displayed image.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 24 Mar 2020 20:34:28 +0100 |
parents | 8a0a62189f46 |
children | 30deba7bc8e2 |
comparison
equal
deleted
inserted
replaced
1324:4d8d642f7036 | 1325:be17fed8c7c5 |
---|---|
35 { | 35 { |
36 private: | 36 private: |
37 std::unique_ptr<Orthanc::ImageAccessor> texture_; | 37 std::unique_ptr<Orthanc::ImageAccessor> texture_; |
38 BitmapAnchor anchor_; | 38 BitmapAnchor anchor_; |
39 bool isLinearInterpolation_; | 39 bool isLinearInterpolation_; |
40 bool applySceneRotation_; | |
40 | 41 |
41 public: | 42 public: |
43 /** | |
44 * If you supply `true` for `applySceneRotation`, then, in addition to | |
45 * a translation to bring it at the desired anchoring location, the image | |
46 * will be rotated around its center by the same rotation as the scene | |
47 * transformation. | |
48 */ | |
42 InfoPanelSceneLayer(const Orthanc::ImageAccessor& texture, | 49 InfoPanelSceneLayer(const Orthanc::ImageAccessor& texture, |
43 BitmapAnchor anchor, | 50 BitmapAnchor anchor, |
44 bool isLinearInterpolation); | 51 bool isLinearInterpolation, |
52 bool applySceneRotation = false); | |
45 | 53 |
46 virtual ISceneLayer* Clone() const | 54 virtual ISceneLayer* Clone() const |
47 { | 55 { |
48 return new InfoPanelSceneLayer(*texture_, anchor_, isLinearInterpolation_); | 56 return new InfoPanelSceneLayer(*texture_, |
57 anchor_, | |
58 isLinearInterpolation_, | |
59 applySceneRotation_); | |
49 } | 60 } |
50 | 61 |
51 const Orthanc::ImageAccessor& GetTexture() const | 62 const Orthanc::ImageAccessor& GetTexture() const |
52 { | 63 { |
53 return *texture_; | 64 return *texture_; |
54 } | 65 } |
55 | 66 |
56 BitmapAnchor GetAnchor() const | 67 BitmapAnchor GetAnchor() const |
57 { | 68 { |
58 return anchor_; | 69 return anchor_; |
70 } | |
71 | |
72 bool ShouldApplySceneRotation() const | |
73 { | |
74 return applySceneRotation_; | |
59 } | 75 } |
60 | 76 |
61 bool IsLinearInterpolation() const | 77 bool IsLinearInterpolation() const |
62 { | 78 { |
63 return isLinearInterpolation_; | 79 return isLinearInterpolation_; |