Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, August 2006
drawPixmap() gives extra black lines


Message 1 in thread

Dear List,

I'm creating a math display widget and I occasionally use drawPixmap() to
make math glyphs, as in the attached example .PNGs.  It works fine, except
that when I do grabWidget() on my math display widget, the drawn pixmaps
seem to have an off-by-1 error, and thus have extra black lines around them.
A few specifics:

1. This only happens on WinXP.  On Mac, it looks fine.
2. The specific call I'm making is to
    http://doc.trolltech.com/4.1/qpainter.html#drawPixmap-8
3. The difference is between the widget painting on screen (which happens
fine) and an invisible widget painting via grabWidget() offscreen.
4. I have passed QPainter::SmoothPixmapTransform to
    http://doc.trolltech.com/4.1/qpainter.html#setRenderHint

Has anyone run into this discrepancy?  I suppose it could be this
http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=1
10121
but I cannot tell based on the minimal information there, which mentions
nothing about Mac vs. Win, nor about the specific problems.

Nathan

PS: The discrepancy I'm talking about is not the dotted-line boxes.  The
blank expressions were filled in in the one picture and not the other,
that's how it's supposed to be.  I'm talking about the black lines to the
right of and below the integral sign glyph.

Attachment:

Attachment: math-ok.png
Description: Binary data

Attachment: math-not-ok.png
Description: Binary data