Mercurial > hg > orthanc-stone
comparison Framework/Fonts/GlyphTextureAlphabet.cpp @ 1298:8a0a62189f46
replacing std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Mar 2020 16:31:30 +0100 |
parents | 2d8ab34c8c91 |
children | 257f2c9a02ac |
comparison
equal
deleted
inserted
replaced
1296:86400fa16091 | 1298:8a0a62189f46 |
---|---|
75 | 75 |
76 | 76 |
77 class GlyphTextureAlphabet::TextureGenerator : public GlyphAlphabet::IGlyphVisitor | 77 class GlyphTextureAlphabet::TextureGenerator : public GlyphAlphabet::IGlyphVisitor |
78 { | 78 { |
79 private: | 79 private: |
80 std::auto_ptr<Orthanc::ImageAccessor> texture_; | 80 std::unique_ptr<Orthanc::ImageAccessor> texture_; |
81 | 81 |
82 unsigned int countColumns_; | 82 unsigned int countColumns_; |
83 unsigned int countRows_; | 83 unsigned int countRows_; |
84 GlyphAlphabet& targetAlphabet_; | 84 GlyphAlphabet& targetAlphabet_; |
85 unsigned int glyphMaxWidth_; | 85 unsigned int glyphMaxWidth_; |
287 | 287 |
288 Orthanc::ImageAccessor* GlyphTextureAlphabet::RenderText(const std::string& utf8) | 288 Orthanc::ImageAccessor* GlyphTextureAlphabet::RenderText(const std::string& utf8) |
289 { | 289 { |
290 TextBoundingBox box(alphabet_, utf8); | 290 TextBoundingBox box(alphabet_, utf8); |
291 | 291 |
292 std::auto_ptr<Orthanc::ImageAccessor> bitmap( | 292 std::unique_ptr<Orthanc::ImageAccessor> bitmap( |
293 new Orthanc::Image(Orthanc::PixelFormat_RGBA32, | 293 new Orthanc::Image(Orthanc::PixelFormat_RGBA32, |
294 box.GetWidth(), box.GetHeight(), | 294 box.GetWidth(), box.GetHeight(), |
295 true /* force minimal pitch */)); | 295 true /* force minimal pitch */)); |
296 | 296 |
297 Orthanc::ImageProcessing::Set(*bitmap, 0, 0, 0, 0); | 297 Orthanc::ImageProcessing::Set(*bitmap, 0, 0, 0, 0); |