Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.9
-
None
-
-
6d41b64d45cda12370653300fdc2d2685c450014 (qt/qtbase/dev) 7befef2588be12137b7b82b2b82954b637c0fbef (qt/qtbase/6.2) c93c8e84a1aae1ef5762047fb1f3f84af8166b2c (qt/tqtc-qtbase/5.15)
Description
When Qt exports pdf with pen of zero width, the output file will be very large.
QPen (QBrush(Qt::black), 0, Qt::DashLine) file size: 1504k
QPen (QBrush(Qt::black), 1, Qt::DashLine) file size: 6k
QPdfWriter *writer = new QPdfWriter("c:/a.pdf"); QPainter *painter = new QPainter(writer); QPen pen(QBrush(Qt::black), 0, Qt::DashLine); painter->setPen(pen); for (int i = 0; i < 1000; i++) { painter->drawLine(100, i, 500, i); } delete painter; delete writer;