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