C
coolmy
Unregistered / Unconfirmed
GUEST, unregistred user!
var r:integer;
linep:Tpoint;
begin
r:=7
// LineP.x:=Mouse.CursorPos.x;
// LineP.y:=Mouse.CursorPos.y;
Windows.GetCursorPOs(LineP);
// LineP:=Image1.ScreenToClient(LineP);
// showmessage(format('x=%d y=%d',[LineP.x,LineP.y]));
// x:=Linep.X-image1.Left;
// y:=Linep.y-image1.Top; // ClientToScreen(LineP);
Image1.Canvas.Ellipse(LineP.X-R,LineP.Y-R,LineP.X+R,LineP.Y+R);
Panel2.Left:=LineP.X;
Panel2.Top:=LineP.Y;
end;
我在image1中画圆与panel2左上点所处位置不一样,也就是说:我想在image1中鼠标双击
处画圆,可画的圆与鼠标位置相差太远。这不应该再扯到坐标转换吧。有劳各位。
linep:Tpoint;
begin
r:=7
// LineP.x:=Mouse.CursorPos.x;
// LineP.y:=Mouse.CursorPos.y;
Windows.GetCursorPOs(LineP);
// LineP:=Image1.ScreenToClient(LineP);
// showmessage(format('x=%d y=%d',[LineP.x,LineP.y]));
// x:=Linep.X-image1.Left;
// y:=Linep.y-image1.Top; // ClientToScreen(LineP);
Image1.Canvas.Ellipse(LineP.X-R,LineP.Y-R,LineP.X+R,LineP.Y+R);
Panel2.Left:=LineP.X;
Panel2.Top:=LineP.Y;
end;
我在image1中画圆与panel2左上点所处位置不一样,也就是说:我想在image1中鼠标双击
处画圆,可画的圆与鼠标位置相差太远。这不应该再扯到坐标转换吧。有劳各位。