主题:在image上画线,stretch:=true的时候,为什么画的位置不是鼠标点的位置呢?代码如下。
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Image1.Canvas.MoveTo(X,Y);
end;
procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Image1.Canvas.LineTo(X,Y);
end;
Shift: TShiftState; X, Y: Integer);
begin
Image1.Canvas.MoveTo(X,Y);
end;
procedure TForm1.Image1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Image1.Canvas.LineTo(X,Y);
end;