Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.9.3
-
None
Description
The RoundJoin flag works incorrectly according to cairo library and SVG spec.
The problem is that RoundJoin should not join closed segments.
This also affects SVG rendering.
Example:
#include <QApplication> #include <QPainter> int main(int argc, char *argv[]) { QApplication a(argc, argv); QImage img(128, 128, QImage::Format_ARGB32_Premultiplied); img.fill(Qt::transparent); QPainterPath path; path.moveTo(100, 20); path.lineTo(100, 80); path.lineTo(20, 50); path.lineTo(100, 20); // back to start without ClosePath QPen pen(QColor("#39D"), 15); pen.setJoinStyle(Qt::RoundJoin); QPainter p; p.begin(&img); p.setRenderHint(QPainter::Antialiasing); p.setPen(pen); p.drawPath(path); p.end(); img.save("test.png"); return 0; }