diff options
Diffstat (limited to 'libs/canvas/text.cc')
-rw-r--r-- | libs/canvas/text.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/canvas/text.cc b/libs/canvas/text.cc index 3b309e51df..fb38423dec 100644 --- a/libs/canvas/text.cc +++ b/libs/canvas/text.cc @@ -84,6 +84,24 @@ Text::set (string const & text) end_change (); } +double +Text::width () const +{ + if (_need_redraw) { + _redraw (); + } + return _width; +} + +double +Text::height () const +{ + if (_need_redraw) { + _redraw (); + } + return _height; +} + void Text::_redraw () const { |