Recent

Author Topic: TBGRASwapRedBlueScanner  (Read 2761 times)

abtaylr

  • Full Member
  • ***
  • Posts: 107
TBGRASwapRedBlueScanner
« on: August 05, 2016, 09:46:10 pm »
I have had to get lazarus going in Windows, so on my Kubuntu 16.04 64 bit machine, I loaded VM with Windows 10, then installed lazarus.  When adding BGRABitmapPack, Version 9.1, the compile function choked on the following:

Code: Pascal  [Select][+][-]
  1. [b]procedure TBGLCustomBitmap.SwapRedBlueWithoutInvalidate(ARect: TRect);
  2. var y: NativeInt;
  3.     p: PBGRAPixel;
  4. begin
  5.   if not CheckClippedRectBounds(ARect.Left,ARect.Top,ARect.Right,ARect.Bottom) then exit;
  6.   for y := ARect.Top to ARect.Bottom-1 do
  7.   begin
  8.     p := GetScanlineFast(y)+ARect.Left;
  9.     TBGRASwapRedBlueScanner.ComputeFilterAt(p,p, ARect.Right-ARect.Left, False);  <-----------
  10.   end;
  11. end; [/b]
  12.  

I looked through every BGRABitmap file and can't seem to find TBGRASwapRedBlueScanner.

abt

abtaylr

  • Full Member
  • ***
  • Posts: 107
Re: TBGRASwapRedBlueScanner
« Reply #1 on: August 05, 2016, 09:52:39 pm »
I just noticed something!  On my Linux version this same file has the following code:

Code: Pascal  [Select][+][-]
  1. procedure TBGLCustomBitmap.SwapRedBlueWithoutInvalidate(ARect: TRect);
  2. var y: NativeInt;
  3.     p: PBGRAPixel;
  4. begin
  5.   if not CheckClippedRectBounds(ARect.Left,ARect.Top,ARect.Right,ARect.Bottom) then exit;
  6.   for y := ARect.Top to ARect.Bottom-1 do
  7.   begin
  8.     p := GetScanlineFast(y)+ARect.Left;
  9.     TBGRAFilterScannerSwapRedBlue.ComputeFilterAt(p,p, ARect.Right-ARect.Left, False); <------------
  10.   end;
  11. end;
  12.  

On the windows version that same line is:

Code: Pascal  [Select][+][-]
  1.  TBGRASwapRedBlueScanner.ComputeFilterAt(p,p, ARect.Right-ARect.Left, False);
  2.  

abtaylr

  • Full Member
  • ***
  • Posts: 107
Re: TBGRASwapRedBlueScanner
« Reply #2 on: August 05, 2016, 09:55:06 pm »
Problem solved.  I copied from Linux to Windows and Voila!, it works!

Never mind . . .

Oh, someone should fix the problem with version 9.1. I download from Github.

abt

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: TBGRASwapRedBlueScanner
« Reply #3 on: August 05, 2016, 11:15:22 pm »
Oh I see what your saying. Ok it's fixed on Git.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018