diff --git a/include/wx/dc.h b/include/wx/dc.h index dbe62c4d95..da5bc5fde0 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -446,7 +446,7 @@ public: wxCoord *width, wxCoord *height, wxCoord *heightLine = NULL, - wxFont *font = NULL); + wxFont *font = NULL) const; // Measure cumulative width of text after each character bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 52359ee586..4df3396d2c 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -471,7 +471,7 @@ void wxDCBase::GetMultiLineTextExtent(const wxString& text, wxCoord *x, wxCoord *y, wxCoord *h, - wxFont *font) + wxFont *font) const { wxCoord widthTextMax = 0, widthLine, heightTextTotal = 0, heightLineDefault = 0, heightLine = 0;