Mercurial > hg > orthanc-stone
diff Framework/Radiography/RadiographyTextLayer.h @ 1224:37bc7f115f81 broker
integration mainline->broker
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 07 Dec 2019 18:45:37 +0100 |
parents | b519c1c878f1 9ee6b28f53e8 |
children | 68579a31eeb4 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyTextLayer.h Sat Dec 07 18:18:07 2019 +0100 +++ b/Framework/Radiography/RadiographyTextLayer.h Sat Dec 07 18:45:37 2019 +0100 @@ -31,38 +31,42 @@ { private: std::string text_; + std::string font_; unsigned int fontSize_; - uint8_t foreground_; + uint8_t foregroundGreyLevel_; - static bool fontHasBeenConfigured_; - static Orthanc::EmbeddedResources::FileResourceId fontResourceId_; + static std::map<std::string, Orthanc::EmbeddedResources::FileResourceId> fonts_; public: RadiographyTextLayer(const RadiographyScene& scene) : RadiographyAlphaLayer(scene) { } - void SetText(const std::string& utf8, unsigned int fontSize, uint8_t foreground); + void SetText(const std::string& utf8, const std::string& font, unsigned int fontSize, uint8_t foregroundGreyLevel); const std::string& GetText() const { return text_; } + const std::string& GetFont() const + { + return font_; + } + unsigned int GetFontSize() const { return fontSize_; } - uint8_t GetForeground() const + uint8_t GetForegroundGreyLevel() const { - return foreground_; + return foregroundGreyLevel_; } - static void SetFont(Orthanc::EmbeddedResources::FileResourceId fontResourceId) + static void RegisterFont(const std::string& name, Orthanc::EmbeddedResources::FileResourceId fontResourceId) { - fontResourceId_ = fontResourceId; - fontHasBeenConfigured_ = true; + fonts_[name] = fontResourceId; } }; }