Replaced Ok() occurrences with IsOk() throughout trunk.
Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk(). Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -127,49 +127,49 @@ void wxColour::InitRGBA(unsigned char red, unsigned char green, unsigned char bl
|
||||
|
||||
unsigned char wxColour::Red() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid colour") );
|
||||
|
||||
return wxByte(M_COLDATA->m_red >> SHIFT);
|
||||
}
|
||||
|
||||
unsigned char wxColour::Green() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid colour") );
|
||||
|
||||
return wxByte(M_COLDATA->m_green >> SHIFT);
|
||||
}
|
||||
|
||||
unsigned char wxColour::Blue() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid colour") );
|
||||
|
||||
return wxByte(M_COLDATA->m_blue >> SHIFT);
|
||||
}
|
||||
|
||||
unsigned char wxColour::Alpha() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid colour") );
|
||||
|
||||
return M_COLDATA->m_alpha;
|
||||
}
|
||||
|
||||
void wxColour::CalcPixel( GdkColormap *cmap )
|
||||
{
|
||||
if (!Ok()) return;
|
||||
if (!IsOk()) return;
|
||||
|
||||
M_COLDATA->AllocColour( cmap );
|
||||
}
|
||||
|
||||
int wxColour::GetPixel() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), 0, wxT("invalid colour") );
|
||||
wxCHECK_MSG( IsOk(), 0, wxT("invalid colour") );
|
||||
|
||||
return M_COLDATA->m_color.pixel;
|
||||
}
|
||||
|
||||
const GdkColor *wxColour::GetColor() const
|
||||
{
|
||||
wxCHECK_MSG( Ok(), NULL, wxT("invalid colour") );
|
||||
wxCHECK_MSG( IsOk(), NULL, wxT("invalid colour") );
|
||||
|
||||
return &M_COLDATA->m_color;
|
||||
}
|
||||
|
Reference in New Issue
Block a user