Closed michnovka closed 4 years ago
The correct signature from bgrabitmap package is
procedure DrawPart(ARect: TRect; ACanvas: TCanvas; x, y: integer; Opaque: boolean); override;
the call in bgracontrolc package is
FBGRA.DrawPart(ARect, Canvas, displayRect, True);
Hi, it works, I have it installed.
The version 6.8 of BGRAControls requires BGRABitmap 11.2.
It still does not compile, the versions of BGRA* I get from the online package manager either don't fit together or something else is wrong. ~Unfortunately I cannot tell which versions these are~ because the online package manager's horrible UI won't show the package version anywhere.
Edit: My versions are: BGRAControls: 6.8.0.0, BGRABitmap: 11.2.0.0
bgravirtualscreen.pas(420,55) Error: Wrong number of parameters specified for call to "DrawPart"
What are the versions of Lazarus and FPC you're using?
If with online package manager it doesn't works, try downloading the .zip releases from bgrabitmap and bgracontrols repositories, extract it somewhere and open the .lpk files, bgrabitmap.lpk & bgracontrols.lpk.
I am on the fixes branch, installed with fpcupdeluxe: Laz: 2.0.11, FPC: 3.2.1 on Kubuntu 20
All parts of the related code are clearly inside the BGRA packages, like shown in post 1 in this thread.
in bgravirtualscreen.pas(420,55) it is trying to call the DrawPart method with wrong number of arguments. It is trying to supply a rectangle where it actually expects two integers x and y. Caller and callee are both inside the BGRA-Packages, so Lazarus version should not matter.
It is inside an ifdef LINUX, so the bug will only appear when compiling on Linux.
Hi, ok, there is an ifdef in these lines, that line is for linux only, so it was important that you mention it.
On BGRABitmap there is this function:
procedure DrawPart(ARect: TRect; ACanvas: TCanvas; ATargetRect: TRect; Opaque: boolean); virtual;
Below the function you mentioned. So it's there.
Try adding overload modifier to the function I mentioned.
So It looks like this:
procedure DrawPart(ARect: TRect; ACanvas: TCanvas; x, y: integer; Opaque: boolean); overload; virtual; procedure DrawPart(ARect: TRect; ACanvas: TCanvas; ATargetRect: TRect; Opaque: boolean); overload; virtual;
That's actually fixed on dev-bgrabitmap branch, so try downloading the dev-bgrabitmap branch if you want, is not included in the release, was fixed on July 22 and version 11.2 is July 19.
@circular17 you can do a small release fix for Linux users?
I checked and as far as I can see it is in the master branch and in version 11.2.
I checked and as far as I can see it is in the master branch and in version 11.2.
Yes it is, the problem is that's missing the override you commited recently
https://github.com/bgrabitmap/bgrabitmap/blob/master/bgrabitmap/bgragtkbitmap.pas#L37
I mean the 'overload' keyword is missing not the method
Ahhh I see
Ok 👍 I keep this issue open if anyone else can't install, until the new release, don't need to be right now, since the solution is very simple. Do the release when you think will be ok to do it.
Released new version https://github.com/bgrabitmap/bgrabitmap/releases/tag/v11.2.1
Thankyou, so it's solved.
Version 6.8.0.0 Does not compile because: