+
+void Change::paintCue(PainterInfo & pi, double const x1, double const y,
+ double const x2, FontInfo const & font) const
+{
+ if (!changed() || (!lyxrc.ct_additions_underlined && inserted()))
+ return;
+ // Calculate 1/3 height of font
+ FontMetrics const & fm = theFontMetrics(font);
+ double const y_bar = deleted() ? y - fm.maxAscent() / 3
+ : y + 2 * pi.base.solidLineOffset() + pi.base.solidLineThickness();
+ pi.pain.line(int(x1), int(y_bar), int(x2), int(y_bar), color(),
+ Painter::line_solid, pi.base.solidLineThickness());
+}
+
+
+void Change::paintCue(PainterInfo & pi, double const x1, double const y1,
+ double const x2, double const y2) const
+{
+ /*
+ * y1 /
+ * /
+ * /
+ * /
+ * /
+ * y2 /_____
+ * x1 x2
+ */
+ switch(type) {
+ case UNCHANGED:
+ return;
+ case INSERTED: {
+ if (!lyxrc.ct_additions_underlined)
+ return;
+ pi.pain.line(int(x1), int(y2) + 1, int(x2), int(y2) + 1,
+ color(), Painter::line_solid,
+ pi.base.solidLineThickness());
+ return;
+ }
+ case DELETED:
+ // FIXME: we cannot use antialias since we keep drawing on the same
+ // background with the current painting mechanism.
+ pi.pain.line(int(x1), int(y2), int(x2), int(y1),
+ color(), Painter::line_solid_aliased,
+ pi.base.solidLineThickness());
+ return;
+ }
+}
+
+