I do not agree. It seems that the problem comes from Qt version of TBGRABitmap.Draw with alpha blending. It seems that it draws with black background.
This depends on unit "bgraqtbitmap.pas" which is not well optimized. Any help with it would be appreciated. For example, it would be faster to use specific Qt functions. More generally, if TBitmap can be used to draw with transparency, the bug we are talking about could be solved by rewriting SlowDrawTransparent function :
procedure TBGRAQtBitmap.SlowDrawTransparent(ABitmap: TBGRADefaultBitmap;
ACanvas: TCanvas; ARect: TRect);
begin
ACanvas.Draw(0,0, ABitmap.Bitmap);
end;
Does it work ?
It is possible that GetImageFromCanvas does not work either.
In fact, in testbgrafunc, it is test 3 that shows if transparent drawing on Canvas works. If it doesn't, pacman should have a black background.
The same problem in Windows, not only in Linux with Qt.
I've replaced the procedure with this one in Windows7 and works (Qt 4.7.3). I've commited the bgraqtbitmap.pas
Running 'testbgrafunc' works really bad:
* The window content is not updated: i need to resize the form to see changes
* Test 1 & Test 2: transparency with a 'black' background, it's like a bad semi-transparency.. (you know Test 5 is ok)
* Test 3 & Test 4: there is a black box right to the pacman
Test Canvas 2D is ok. Test 3D is ok.
bgracontrols:
* BGRASpriteAnimation doesn't resize (stretch, etc..)
* BGRAButton dropdown doesn't works.
LazPaint:
* Fonts are larger (tested only in HighDPI), seems that Qt is HighDPI aware by itself (talking about font's size).