OK, seems like there are several issues with both TBCPanel and TBGRABitmap:
1) TBCPanel seems to have Allign not working right - if I put one TBCPanel on another TBCPanel and set alTop for the inner one - there is no way to make the inner Top and Left equal to 0 - they are always at least =1 [issue #1] - event if Bevel is set to none in the parent panel
2) because of the above, setting RoundingX and RoundingY of the inner panel to 0 is a kind of hack that eliminates the visual effects of the above Allign issue, but ---> 3)
3) when setting Rounding to 0 calls FBGRA.Draw() with the Opaque param set to false -- why? what for? [issue #2] ...it seems more logical to draw the control as transparent, when rounding <>0, not opaque...?
procedure TCustomBCPanel.DrawControl;
begin
inherited DrawControl;
if FBGRA.NeedRender then
Render;
if Assigned (FRounding) then
begin
if (FRounding.RoundX<>0) and (FRounding.RoundY<>0) then
FBGRA.Draw(Self.Canvas, 0, 0, False)
else
FBGRA.Draw(Self.Canvas, 0, 0);
end
else
FBGRA.Draw(Self.Canvas, 0, 0);
end;
4) this leads to the performance problem on OSX - apparently procedure TBGRADefaultBitmap.DataDrawOpaque() on OSX is very slow [issue #3] - do not know why yet...
procedure TBGRADefaultBitmap.Draw(ACanvas: TCanvas; x, y: integer; Opaque: boolean);
begin
if self = nil then
exit;
if Opaque then
DataDrawOpaque(ACanvas, Rect(X, Y, X + Width, Y + Height), Data,
FLineOrder, FWidth, FHeight)
else
begin
LoadFromBitmapIfNeeded;
if Empty then
exit;
ACanvas.Draw(X, Y, Bitmap);
end;
end;
Any suggestions?