Get/SetNoAntiAliasing implemented

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2003-01-17 10:24:59 +00:00
parent 24174c30e0
commit ac17f9b104
3 changed files with 37 additions and 0 deletions

View File

@ -81,6 +81,9 @@ public:
}
virtual ~wxFontRefData();
void SetNoAntiAliasing( bool no = TRUE ) { m_noAA = no; }
bool GetNoAntiAliasing() { return m_noAA; }
protected:
// common part of all ctors
void Init(int size,
@ -100,6 +103,7 @@ protected:
bool m_underlined;
wxString m_faceName;
wxFontEncoding m_encoding;
bool m_noAA; // No anti-aliasing
public:
short m_macFontNum;
@ -184,6 +188,9 @@ public:
virtual bool RealizeResource();
// Unofficial API, don't use
virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
virtual bool GetNoAntiAliasing() ;
protected:
// common part of all ctors
void Init();

View File

@ -58,6 +58,7 @@ void wxFontRefData::Init(int pointSize,
m_macFontSize = 0;
m_macFontStyle = 0;
m_fontId = 0;
m_noAA = FALSE;
}
wxFontRefData::~wxFontRefData()
@ -258,6 +259,15 @@ void wxFont::SetUnderlined(bool underlined)
RealizeResource();
}
void wxFont::SetNoAntiAliasing( bool no )
{
Unshare();
M_FONTDATA->SetNoAntiAliasing( no );
RealizeResource();
}
// ----------------------------------------------------------------------------
// accessors
// ----------------------------------------------------------------------------
@ -300,3 +310,8 @@ wxFontEncoding wxFont::GetEncoding() const
return M_FONTDATA->m_encoding;
}
bool wxFont::GetNoAntiAliasing()
{
return M_FONTDATA->m_noAA;
}

View File

@ -58,6 +58,7 @@ void wxFontRefData::Init(int pointSize,
m_macFontSize = 0;
m_macFontStyle = 0;
m_fontId = 0;
m_noAA = FALSE;
}
wxFontRefData::~wxFontRefData()
@ -258,6 +259,15 @@ void wxFont::SetUnderlined(bool underlined)
RealizeResource();
}
void wxFont::SetNoAntiAliasing( bool no )
{
Unshare();
M_FONTDATA->SetNoAntiAliasing( no );
RealizeResource();
}
// ----------------------------------------------------------------------------
// accessors
// ----------------------------------------------------------------------------
@ -300,3 +310,8 @@ wxFontEncoding wxFont::GetEncoding() const
return M_FONTDATA->m_encoding;
}
bool wxFont::GetNoAntiAliasing()
{
return M_FONTDATA->m_noAA;
}