Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.14.0
-
None
-
-
533f7d7ca328e81804c8f52818f9d39172694f94 (qt/qtbase/5.15)
Description
#include <QGuiApplication> #include <QPainter> int main(int argc, char *argv[]) { QGuiApplication a(argc, argv); QImage img(200, 200, QImage::Format_RGB32); img.fill(Qt::white); QPainter p(&img); { QPainterPath path; path.moveTo(100.0, 30.0); path.lineTo(100.0, 80.0); QPen pen(Qt::red, 5); pen.setDashPattern({ 3, 3 }); p.setPen(pen); p.drawPath(path); } { QPainterPath path; path.moveTo(20.0, 20.0); path.lineTo(160.0, 20.0); // This subpath's dash patter offset is incorrect. path.moveTo(100.0, 30.0); path.lineTo(100.0, 80.0); QPen pen(Qt::green, 5); pen.setDashPattern({ 3, 3 }); p.setPen(pen); p.drawPath(path); } p.end(); img.save("test.png"); return 0; }
This mainly affect the SVG rendering, so I've added a comparison with other SVG rendering applications (the input SVG is a bit different, but the idea is the same).
Attachments
For Gerrit Dashboard: QTBUG-83048 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
295339,2 | Raster painting: fix dashing for separate lines | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |