diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-17 10:53:17 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-17 10:53:17 -0400 |
commit | d1a05240efc9816b4358cdeab458a54048abf9be (patch) | |
tree | fa45892d3971951ec5a51d6a0526271940cb6de3 /gtk2_ardour/tempo_lines.cc | |
parent | 96eee9e7a162e3e26dd9c1ea4d8fc1ad02a3dda9 (diff) |
fix clamping of line and rect coordinates to avoid issues with cairo when drawing way outside a surface's dimensions; move various coordinate methods down to Canvas, because they don't require GTK information; make visible_area() a Canvas virtual method so that we don't have to cast to call it
Diffstat (limited to 'gtk2_ardour/tempo_lines.cc')
-rw-r--r-- | gtk2_ardour/tempo_lines.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc index 282d8f62dd..dddb1ee426 100644 --- a/gtk2_ardour/tempo_lines.cc +++ b/gtk2_ardour/tempo_lines.cc @@ -27,8 +27,8 @@ using namespace std; #define MAX_CACHED_LINES 128 -TempoLines::TempoLines (ArdourCanvas::GtkCanvasViewport& canvas_viewport, ArdourCanvas::Group* group, double screen_height) - : _canvas_viewport (canvas_viewport) +TempoLines::TempoLines (ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group, double screen_height) + : _canvas (canvas) , _group(group) , _clean_left(DBL_MAX) , _clean_right(0.0) @@ -88,7 +88,7 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin, const size_t needed = distance (begin, end); - ArdourCanvas::Rect const visible = _canvas_viewport.visible_area (); + ArdourCanvas::Rect const visible = _canvas.visible_area (); /* get the first bar spacing */ |