unit3.~pas
来自「delphi开发的一个文书理解系统」· ~PAS 代码 · 共 64 行
~PAS
64 行
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm3 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses ZJM;
{$R *.dfm}
procedure TForm3.FormCreate(Sender: TObject);
begin
Form3.Color:=clBlack;
bmp:=TBitmap.Create;
bmp.LoadFromFile('didang.bmp');
Form3.ClientWidth:=519;//bmp.Width;
Form3.ClientHeight:=823;//bmp.Height;
end;
procedure TForm3.Button1Click(Sender: TObject);
var
i:integer;
RectDest,RectSrc:TRect;
StepX,StepY:Real;
begin
Form3.Canvas.Brush.Color:=clBlack;
Form3.Canvas.FillRect(form1.ClientRect);
Button1.Visible:=False;
StepX:=bmp.Width/500;
StepY:=bmp.Height/500;
for i:=0 to 500 do
begin
RectSrc.Left:=0;
RectSrc.Top:=bmp.Height-Round(i*StepY);
RectSrc.Right:=Round(i*StepX);
RectSrc.Bottom:=bmp.Height;
RectDest.Left:=0;
RectDest.Top:=bmp.Height-Round(i*StepY);
RectDest.Right:=Round(i*StepX);
RectDest.Bottom:=bmp.Height;
Form3.Canvas.CopyRect(RectDest,bmp.Canvas,RectSrc);
end;
button1.visible:=True;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?