+void Ruler::draw_hover_mark(QPainter &p)
+{
+ const int x = _view.hover_point().x();
+ if(x == -1)
+ return;
+
+ p.setPen(QPen(Qt::NoPen));
+ p.setBrush(QBrush(QColor(Qt::black)));
+
+ const int b = height() - 1;
+ const QPointF points[] = {
+ QPointF(x, b),
+ QPointF(x - HoverArrowSize, b - HoverArrowSize),
+ QPointF(x + HoverArrowSize, b - HoverArrowSize)
+ };
+ p.drawPolygon(points, countof(points));
+}
+
+void Ruler::hover_point_changed()
+{
+ update();
+}
+