卷
卷起千堆雪tyn
Unregistered / Unconfirmed
GUEST, unregistred user!
小小礼物送给你,谢谢 .
>以下程序在一个表单上放置一个Timer控件,设置Interval :=100;
>实现PhotoShop里的流动线效果.
unit n;
interface
uses
Windows,Forms,Graphics,Classes,ExtCtrls;
type
TF=class(TForm)
m:TTimer;
procedure mTimer(Sender:TObject);
end;
var
F:TF;
a:Byte;
implementation
{$R *.DFM}
procedure c(X,Y:Integer;t:TCanvas);stdcall;
begin
a:=a shl 1;
if a =0 then a:=1;
if (a and 224)>0 then
t.Pixels[X,Y]:=clWhite
else
t.Pixels[X,Y]:=clBlack;
end;
procedure TF.mTimer(Sender:TObject);
begin
LineDDA(0,0,333,333,@c,LongInt(Canvas));
end;
end.
>运行之后,有没有看见象蚂蚁在爬呢?
>以下程序在一个表单上放置一个Timer控件,设置Interval :=100;
>实现PhotoShop里的流动线效果.
unit n;
interface
uses
Windows,Forms,Graphics,Classes,ExtCtrls;
type
TF=class(TForm)
m:TTimer;
procedure mTimer(Sender:TObject);
end;
var
F:TF;
a:Byte;
implementation
{$R *.DFM}
procedure c(X,Y:Integer;t:TCanvas);stdcall;
begin
a:=a shl 1;
if a =0 then a:=1;
if (a and 224)>0 then
t.Pixels[X,Y]:=clWhite
else
t.Pixels[X,Y]:=clBlack;
end;
procedure TF.mTimer(Sender:TObject);
begin
LineDDA(0,0,333,333,@c,LongInt(Canvas));
end;
end.
>运行之后,有没有看见象蚂蚁在爬呢?