Utility/*TextDrawer: Fix bounds starting at a negative position
Former-commit-id: 4954d0f3d1b10d4b7512c7b57936bc73c7ea69ae
This commit is contained in:
parent
f941a751b5
commit
0bd8904878
|
|
@ -77,7 +77,7 @@ namespace Nz
|
||||||
mutable std::vector<VertexStruct_XY_Color_UV> m_localVertices;
|
mutable std::vector<VertexStruct_XY_Color_UV> m_localVertices;
|
||||||
Color m_color;
|
Color m_color;
|
||||||
MaterialRef m_material;
|
MaterialRef m_material;
|
||||||
Rectui m_localBounds;
|
Recti m_localBounds;
|
||||||
mutable bool m_verticesUpdated;
|
mutable bool m_verticesUpdated;
|
||||||
float m_scale;
|
float m_scale;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace Nz
|
||||||
AbstractTextDrawer() = default;
|
AbstractTextDrawer() = default;
|
||||||
virtual ~AbstractTextDrawer();
|
virtual ~AbstractTextDrawer();
|
||||||
|
|
||||||
virtual const Rectui& GetBounds() const = 0;
|
virtual const Recti& GetBounds() const = 0;
|
||||||
virtual Font* GetFont(unsigned int index) const = 0;
|
virtual Font* GetFont(unsigned int index) const = 0;
|
||||||
virtual unsigned int GetFontCount() const = 0;
|
virtual unsigned int GetFontCount() const = 0;
|
||||||
virtual const Glyph& GetGlyph(unsigned int index) const = 0;
|
virtual const Glyph& GetGlyph(unsigned int index) const = 0;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace Nz
|
||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
const Rectui& GetBounds() const override;
|
const Recti& GetBounds() const override;
|
||||||
unsigned int GetCharacterSize() const;
|
unsigned int GetCharacterSize() const;
|
||||||
const Color& GetColor() const;
|
const Color& GetColor() const;
|
||||||
Font* GetFont() const;
|
Font* GetFont() const;
|
||||||
|
|
@ -71,7 +71,7 @@ namespace Nz
|
||||||
Color m_color;
|
Color m_color;
|
||||||
FontRef m_font;
|
FontRef m_font;
|
||||||
mutable Rectf m_workingBounds;
|
mutable Rectf m_workingBounds;
|
||||||
mutable Rectui m_bounds;
|
mutable Recti m_bounds;
|
||||||
String m_text;
|
String m_text;
|
||||||
mutable UInt32 m_previousCharacter;
|
mutable UInt32 m_previousCharacter;
|
||||||
UInt32 m_style;
|
UInt32 m_style;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace Nz
|
||||||
ClearGlyphs();
|
ClearGlyphs();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Rectui& SimpleTextDrawer::GetBounds() const
|
const Recti& SimpleTextDrawer::GetBounds() const
|
||||||
{
|
{
|
||||||
if (!m_glyphUpdated)
|
if (!m_glyphUpdated)
|
||||||
UpdateGlyphs();
|
UpdateGlyphs();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue