Summary: | [QT] clearRect fill's a given rect with white | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dirk Schulze <krit> | ||||||||
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | hausmann | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Dirk Schulze
2009-02-04 04:38:19 PST
Created attachment 27312 [details]
transparent background for context
see above
Dirk, thanks for tracking this down! I think an alternate and perhaps cleaner solution would be to set the composition mode to QPainter::CompositionMode_Clear. What do you think? I tried QPainter::CompositionMode_Clear first, but it doesn't fix the problem. I'm not sure why setBackground() works. It shouldn't http://doc.trolltech.com/4.4/qpainter.html#setBackground . And setting background mode manually to Qt::TransparentMode doens't work either. (In reply to comment #3) > I tried QPainter::CompositionMode_Clear first, but it doesn't fix the problem. > I'm not sure why setBackground() works. It shouldn't > http://doc.trolltech.com/4.4/qpainter.html#setBackground . And setting > background mode manually to Qt::TransparentMode doens't work either. > That's odd. What's the easiest way to test/verify this? I can try to take a look at this with our QPainter guys. Created attachment 27350 [details]
clearRect test
This shows the problem in Canvas. Hope that's what you wanted.
I had a chat with our QPainter guys and discussed your testcase. We can use CompositionMode_Clear, but then we have to call drawRect(rect); instead of eraseRect(). The fastest way however is to simply call fillRect(Qt::transparent). Both worked for me (_Clear with drawRect() and fillRect(Qt::transparent). Can you make a patch with fillRect(Qt::transparent)? I'll review it then :) Thanks again, Dirk! Created attachment 27400 [details]
Fix for clearRect
Fix for clearRect with another composite operator.
|