Menu

#21 Compilation error: bgraqtbitmap.pas(68,23) Error: Identifier not found "TBGRAPtrBitmap"

Current version
closed
nobody
None
1
2016-07-16
2015-05-05
Anonymous
No

When compiling bgrabitmap 8.5.1 with qt4 support (--widgetset=qt argument to lazbuild) it causes following error:

bgraqtbitmap.pas(68,23) Error: Identifier not found "TBGRAPtrBitmap"
bgraqtbitmap.pas(68,23) Error: Error in type definition
bgraqtbitmap.pas(70,25) Error: Identifier not found "TBGRAPtrBitmap"
bgraqtbitmap.pas(71,8) Error: Illegal qualifier
bgraqtbitmap.pas(72,27) Error: Incompatible type for arg no. 1: Got "<erroneous type="">", expected "TBGRALCLBitmap"
bgraqtbitmap.pas(59,25) Hint: Found declaration: TBGRAQtBitmap.SlowDrawTransparent(TBGRALCLBitmap,TCanvas,TRect);
bgraqtbitmap.pas(73,8) Error: Illegal qualifier
bgraqtbitmap.pas(146,4) Warning: User defined: QT: recheck this
bgraqtbitmap.pas(170) Fatal: There were 6 errors compiling module, stopping

OS: Arch Linux 64-bit
Free Pascal Compiler version 2.6.4 [2014/03/12] for x86_64

Discussion

  • circular

    circular - 2015-05-05

    Thank you for reporting the error in detail. I fixed it on SVN. Is the problem solved?

     
  • Anonymous

    Anonymous - 2015-05-05

    It seems to be fixed in latest SVN. I've applied combined diff took from following commits: http://sourceforge.net/p/lazpaint/code/1083/tree//bgrabitmap/bgraqtbitmap.pas?diff=5060423bbfc09e52010c1ec0:1082 and http://sourceforge.net/p/lazpaint/code/1084/tree//bgrabitmap/bgraqtbitmap.pas?diff=5060423bbfc09e52010c1ec0:1083:

    diff -rupN bgrabitmap8.5.1/bgraqtbitmap.pas bgrabitmap8.5.1_p/bgraqtbitmap.pas
    --- bgrabitmap8.5.1/bgraqtbitmap.pas    2015-04-15 15:09:04.000000000 +0200
    +++ bgrabitmap8.5.1_p/bgraqtbitmap.pas  2015-05-05 22:16:21.450982555 +0200
    @@ -28,14 +28,14 @@ interface
    
     uses
       Classes, SysUtils, BGRALCLBitmap, Graphics,
    -  GraphType;
    +  GraphType, BGRABitmapTypes;
    
     type
       { TBGRAQtBitmap }
    
       TBGRAQtBitmap = class(TBGRALCLBitmap)
       private
    -    procedure SlowDrawTransparent(ABitmap: TBGRALCLBitmap;
    +    procedure SlowDrawTransparent(ABitmap: TBGRACustomBitmap;
           ACanvas: TCanvas; ARect: TRect);
       public
         procedure DataDrawTransparent(ACanvas: TCanvas; Rect: TRect;
    @@ -51,12 +51,12 @@ type
    
     implementation
    
    -uses BGRABitmapTypes, LCLType,
    +uses LCLType,
       LCLIntf, IntfGraphics,
       qtobjects, qt4,
       FPImage;
    
    -procedure TBGRAQtBitmap.SlowDrawTransparent(ABitmap: TBGRALCLBitmap;
    +procedure TBGRAQtBitmap.SlowDrawTransparent(ABitmap: TBGRACustomBitmap;
       ACanvas: TCanvas; ARect: TRect);
     begin
       ACanvas.StretchDraw(ARect, ABitmap.Bitmap);
    @@ -65,9 +65,9 @@ end;
     procedure TBGRAQtBitmap.DataDrawTransparent(ACanvas: TCanvas; Rect: TRect;
       AData: Pointer; ALineOrder: TRawImageLineOrder; AWidth, AHeight: integer);
     var
    -  Temp: TBGRAPtrBitmap;
    +  Temp: TBGRALCLPtrBitmap;
     begin
    -  Temp := TBGRAPtrBitmap.Create(AWidth, AHeight, AData);
    +  Temp := TBGRALCLPtrBitmap.Create(AWidth, AHeight, AData);
       Temp.LineOrder := ALineOrder;
       SlowDrawTransparent(Temp, ACanvas, Rect);
       Temp.Free;
    @@ -143,7 +143,6 @@ begin
       SrcX     := x + Ofs.X;
       SrcY     := y + Ofs.Y;
    
    -  {$warning QT: recheck this}
       if (dcSource.vImage <> nil) and (dcSource.vImage.Handle <> nil) then
       begin
         // we must stop painting on device
    @@ -156,10 +155,6 @@ begin
           QPainter_begin(dcDest.Widget, TQtImage(bmp.Handle).Handle);
       end;
    
    -  (*
    -  gdk_window_copy_area(dcDest.Drawable, dcDest.GC, 0, 0, dcSource.Drawable,
    -    SrcX, SrcY, Width, Height);
    -  *)
       LoadFromRawImage(bmp.RawImage, 255, True);
       bmp.Free;
       InvalidateBitmap;
    
     
  • circular

    circular - 2015-05-05

    Ok :)

     
  • circular

    circular - 2015-05-05
    • status: open --> pending
     
  • circular

    circular - 2016-07-16
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel