- _line->set (Duple (0, 0), Duple (0, _height));
+ _line->set (Duple (0, 0), Duple (0, h));
+
+ if (_invert) {
+ boost::optional<Rect> bbox = _text->bounding_box ();
+ if (bbox) {
+ Duple flag_size (bbox.get().width() + 10, bbox.get().height() + 4);
+ _rectangle->set (Rect (0, h - flag_size.y, flag_size.x, h));
+ _text->set_position (Duple (5, h - flag_size.y + 2));
+ }
+ }
+}
+
+bool
+Flag::covers (Duple const & point) const
+{
+ if (_rectangle) {
+ return _rectangle->covers (point);
+ }
+
+ return false;