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;
Attachments
For Gerrit Dashboard: QTBUG-86094 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
373384,2 | PDF generation: disentangle native pen from transforms | dev | qt/qtbase | Status: MERGED | +2 | 0 |
373396,2 | Avoid generating large pdf files when using dashed cosmetic pens | dev | qt/qtbase | Status: MERGED | +2 | 0 |
374088,2 | PDF generation: disentangle native pen from transforms | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
374089,2 | Avoid generating large pdf files when using dashed cosmetic pens | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
374091,3 | PDF generation: disentangle native pen from transforms | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
374092,3 | Avoid generating large pdf files when using dashed cosmetic pens | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |