Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyTextLayer.cpp @ 1201:ab958fd99b07
RadiographyScene fixes
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Fri, 29 Nov 2019 16:21:24 +0100 |
parents | a5f2a6b04a31 |
children | 9ee6b28f53e8 |
comparison
equal
deleted
inserted
replaced
1199:922d2e61aa5d | 1201:ab958fd99b07 |
---|---|
27 namespace OrthancStone | 27 namespace OrthancStone |
28 { | 28 { |
29 bool RadiographyTextLayer::fontHasBeenConfigured_ = false; | 29 bool RadiographyTextLayer::fontHasBeenConfigured_ = false; |
30 Orthanc::EmbeddedResources::FileResourceId RadiographyTextLayer::fontResourceId_; | 30 Orthanc::EmbeddedResources::FileResourceId RadiographyTextLayer::fontResourceId_; |
31 | 31 |
32 void RadiographyTextLayer::LoadText(const std::string& utf8, | 32 void RadiographyTextLayer::SetText(const std::string& utf8, |
33 unsigned int fontSize, | 33 unsigned int fontSize, |
34 uint8_t foreground) | 34 uint8_t foreground) |
35 { | 35 { |
36 if (!fontHasBeenConfigured_) | 36 if (!fontHasBeenConfigured_) |
37 { | 37 { |
43 foreground_ = foreground; | 43 foreground_ = foreground; |
44 | 44 |
45 SetAlpha(TextRenderer::Render(fontResourceId_, | 45 SetAlpha(TextRenderer::Render(fontResourceId_, |
46 fontSize_, | 46 fontSize_, |
47 text_)); | 47 text_)); |
48 | |
48 SetForegroundValue(foreground * 256.0f); | 49 SetForegroundValue(foreground * 256.0f); |
49 } | 50 } |
51 | |
50 } | 52 } |