- int w = font.textWidth("x", 1);
- int ox = font.textWidth(" ", 1) + int(x);
- int h = font.ascent('x');
- XPoint p[4];
- p[0].x = ox; p[0].y = baseline;
- p[1].x = ox; p[1].y = baseline - h;
- p[2].x = ox + w;p[2].y = baseline - h/2;
- p[3].x = ox; p[3].y = baseline;
- scr.drawLines(getGC(gc_copy), p, 4);
-#endif
- x += width(pain, font);
- }
- }
-}
-#else
-void InsetSpecialChar::Draw(LyXFont font, LyXScreen & scr,
- int baseline, float & x)
-{
- switch (kind) {
- case HYPHENATION:
- {
- font.setColor(LyXFont::BLUE);
- scr.drawText(font, "-", 1, baseline, int(x));
- x += Width(font);
- break;
- }
- case END_OF_SENTENCE:
- {
- font.setColor(LyXFont::BLUE);
- scr.drawText(font, ".", 1, baseline, int(x));
- x += Width(font);
+ int w = lyxfont::width('x', font);
+ int ox = lyxfont::width(' ', font) + int(x);
+ int h = lyxfont::ascent('x', font);
+ int xp[4], yp[4];
+
+ xp[0] = ox; yp[0] = baseline;
+ xp[1] = ox; yp[1] = baseline - h;
+ xp[2] = ox + w; yp[2] = baseline - h/2;
+ xp[3] = ox; yp[3] = baseline;
+
+ pain.lines(xp, yp, 4, LColor::special);
+ x += width(bv, font);