changeset 1086:3dbdcecccf5d

fix
author Alain Mazy <alain@mazy.be>
date Tue, 22 Oct 2019 17:28:59 +0200
parents 63539e826355
children b8521df3944a
files Applications/Samples/SingleFrameEditorApplication.h Framework/Toolbox/TextRenderer.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Samples/SingleFrameEditorApplication.h	Tue Oct 22 17:24:37 2019 +0200
+++ b/Applications/Samples/SingleFrameEditorApplication.h	Tue Oct 22 17:28:59 2019 +0200
@@ -518,7 +518,7 @@
         interactor_.SetMaskLayer(maskLayer_);
 
         {
-          std::auto_ptr<Orthanc::ImageAccessor> renderedTextAlpha(TextRenderer::RenderWhiteOnBlack(Orthanc::EmbeddedResources::UBUNTU_FONT, 100,
+          std::auto_ptr<Orthanc::ImageAccessor> renderedTextAlpha(TextRenderer::Render(Orthanc::EmbeddedResources::UBUNTU_FONT, 100,
                                                                                     "%öÇaA&#"));
           RadiographyLayer& layer = scene_->LoadAlphaBitmap(renderedTextAlpha.release(), NULL);
           dynamic_cast<RadiographyAlphaLayer&>(layer).SetForegroundValue(200);
--- a/Framework/Toolbox/TextRenderer.cpp	Tue Oct 22 17:24:37 2019 +0200
+++ b/Framework/Toolbox/TextRenderer.cpp	Tue Oct 22 17:28:59 2019 +0200
@@ -28,6 +28,7 @@
 #include <../../Framework/Fonts/GlyphBitmapAlphabet.h>
 #include <../../Framework/Fonts/FontRenderer.h>
 #include <Core/Images/PngWriter.h>
+#include <Core/Toolbox.h>
 
 #include "Core/Images/Image.h"
 #include "Core/Images/ImageProcessing.h"
@@ -65,7 +66,7 @@
                                                         const std::string& utf8String,
                                                         uint8_t foreground)
   {
-    std::auto_ptr<Orthanc::ImageAccessor> renderedText8(RenderWhiteOnBlack(resource, fontSize, utf8String));
+    std::auto_ptr<Orthanc::ImageAccessor> renderedText8(Render(resource, fontSize, utf8String));
     std::auto_ptr<Orthanc::Image> target(new Orthanc::Image(Orthanc::PixelFormat_RGBA32, renderedText8->GetWidth(), renderedText8->GetHeight(), true));
 
     Orthanc::ImageProcessing::Set(*target, foreground, foreground, foreground, *renderedText8);