13
0

add Canvas::Ruler::set_metric() to allow ruler metrics to be changed dynamically

This commit is contained in:
Paul Davis 2014-09-05 14:45:27 -04:00
parent 1a6136e1e3
commit 94adde7ebb
2 changed files with 9 additions and 0 deletions

View File

@ -62,6 +62,7 @@ public:
void set_range (double lower, double upper);
void set_font_description (Pango::FontDescription);
void set_metric (const Metric&);
void render (Rect const & area, Cairo::RefPtr<Cairo::Context>) const;

View File

@ -180,3 +180,11 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
/* done! */
}
void
Ruler::set_metric (const Metric& m)
{
_metric = &m;
_need_marks = true;
redraw ();
}