⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rvgif.pas

📁 与Action相结合,可以解决中文件显示乱码
💻 PAS
字号:
unit RVGif;

interface

{.$DEFINE USEGIFIMAGE}
// Use this define if you want to enable Gif support
// with Anders Melander's TGifImage
// http://www.torry.net/vcl/graphics/gif/gifimage.exe (original)
// http://www.trichview.com/resources/thirdparty/gifimage.zip (update)

implementation

{$IFDEF USEGIFIMAGE}

uses Classes, GifImage, Graphics, RVFuncs;

procedure MyAfterImportGraphic(Graphic: TGraphic);
begin
  if Graphic is TGIFImage then
    TGIFImage(Graphic).DrawOptions := TGIFImage(Graphic).DrawOptions-[goAnimate]+[goTransparent];
end;
{------------------------------------------------------------------------------}
// Required for Delphi 2-5/C++Builder 1-5
// I do not know how to convert this function to C++ code
function MyCreateGraphics(GraphicClass: TGraphicClass): TGraphic;
begin
  if GraphicClass=TGIFImage then  begin
    Result := TGIFImage.Create;
    end
  else
    Result := GraphicClass.Create;
end;
{------------------------------------------------------------------------------}
initialization
  TPicture.RegisterFileFormat('gif','Gif Image',TGifImage);
  RV_CreateGraphics := MyCreateGraphics;
  RV_AfterImportGraphic := MyAfterImportGraphic;
  RegisterClass(TGifImage);

{$ENDIF}


end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -