Fix method hiding in Canvas::Text
This commit is contained in:
parent
2673ef4af4
commit
d9cb8a807e
|
@ -65,9 +65,9 @@ private:
|
||||||
mutable double _width_correction;
|
mutable double _width_correction;
|
||||||
double _clamped_width;
|
double _clamped_width;
|
||||||
|
|
||||||
void redraw (Cairo::RefPtr<Cairo::Context>) const;
|
void _redraw (Cairo::RefPtr<Cairo::Context>) const;
|
||||||
void redraw (Glib::RefPtr<Pango::Context>) const;
|
void _redraw (Glib::RefPtr<Pango::Context>) const;
|
||||||
void _redraw (Glib::RefPtr<Pango::Layout>) const;
|
void __redraw (Glib::RefPtr<Pango::Layout>) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ Text::set (string const & text)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Text::redraw (Cairo::RefPtr<Cairo::Context> context) const
|
Text::_redraw (Cairo::RefPtr<Cairo::Context> context) const
|
||||||
{
|
{
|
||||||
if (_text.empty()) {
|
if (_text.empty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -85,22 +85,22 @@ Text::redraw (Cairo::RefPtr<Cairo::Context> context) const
|
||||||
|
|
||||||
Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
|
Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
|
||||||
|
|
||||||
_redraw (layout);
|
__redraw (layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Text::redraw (Glib::RefPtr<Pango::Context> context) const
|
Text::_redraw (Glib::RefPtr<Pango::Context> context) const
|
||||||
{
|
{
|
||||||
if (_text.empty()) {
|
if (_text.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
|
Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
|
||||||
_redraw (layout);
|
__redraw (layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Text::_redraw (Glib::RefPtr<Pango::Layout> layout) const
|
Text::__redraw (Glib::RefPtr<Pango::Layout> layout) const
|
||||||
{
|
{
|
||||||
layout->set_text (_text);
|
layout->set_text (_text);
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_need_redraw) {
|
if (_need_redraw) {
|
||||||
redraw (context);
|
_redraw (context);
|
||||||
}
|
}
|
||||||
|
|
||||||
Rect intersection (i.get());
|
Rect intersection (i.get());
|
||||||
|
@ -189,7 +189,7 @@ Text::compute_bounding_box () const
|
||||||
if (_bounding_box_dirty) {
|
if (_bounding_box_dirty) {
|
||||||
if (_need_redraw || !_image) {
|
if (_need_redraw || !_image) {
|
||||||
Glib::RefPtr<Pango::Context> context = Glib::wrap (gdk_pango_context_get()); // context now owns C object and will free it
|
Glib::RefPtr<Pango::Context> context = Glib::wrap (gdk_pango_context_get()); // context now owns C object and will free it
|
||||||
redraw (context);
|
_redraw (context);
|
||||||
}
|
}
|
||||||
_bounding_box = Rect (0, 0, min (_clamped_width, (double) _image->get_width()), _image->get_height());
|
_bounding_box = Rect (0, 0, min (_clamped_width, (double) _image->get_width()), _image->get_height());
|
||||||
_bounding_box_dirty = false;
|
_bounding_box_dirty = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user