Код
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
x,y,h:real;
I1,I2,J1,J2:integer;
x1,x2,y1,y2:real;
implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
function II(x:real):Integer;
begin
II:=I1 + Trunc ((x-x1)*(I2-I1)/(x2-x1))
end;
{------------------------------------------------------------------------------}
function JJ(y:real):Integer;
begin
JJ:=J1 + Trunc ((y-y1)*(J2-J1)/(y2-y1))
end;
{------------------------------------------------------------------------------}
procedure TForm1.Button1Click(Sender: TObject);
begin
with Image1
end;
end.