diff --git a/include/ccanvas.h b/include/ccanvas.h index b36010e..66bca5b 100644 --- a/include/ccanvas.h +++ b/include/ccanvas.h @@ -84,6 +84,8 @@ class CCanvas:public CObject void SetFgColor (lxString color); void SetFgColor (uint r, uint g, uint b); void SetFont (wxFont font); + void SetFontSize (const int pointsize); + void SetFontWeight (const int weight); wxColor GetFgColor (void); /** * Set Background Color by wxColor. diff --git a/lib/ccanvas.cc b/lib/ccanvas.cc index 3edb347..8dad4ec 100644 --- a/lib/ccanvas.cc +++ b/lib/ccanvas.cc @@ -607,7 +607,19 @@ void CCanvas::SetFont(wxFont font) { Font = font; - if (DC != NULL)DC->SetFont (font); + if (DC != NULL)DC->SetFont (Font); +} + +void +CCanvas::SetFontSize (const int pointsize){ + Font.SetPointSize(pointsize); + if (DC != NULL)DC->SetFont (Font); +} + +void +CCanvas::SetFontWeight (const int weight){ + Font.SetWeight((wxFontWeight)weight); + if (DC != NULL)DC->SetFont (Font); } void