unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Image1: TImage;
Image2: TImage;
OpenDialog1: TOpenDialog;
Button2: TButton;
edtx: TEdit;
edty: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
Image1.Transparent :=true; //
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Canvas.Draw(StrToInt(edtx.text),StrToInt(edty.text),Image2.Picture.Graphic);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if OpenDialog1.Execute then
Image2.Picture.LoadFromFile(OpenDialog1.FileName);
end;
end.