m_red =
m_blue =
m_green = 0;
- m_isInit = FALSE;
+ m_isInit = false;
+}
+
+wxColour::wxColour()
+{
+ Init();
}
wxColour::wxColour(const wxColour& col)
void wxColour::InitFromName(const wxString& name)
{
- wxColour *col = wxTheColourDatabase->Find(name);
- if ( col.Ok() )
+ if ( wxTheColourDatabase )
{
- *this = col;
- }
- else
- {
- Init();
+ wxColour col = wxTheColourDatabase->Find(name);
+ if ( col.Ok() )
+ {
+ *this = col;
+ return;
+ }
}
+
+ // leave invalid
+ Init();
}
wxColour::~wxColour()
m_red = r;
m_green = g;
m_blue = b;
- m_isInit = TRUE;
+ m_isInit = true;
}