RichText: Add support for outline color/thickness
This commit is contained in:
@@ -29,10 +29,14 @@ namespace Ndk
|
||||
inline unsigned int GetCharacterSize() const;
|
||||
inline const Nz::Color& GetTextColor() const;
|
||||
inline Nz::Font* GetTextFont() const;
|
||||
inline const Nz::Color& GetTextOutlineColor() const;
|
||||
inline float GetTextOutlineThickness() const;
|
||||
|
||||
inline void SetCharacterSize(unsigned int characterSize);
|
||||
inline void SetTextColor(const Nz::Color& color);
|
||||
inline void SetTextFont(Nz::FontRef font);
|
||||
inline void SetTextOutlineColor(const Nz::Color& color);
|
||||
inline void SetTextOutlineThickness(float thickness);
|
||||
|
||||
void Write(const Nz::String& text, std::size_t glyphPosition) override;
|
||||
|
||||
|
||||
@@ -21,6 +21,16 @@ namespace Ndk
|
||||
return m_drawer.GetDefaultFont();
|
||||
}
|
||||
|
||||
inline const Nz::Color& RichTextAreaWidget::GetTextOutlineColor() const
|
||||
{
|
||||
return m_drawer.GetDefaultOutlineColor();
|
||||
}
|
||||
|
||||
inline float RichTextAreaWidget::GetTextOutlineThickness() const
|
||||
{
|
||||
return m_drawer.GetDefaultOutlineThickness();
|
||||
}
|
||||
|
||||
inline void RichTextAreaWidget::SetCharacterSize(unsigned int characterSize)
|
||||
{
|
||||
m_drawer.SetDefaultCharacterSize(characterSize);
|
||||
@@ -35,4 +45,14 @@ namespace Ndk
|
||||
{
|
||||
m_drawer.SetDefaultFont(std::move(font));
|
||||
}
|
||||
|
||||
inline void RichTextAreaWidget::SetTextOutlineColor(const Nz::Color& color)
|
||||
{
|
||||
m_drawer.SetDefaultOutlineColor(color);
|
||||
}
|
||||
|
||||
inline void RichTextAreaWidget::SetTextOutlineThickness(float thickness)
|
||||
{
|
||||
m_drawer.SetDefaultOutlineThickness(thickness);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user