diff --git a/lcl/include/bitmap.inc b/lcl/include/bitmap.inc index 96621bcf43..6410edc8a5 100644 --- a/lcl/include/bitmap.inc +++ b/lcl/include/bitmap.inc @@ -1093,6 +1093,7 @@ begin ' NewMaskHandle=',HexStr(Cardinal(NewMaskHandle),8)); {$ENDIF} ReplaceBitmapMask(FImage.FHandle,FImage.FMaskHandle,NewMaskHandle); + FTransparent := FImage.FMaskHandle <> 0; {$IFDEF VerboseImgMasks} DebugLn('TBitmap.SetMaskHandle After Replace FImage.FHandle=',HexStr(Cardinal(FImage.FHandle),8), ' FImage.FMaskHandle=',HexStr(Cardinal(FImage.FMaskHandle),8), @@ -1246,6 +1247,9 @@ end; { ============================================================================= $Log$ + Revision 1.92 2004/12/27 17:42:01 micha + fix transparency while drawing (bug 462) + Revision 1.91 2004/09/27 10:01:18 mattias added TLazIntfImage.TColors property diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 62cb11f901..7f33af35db 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -2936,13 +2936,14 @@ End; the destination device context. ------------------------------------------------------------------------------} Function TWin32WidgetSet.StretchMaskBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC; XSrc, YSrc, SrcWidth, SrcHeight: Integer; Mask: HBITMAP; XMask, YMask: Integer; Rop: DWORD): Boolean; -var MaskBltResult: boolean; - StretchBltResult: boolean; Begin - MaskBltResult := MaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, Mask, XMask, YMask, Rop); - StretchBltResult := StretchBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, SrcWidth, SrcHeight, Rop); - Result := MaskBltResult and StretchBltResult; - + if (Width = SrcWidth) and (Height = SrcHeight) then + begin + Result := MaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, Mask, XMask, YMask); + end else begin + { TODO: does not use the mask } + Result := StretchBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, SrcWidth, SrcHeight, Rop); + end; //Result := False; //Windows.StretchMaskBlt(DestDC, X, Y, Width, Height, SrcDC, XSrc, YSrc, SrcWidth, SrcHeight, Mask, XMask, YMask, Rop); End; @@ -3031,6 +3032,9 @@ end; { ============================================================================= $Log$ + Revision 1.130 2004/12/27 17:42:01 micha + fix transparency while drawing (bug 462) + Revision 1.129 2004/12/11 01:28:58 mattias implemented bvSpace of TBevelCut