using namespace std;
using namespace ArdourCanvas;
-Rectangle::Rectangle (Group* parent)
+Rectangle::Rectangle (Canvas* c)
+ : Item (c)
+ , _outline_what ((What) (LEFT | RIGHT | TOP | BOTTOM))
+{
+}
+
+Rectangle::Rectangle (Canvas* c, Rect const & rect)
+ : Item (c)
+ , _rect (rect)
+ , _outline_what ((What) (LEFT | RIGHT | TOP | BOTTOM))
+{
+}
+
+Rectangle::Rectangle (Item* parent)
: Item (parent)
- , Outline (parent)
- , Fill (parent)
, _outline_what ((What) (LEFT | RIGHT | TOP | BOTTOM))
{
}
-Rectangle::Rectangle (Group* parent, Rect const & rect)
+Rectangle::Rectangle (Item* parent, Rect const & rect)
: Item (parent)
- , Outline (parent)
- , Fill (parent)
, _rect (rect)
, _outline_what ((What) (LEFT | RIGHT | TOP | BOTTOM))
{
-
}
void
if (_outline_what & RIGHT) {
/* vertical line: move x-coordinate by 0.5 pixels */
- context->move_to (self.x1 + 0.5, self.y0);
- context->line_to (self.x1 + 0.5, self.y1);
+ context->move_to (self.x1 - 0.5, self.y0);
+ context->line_to (self.x1 - 0.5, self.y1);
}
}