QBitmap problems

Peter Kümmel syntheticpp at gmx.net
Mon Jan 24 16:34:35 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. 
Your code behaves like the self masking code of trolltech, so it could
be used for that case. The code is wrong in just drawing pixmaps as the
upper left flag in your example shows.
>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!
> 
> The problem appears to be in QPixmap.setMask rather than
> QPainter.drawPixmap.
> 
That's maybe more easy.
Peter


More information about the kde-cygwin mailing list