-}
-
-wxColour::wxColour( unsigned char red, unsigned char green, unsigned char blue )
-{
- m_refData = new wxColourRefData();
- M_COLDATA->m_color.red = ((unsigned short)red) << SHIFT;
- M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT;
- M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT;
- M_COLDATA->m_color.pixel = 0;
-}
-
-void wxColour::InitFromName( const wxString &colourName )
-{
- wxNode *node = (wxNode *) NULL;
- if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
- {
- wxColour *col = (wxColour*)node->Data();
- UnRef();
- if (col) Ref( *col );
- }
- else
- {
- m_refData = new wxColourRefData();
- if (!gdk_color_parse( colourName, &M_COLDATA->m_color ))
- {
- wxFAIL_MSG( "wxColour: couldn't find colour" );
- delete m_refData;
- m_refData = (wxObjectRefData *) NULL;
- }
- }
-}
-
-wxColour::wxColour( const wxColour& col )
-{
- Ref( col );
-}
-
-wxColour::wxColour( const wxColour* col )
-{
- if (col) Ref( *col );
+ m_refData = new wxColourRefData(gdkColor.red, gdkColor.green, gdkColor.blue, 0xFFFF /*opaque alpha in 16 bit*/);