QBitmap problems
Peter Kümmel
syntheticpp at gmx.net
Tue Jan 25 21:48:00 CET 2005
Chris January wrote:
> Upon further investigation, my original code for drawing Qbitmap's seems to
> be more or less ok. There should be no need for a special case for
> self-masking as this is handled by the existing code. Peter commented that
> the test case I posted gave different results if you made the static
> QBitmap's non-static. It seems that setting a mask for a QBitmap alters the
> original QBitmap in some way. For example the following code:
>
> Qbitmap copy = bm;
> copy.setMask (somemask);
> copy.setMask (QBitmap ());
> painter.drawPixmap (QPoint (x, y), copy);
>
> should behave the same as:
>
> Qbitmap copy = bm;
> painter.drawPixmap (QPoint (x, y), copy);
>
> but at present it doesn't!
now it does!
>
> The problem appears to be in QPixmap.setMask rather than
> QPainter.drawPixmap.
The problem was detach() which uses the faulty init function.
Attached are screen shots of the disabled buttons and the Union Check example.
The solution is still not 100% (asymmetric disabled tool bar button and some
differences in the colors of the flag) but the main part is hopefully solved.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disabled_buttons_winFree.png
Type: image/png
Size: 8937 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-cygwin/attachments/20050125/9c7de271/disabled_buttons_winFree.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: union_check_winFree.png
Type: image/png
Size: 6920 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-cygwin/attachments/20050125/9c7de271/union_check_winFree.png
More information about the kde-cygwin
mailing list