add DefaultStrokeColor for fonts to turn a Font's stroke layer off by default

This commit is contained in:
Chris Danford
2008-03-28 09:33:50 +00:00
parent af4170d632
commit 3934e123e2
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -134,6 +134,8 @@ bool BitmapText::LoadFromFont( const RString& sFontFilePath )
m_pFont = FONT->LoadFont( sFontFilePath );
this->SetStrokeColor( m_pFont->GetDefaultStrokeColor() );
BuildChars();
return true;
+4
View File
@@ -229,6 +229,7 @@ Font::Font()
m_pDefault = NULL;
m_bRightToLeft = false;
m_fFontBaseZoom = 1;
m_DefaultStrokeColor = RageColor(1,1,1,1);
}
Font::~Font()
@@ -691,6 +692,9 @@ void Font::Load( const RString &sIniPath, RString sChars )
ini.GetValue( "main", "CapitalsOnly", bCapitalsOnly );
ini.GetValue( "main", "RightToLeft", m_bRightToLeft );
ini.GetValue( "main", "FontBaseZoom", m_fFontBaseZoom );
RString s;
if( ini.GetValue( "main", "DefaultStrokeColor", s ) )
m_DefaultStrokeColor.FromString( s );
}
{
+2
View File
@@ -148,6 +148,7 @@ public:
bool IsRightToLeft() const { return m_bRightToLeft; };
float GetFontBaseZoom() const { return m_fFontBaseZoom; };
const RageColor &GetDefaultStrokeColor() const { return m_DefaultStrokeColor; };
private:
/* List of pages and fonts that we use (and are responsible for freeing). */
@@ -167,6 +168,7 @@ private:
bool m_bRightToLeft;
float m_fFontBaseZoom;
RageColor m_DefaultStrokeColor;
/* We keep this around only for reloading. */
RString m_sChars;