interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Buttons;
type
TfmMain = class(TForm)
procedure FormPaint(Sender: TObject);
end;
var
fmMain: TfmMain;
A: Byte;
implementation
uses math;
{$R *.dfm}
procedure c(X,Y:Integer; ACanvas:TCanvas);stdcall;
begin
Inc(A,2);
ACanvas.Pen.Width := 5;
if Odd(A mod 31) then
ACanvas.Pen.Color := clWhite
else
ACanvas.Pen.Color := clBlack;
ACanvas.MoveTo(x,y);
ACanvas.LineTo(x,y);
end;
procedure TfmMain.FormPaint(Sender: TObject);
begin
LineDDA(0,20,width,20,@c,LongInt(Canvas));
LineDDA(0,0,width,Height,@c,LongInt(Canvas));
end;
end.