Mercurial > hg > orthanc-stone
comparison Framework/Fonts/GlyphTextureAlphabet.cpp @ 699:5c551f078c18 refactor-viewport-controller
Merge from default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 17 May 2019 09:20:46 +0200 |
parents | 9a474e90e832 |
children | 769249e1f3b4 |
comparison
equal
deleted
inserted
replaced
698:8b6adfb62a2f | 699:5c551f078c18 |
---|---|
87 glyphMaxWidth_(glyphMaxWidth), | 87 glyphMaxWidth_(glyphMaxWidth), |
88 glyphMaxHeight_(glyphMaxHeight), | 88 glyphMaxHeight_(glyphMaxHeight), |
89 column_(0), | 89 column_(0), |
90 row_(0) | 90 row_(0) |
91 { | 91 { |
92 int c = boost::math::iround<int>(sqrt(static_cast<float>(countGlyphs))); | 92 int c = boost::math::iround<float>(sqrt(static_cast<float>(countGlyphs))); |
93 | 93 |
94 if (c <= 0) | 94 if (c <= 0) |
95 { | 95 { |
96 countColumns_ = 1; | 96 countColumns_ = 1; |
97 } | 97 } |
237 { | 237 { |
238 GlyphSizeVisitor size; | 238 GlyphSizeVisitor size; |
239 sourceAlphabet.GetAlphabet().Apply(size); | 239 sourceAlphabet.GetAlphabet().Apply(size); |
240 | 240 |
241 TextureGenerator generator(alphabet_, | 241 TextureGenerator generator(alphabet_, |
242 sourceAlphabet.GetAlphabet().GetSize(), | 242 static_cast<unsigned int>(sourceAlphabet.GetAlphabet().GetSize()), |
243 size.GetMaxWidth(), | 243 size.GetMaxWidth(), |
244 size.GetMaxHeight()); | 244 size.GetMaxHeight()); |
245 sourceAlphabet.GetAlphabet().Apply(generator); | 245 sourceAlphabet.GetAlphabet().Apply(generator); |
246 | 246 |
247 texture_.reset(generator.ReleaseTexture()); | 247 texture_.reset(generator.ReleaseTexture()); |
248 textureWidth_ = texture_->GetWidth(); | 248 textureWidth_ = texture_->GetWidth(); |
249 textureHeight_ = texture_->GetHeight(); | 249 textureHeight_ = texture_->GetHeight(); |