merge onecanvas and cairocanvas branches, and manually resolve conflicts, including rounding in item_to_window() methods
This commit is contained in:
parent
e0533e9dd7
commit
8fa81c1436
|
@ -1,4 +1,4 @@
|
|||
*
|
||||
/*
|
||||
Copyright (C) 2009 Paul Davis
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue