unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, GR32_Image, StdCtrls;
type
TForm1 =
class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Button3: TButton;
Button2: TButton;
Button1: TButton;
Image6: TImage;
Image7: TImage;
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
procedure ResizeImages(ZoomSize: Extended);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
var
Zoom : Extended = 0;
procedure TForm1.ResizeImages(ZoomSize: Extended);
begin
// Image Grösse anpassen
Image7.Width := Round(Image7.Width * ZoomSize);
Image7.Height :=Round(Image7.Height * ZoomSize);
Image6.Left := Round(Image7.Left + Image7.Width) -510;
Image6.Top := Round(Image7.Top + Image7.Height) -205;
Image6.Width := Round(Image6.Width * ZoomSize);
Image6.Height := Round(Image6.Height * ZoomSize);
end;
procedure TForm1.Button1Click(Sender: TObject);
// Zoom "+" Btn
begin
Zoom := + 1.1;
ResizeImages(Zoom);
end;
procedure TForm1.Button2Click(Sender: TObject);
// Zoom "-" Btn
begin
begin
Zoom := 0.9;
ResizeImages(Zoom);
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
// Close Btn
begin
Close;
end;
end.