mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Painter::wavyHorizontalLine(): new method for inline spellcheck purpose.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28961 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b2e3355bf5
commit
dc1d8af9a2
@ -548,5 +548,24 @@ void GuiPainter::dashedUnderline(FontInfo const & f, int x, int y, int width)
|
|||||||
line(x, y + below + n, x + width, y + below + n, f.realColor(), line_onoffdash);
|
line(x, y + below + n, x + width, y + below + n, f.realColor(), line_onoffdash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiPainter::wavyHorizontalLine(int x, int y, int width, ColorCode col)
|
||||||
|
{
|
||||||
|
setQPainterPen(computeColor(col));
|
||||||
|
int const step = 4;
|
||||||
|
int const xend = x + width;
|
||||||
|
int height = 1;
|
||||||
|
//FIXME: I am not sure if Antialiasing gives the best effect.
|
||||||
|
//setRenderHint(Antialiasing, true);
|
||||||
|
while (x < xend) {
|
||||||
|
height = - height;
|
||||||
|
drawLine(x, y - height, x + step, y + height);
|
||||||
|
x += step;
|
||||||
|
drawLine(x, y + height, x + 2, y + height);
|
||||||
|
x += 2;
|
||||||
|
}
|
||||||
|
//setRenderHint(Antialiasing, false);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
@ -119,6 +119,8 @@ public:
|
|||||||
virtual int preeditText(int x, int y,
|
virtual int preeditText(int x, int y,
|
||||||
char_type c, FontInfo const & f, preedit_style style);
|
char_type c, FontInfo const & f, preedit_style style);
|
||||||
|
|
||||||
|
void wavyHorizontalLine(int x, int y, int width, ColorCode col);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// check the font, and if set, draw an underline
|
/// check the font, and if set, draw an underline
|
||||||
void underline(FontInfo const & f,
|
void underline(FontInfo const & f,
|
||||||
|
Loading…
Reference in New Issue
Block a user