Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
4.5.1, 4.7.2, 4.8.4
-
None
-
Reproduced with Qt 4.8.4 on Win7, MacOS 10.7 and Debian 6.
Description
When using QTextObjectInterface and has a drawObject method overload like this:
void MyImageHandler::drawObject(QPainter *painter, const QRectF &rect,
QTextDocument *doc, int posInDocument,
const QTextFormat &format)
{
QBrush br(Qt::red, Qt::FDiagPattern);
painter->fillRect(rect, br);
}
the fill pattern is scaled wrongly when printing to higher resolutions.
In particular, the distance between the pattern lines is too small. The higher the resolution, the closer the lines. On 600 dpi printers the patterns appear solid.
I attached patched versions of textedit.cpp and textedit.h of your TextEdit demo application. If you replace the original file by these you should be able to see the issue when you perform print or a print preview.
I also attached screenshots from the patched demo app. One from the editor itself (looks fine), one from the print preview (looks weird) and one from an exported pdf (looks solid).
The exported pdf is also attached. Note: If you heavily zoom into the pdf the diagonal pattern lines re-appear.
Attachments
Issue Links
- is required for
-
QTBUG-37693 QtPrintSupport - Painting Issues
- Open
-
QTBUG-37713 QtPrintSupport - 5.3 issues
- Open