comparison OrthancStone/Sources/Scene2D/GrayscaleWindowingSceneTracker.cpp @ 1721:d4a8e2b19a65

new "GrayscaleWindowingChanged" message from GrayscaleWindowingSceneTracker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 01 Dec 2020 12:51:57 +0100
parents 5cdc5b98f14d
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1720:b8d19f53aaca 1721:d4a8e2b19a65
80 if (lock_.get() != NULL) 80 if (lock_.get() != NULL)
81 { 81 {
82 lock_->Invalidate(); 82 lock_->Invalidate();
83 } 83 }
84 } 84 }
85
86 void BroadcastGrayscaleWindowingChanged(double center,
87 double width)
88 {
89 if (lock_.get() != NULL)
90 {
91 lock_->GetController().BroadcastGrayscaleWindowingChanged(center, width);
92 }
93 }
85 }; 94 };
86 } 95 }
87 96
88 void GrayscaleWindowingSceneTracker::SetWindowing(float center, 97 void GrayscaleWindowingSceneTracker::SetWindowing(float center,
89 float width) 98 float width)
94 GrayscaleLayerAccessor accessor(viewport, layerIndex_); 103 GrayscaleLayerAccessor accessor(viewport, layerIndex_);
95 104
96 if (accessor.IsValid()) 105 if (accessor.IsValid())
97 { 106 {
98 accessor.GetLayer().SetCustomWindowing(center, width); 107 accessor.GetLayer().SetCustomWindowing(center, width);
108 accessor.BroadcastGrayscaleWindowingChanged(center, width);
99 accessor.Invalidate(); 109 accessor.Invalidate();
100 } 110 }
101 } 111 }
102 } 112 }
103 113