Fixed Font::[Get|Set]Atlas interface
Former-commit-id: 7670317dc2684fc0f9240a1f188e4ba92592a263
This commit is contained in:
@@ -132,7 +132,7 @@ void NzTextSprite::SetText(const NzAbstractTextDrawer& drawer)
|
||||
unsigned int fontCount = drawer.GetFontCount();
|
||||
for (unsigned int i = 0; i < fontCount; ++i)
|
||||
{
|
||||
const NzAbstractAtlas* atlas = drawer.GetFont(i)->GetAtlas();
|
||||
const NzAbstractAtlas* atlas = drawer.GetFont(i)->GetAtlas().get();
|
||||
if (m_atlases.insert(atlas).second)
|
||||
atlas->AddListener(this);
|
||||
}
|
||||
|
||||
@@ -104,9 +104,9 @@ bool NzFont::ExtractGlyph(unsigned int characterSize, char32_t character, nzUInt
|
||||
return m_data->ExtractGlyph(characterSize, character, style, glyph);
|
||||
}
|
||||
|
||||
const NzAbstractAtlas* NzFont::GetAtlas() const
|
||||
const std::shared_ptr<NzAbstractAtlas>& NzFont::GetAtlas() const
|
||||
{
|
||||
return m_atlas.get();
|
||||
return m_atlas;
|
||||
}
|
||||
|
||||
unsigned int NzFont::GetCachedGlyphCount(unsigned int characterSize, nzUInt32 style) const
|
||||
@@ -277,7 +277,7 @@ bool NzFont::OpenFromStream(NzInputStream& stream, const NzFontParams& params)
|
||||
return NzFontLoader::LoadFromStream(this, stream, params);
|
||||
}
|
||||
|
||||
void NzFont::SetAtlas(std::shared_ptr<NzAbstractAtlas> atlas)
|
||||
void NzFont::SetAtlas(const std::shared_ptr<NzAbstractAtlas>& atlas)
|
||||
{
|
||||
if (m_atlas != atlas)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user