diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 13:46:02 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:32 -0500 |
commit | 81f2ed452b59cf6a45c7c32ab8b365a20f1a7e9a (patch) | |
tree | d45ad777828fe39ae30da0ce9a8d8b47610819f0 /libs/canvas/text.cc | |
parent | 78d02eb620e4f59ed296d2a891fdcc897b5c3b07 (diff) |
provide ArdourCanvas::Text::{width,height}()
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 { |