merge onecanvas and cairocanvas branches, and manually resolve conflicts, including rounding in item_to_window() methods

This commit is contained in:
Paul Davis 2014-06-03 16:37:53 -04:00
parent e0533e9dd7
commit 8fa81c1436
3 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
*
/*
Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify

View File

@ -148,6 +148,11 @@ public:
void canvas_to_item (Coord &, Coord &) const;
void item_to_canvas (Coord &, Coord &) const;
Duple canvas_to_item (Duple const&) const;
Rect item_to_canvas (Rect const&) const;
Duple item_to_canvas (Duple const&) const;
Rect canvas_to_item (Rect const&) const;
Duple item_to_window (Duple const&, bool rounded = true) const;
Duple window_to_item (Duple const&) const;
Rect item_to_window (Rect const&) const;

View File

@ -173,8 +173,10 @@ Item::item_to_window (ArdourCanvas::Duple const & d, bool rounded) const
{
Duple ret = item_to_canvas (d).translate (-scroll_offset());
ret.x = round (ret.x);
ret.y = round (ret.y);
if (rounded) {
ret.x = round (ret.x);
ret.y = round (ret.y);
}
return ret;
}