Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyTextLayer.h Sat Nov 23 11:57:03 2019 +0100 +++ b/Framework/Radiography/RadiographyTextLayer.h Wed Nov 27 14:34:34 2019 +0100 @@ -30,26 +30,39 @@ class RadiographyTextLayer : public RadiographyAlphaLayer { private: - std::string text_; - std::string fontName_; + std::string text_; + size_t fontSize_; + uint8_t foreground_; + static bool fontHasBeenConfigured_; + static Orthanc::EmbeddedResources::FileResourceId fontResourceId_; public: RadiographyTextLayer(const RadiographyScene& scene) : RadiographyAlphaLayer(scene) { } - void LoadText(const Orthanc::Font& font, - const std::string& utf8); + void LoadText(const std::string& utf8, size_t fontSize, uint8_t foreground); const std::string& GetText() const { return text_; } - const std::string& GetFontName() const + size_t GetFontSize() const + { + return fontSize_; + } + + uint8_t GetForeground() const { - return fontName_; + return foreground_; + } + + static void SetFont(Orthanc::EmbeddedResources::FileResourceId fontResourceId) + { + fontResourceId_ = fontResourceId; + fontHasBeenConfigured_ = true; } }; }