📄 rvgif.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 + -