秋·风

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
用fpc trunk+lazarus trunk (2025-06-09)编译jvcl出现以下2个类型的错误:
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;

 

修改后重新编译就可以

posted on 2025-06-09 11:48  秋·风  阅读(117)  评论(2)    收藏  举报