Chcę mieć możliwość przybliżania obrazka
znalazłem taki kod
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var zoom_size : real;
begin
zoom_size := 2;
If Image1.Cursor = crCross then
Begin
If Button = mbLeft then
Begin
Image1.Width := Round(Image1.Width * zoom_size);
Image1.Height := Round(Image1.Height * zoom_size);
End
else
Begin
Image1.Width := Round(Image1.Width / zoom_size);
Image1.Height := Round(Image1.Height / zoom_size);
End
end;
end;
niestety to działa tak że po przybliżeniu zakrywa mi cały program chcę żeby przybliżało ale obrazek zajmuje tyle samo miejsca co wcześniej