comparison Framework/Radiography/RadiographyTextLayer.h @ 1195:bdc6837d5917 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 27 Nov 2019 14:34:34 +0100
parents b537002f83a9 c6a36ecd641d
children 54cbffabdc45
comparison
equal deleted inserted replaced
1189:09fc591d8ff9 1195:bdc6837d5917
28 class RadiographyScene; 28 class RadiographyScene;
29 29
30 class RadiographyTextLayer : public RadiographyAlphaLayer 30 class RadiographyTextLayer : public RadiographyAlphaLayer
31 { 31 {
32 private: 32 private:
33 std::string text_; 33 std::string text_;
34 std::string fontName_; 34 size_t fontSize_;
35 uint8_t foreground_;
35 36
37 static bool fontHasBeenConfigured_;
38 static Orthanc::EmbeddedResources::FileResourceId fontResourceId_;
36 public: 39 public:
37 RadiographyTextLayer(const RadiographyScene& scene) : 40 RadiographyTextLayer(const RadiographyScene& scene) :
38 RadiographyAlphaLayer(scene) 41 RadiographyAlphaLayer(scene)
39 { 42 {
40 } 43 }
41 44
42 void LoadText(const Orthanc::Font& font, 45 void LoadText(const std::string& utf8, size_t fontSize, uint8_t foreground);
43 const std::string& utf8);
44 46
45 const std::string& GetText() const 47 const std::string& GetText() const
46 { 48 {
47 return text_; 49 return text_;
48 } 50 }
49 51
50 const std::string& GetFontName() const 52 size_t GetFontSize() const
51 { 53 {
52 return fontName_; 54 return fontSize_;
55 }
56
57 uint8_t GetForeground() const
58 {
59 return foreground_;
60 }
61
62 static void SetFont(Orthanc::EmbeddedResources::FileResourceId fontResourceId)
63 {
64 fontResourceId_ = fontResourceId;
65 fontHasBeenConfigured_ = true;
53 } 66 }
54 }; 67 };
55 } 68 }