provide ArdourCanvas::Text::{width,height}()
This commit is contained in:
parent
78d02eb620
commit
81f2ed452b
@ -47,6 +47,9 @@ public:
|
|||||||
|
|
||||||
void clamp_width (double);
|
void clamp_width (double);
|
||||||
|
|
||||||
|
double width() const;
|
||||||
|
double height() const;
|
||||||
|
|
||||||
void set_size_chars (int nchars);
|
void set_size_chars (int nchars);
|
||||||
void dump (std::ostream&) const;
|
void dump (std::ostream&) const;
|
||||||
|
|
||||||
|
@ -84,6 +84,24 @@ Text::set (string const & text)
|
|||||||
end_change ();
|
end_change ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double
|
||||||
|
Text::width () const
|
||||||
|
{
|
||||||
|
if (_need_redraw) {
|
||||||
|
_redraw ();
|
||||||
|
}
|
||||||
|
return _width;
|
||||||
|
}
|
||||||
|
|
||||||
|
double
|
||||||
|
Text::height () const
|
||||||
|
{
|
||||||
|
if (_need_redraw) {
|
||||||
|
_redraw ();
|
||||||
|
}
|
||||||
|
return _height;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Text::_redraw () const
|
Text::_redraw () const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user