Patch to properly bitBlt() masked pixmaps
Chris January
chris at atomice.net
Wed Dec 15 10:14:06 CET 2004
Do you mind sending a unified patch instead (diff -u)? They are easier to
apply and less sensitive to other changes in the code. Also please include
an indication of which file the patch is against (I assume qpainter_win.cpp
in this case?)
Thanks,
Chris
> Below is a patch that reverts an incorrect fix I submitted
> through the bug tracker last month in regards to improper
> masked bitBlt()'s and then fixes it in the correct manner. My
> first patch, in error, ignored the Qt::RasterOp passed to bitBlt().
>
> Explanation:
> The original call to CreateCompatibleBitmap() was on the
> newly created in-memory temporary DC (hTmpDC) and as such
> always returns the 1x1 monochrome bitmap that is by default
> selected into it.
> CreateCompatibleBitmap() should be called on the original device
> (dsthandle) instead.
>
> Sorry about the previous error.
>
> Ryan
>
> 921c921,927
> < BitBlt( dsthandle, dx, dy, sw, sh, srchandle, sx,
> sy, SRCINVERT );
> ---
> > HDC hTmpDC = CreateCompatibleDC( dsthandle );
> > HBITMAP hTmpBmp = CreateCompatibleBitmap(
> dsthandle, sw, sh );
> >
> > HBITMAP hOldBmp1 = ( HBITMAP ) SelectObject(
> hTmpDC, hTmpBmp );
> > BitBlt( hTmpDC, 0, 0, sw, sh, srchandle, sx, sy, ropCodes[
> rop ] );
> >
> > BitBlt( dsthandle, dx, dy, sw, sh, hTmpDC, 0, 0,
> SRCINVERT );
> 923c929,933
> < BitBlt( dsthandle, dx, dy, sw, sh, srchandle, sx,
> sy, SRCINVERT );
> ---
> > BitBlt( dsthandle, dx, dy, sw, sh, hTmpDC, 0, 0,
> SRCINVERT );
> >
> > SelectObject( hTmpDC, hOldBmp1 );
> > DeleteObject( hTmpBmp );
> > DeleteDC( hTmpDC );
>
>
> _______________________________________________
> kde-cygwin mailing list
> kde-cygwin at kde.org
> https://mail.kde.org/mailman/listinfo/kde-cygwin
>
More information about the kde-cygwin
mailing list