用fpc trunk+lazarus trunk (2025-06-09)编译jvcl出现以下2个类型的错误:
1、Identifier not found "OffsetRect"
1、Identifier not found "OffsetRect"
Error: Identifier not found "OffsetRect"

2、出现:
jvxpcoreutils.pas(96,97) Error: Incompatible type for arg no. 4: Got "TFPGradientDirection", expected "TGradientDirection"

解决方法:
1、第1个问题只需在uses 增加Types单元。

第2个问题:
在gdHorizontal,gdVertical前增加:Graphics.
Graphics.gdHorizontal
Graphics.gdVertical
// Ignoring "AColors" and "Dithered" procedure JvXPCreateGradientRect(const AWidth, AHeight: Integer; const StartColor, EndColor: TColor; const AColors: TJvXPGradientColors; const Style: TJvXPGradientStyle; const Dithered: Boolean; var Bitmap: TBitmap); begin if (AHeight <= 0) or (AWidth <= 0) then Exit; Bitmap.Height := AHeight; Bitmap.Width := AWidth; Bitmap.PixelFormat := pf24bit; case Style of gsLeft: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), StartColor, EndColor, Graphics.gdHorizontal); gsRight: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), EndColor, StartColor, Graphics.gdHorizontal); gsTop: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), StartColor, EndColor, Graphics.gdVertical); gsBottom: Bitmap.Canvas.GradientFill(Rect(0, 0, AWidth, AHeight), EndColor, StartColor, Graphics.gdVertical); end; end;

修改后重新编译就可以
 
                     
                    
                 
                    
                 

 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号