if(obj->m_StyleInfo->m_fg_valid)
{
- int red, green, blue;
+ unsigned char red, green, blue;
ReadString(tmp, istr);
tmp.ToLong(&l);
- red = (int) l;
+ red = (unsigned char) l;
ReadString(tmp, istr);
tmp.ToLong(&l);
- green = (int) l;
+ green = (unsigned char) l;
ReadString(tmp, istr);
tmp.ToLong(&l);
- blue = (int) l;
+ blue = (unsigned char) l;
obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
}
if(obj->m_StyleInfo->m_bg_valid)
{
- int red, green, blue;
+ unsigned char red, green, blue;
ReadString(tmp, istr);
tmp.ToLong(&l);
- red = (int) l;
+ red = (unsigned char) l;
ReadString(tmp, istr);
tmp.ToLong(&l);
- green = (int) l;
+ green = (unsigned char) l;
ReadString(tmp, istr);
tmp.ToLong(&l);
- blue = (int) l;
+ blue = (unsigned char) l;
obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
}
pos.y += m_BaseLine;
- CoordType xpos = 0; // cursorpos, lenght of line
+ CoordType xpos = 0; // cursorpos, length of line
CoordType from, to;
int underline, wxChar const *fg, wxChar const *bg)
{
- wxColour
- *cfg = NULL,
- *cbg = NULL;
+ wxColour cfg = wxTheColourDatabase->Find((fg)?fg:wxT("BLACK"));
+ wxColour cbg = wxTheColourDatabase->Find((bg)?bg:wxT("WHITE"));
- if( fg )
- cfg = wxTheColourDatabase->FindColour(fg);
- if( bg )
- cbg = wxTheColourDatabase->FindColour(bg);
-
- SetFont(family,size,style,weight,underline,cfg,cbg);
+ SetFont(family,size,style,weight,underline,&cfg,&cbg);
}
void
}
/*
- Stupid wxWindows doesn't draw proper ellipses, so we comment this
+ Stupid wxWidgets doesn't draw proper ellipses, so we comment this
out. It's a waste of paper anyway.
*/
#if 0