i have to draw outlined striked out text on QImage like that:
I do it as follows:
QPainter painter(this);
QPainterPath path;
QFont font;
font.setPixelSize(95);
font.setStrikeOut(true);
font.setBold(true);
path.addText(10, 150, font, "lololo");
painter.setPen(Qt::blue);
painter.setBrush(Qt::red);
painter.drawPath(path);
and get this result:
As one can see the striking out line has zebra-like fill. How i can fill it completely with painter's brush?
I tried to change QPainter composition mode with no success. Also i tried to use QPainterPathStroker with the same result.
Sure i can draw striked out text with ordinary font (not striked out) plus rectangle, but it isn't a beautiful solution.
The solution is to perform operations between 2 paths with and without strike: