unitUnit1;
interface
uses
Windows, Messages, SysUtils, Classes,Graphics, Controls, Forms, Dialogs,
ComCtrls, Menus, ExtCtrls, StdCtrls, Spin;
type
TForm1 = class(TForm)
StatusBar1: TStatusBar;
SpinEdit1: TSpinEdit;
Image1: TImage;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
procedure FormMouseDown(Sender: TObject;Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure SpinEdit1Change(Sender: TObject);
procedure FormMouseMove(Sender: TObject;Shift: TShiftState; X,
Y: Integer);
procedure RadioButton1Click(Sender:TObject);
procedure RadioButton2Click(Sender:TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
xi,yi: integer;
h,i:integer;
implementation
{$R*.DFM}
procedurep1;
begin
form1.refresh;
form1.canvas.pixels[xi,yi]:=clred;
for i:=0to 628 do
form1.canvas.pixels[trunc(xi+H*cos(i/100)),trunc(yi+H*sin(i/100))]:=clblue;
end;
procedureTForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
xi:=x;
yi:=y;
p1;
end;
procedureTForm1.SpinEdit1Change(Sender: TObject);
begin
h:=SpinEdit1.value;
if RadioButton1.checked=true then p1
else
begin
image1.width:=SpinEdit1.value;
image1.height:=SpinEdit1.value;
end;
end;
procedureTForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
statusbar1.simpletext:=' X:'+inttostr(x)+' Y: '+inttostr(y);
end;
procedureTForm1.RadioButton1Click(Sender: TObject);
begin
Image1.visible:=false;
p1;
end;
procedureTForm1.RadioButton2Click(Sender: TObject);
begin
refresh;
Image1.visible:=true;
end;
procedureTForm1.FormCreate(Sender: TObject);
begin
h:=30;
end;
end.