| begin
MoveRightTopPoint;
reSizeCon
end
else if FPointRec.RightButton.isDown then
begin
MoveRightBottomPoint;
reSizeCon
end
else if FPointRec.LeftMid.isDown then
begin
MoveLeftMidPoint;
reSizeCon
end
else if FPointRec.TopMid.isDown then
begin
MoveTopMidPoint;
reSizeCon
end
else if FPointRec.RightMid.isDown then
begin
MoveRightMidPoint;
reSizeCon
end
else if FPointRec.ButtonMid.isDown then
begin
MoveBottomMidPoint;
reSizeCon
end
end;
end;
procedure TDragClass.PointMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button= mbLeft then
begin
if (FpointRec.LeftTop.isDown) and
(Sender=FpointRec.LeftTop) then
FpointRec.LeftTop.isDown:=False
else if (FpointRec.LeftBottom.isDown) and
(Sender=FpointRec.LeftBottom) then
FpointRec.LeftBottom.isDown:=False
else if (FpointRec.RightTop.isDown) and
(Sender=FpointRec.RightTop) then
FpointRec.RightTop.isDown:=False
else if (FpointRec.RightButton.isDown) and
(Sender=FpointRec.RightButton) then
FpointRec.RightButton.isDown:=False
else if (FpointRec.LeftMid.isDown) and
(Sender=FpointRec.LeftMid) then
FpointRec.LeftMid.isDown:=False
else if (FpointRec.TopMid.isDown) and
(Sender=FpointRec.TopMid) then
FpointRec.TopMid.isDown:=False
else if (FpointRec.RightMid.isDown) and
(Sender=FpointRec.RightMid) then
FpointRec.RightMid.isDown:=False
else if (FpointRec.ButtonMid.isDown) and
(Sender=FpointRec.ButtonMid) then
FpointRec.ButtonMid.isDown:=False;
end;
end;
//左顶点的移动
procedure TDragClass.MoveLeftTopPoint;
var offsetX,offsetY:Integer;
begin
GetCursorPos(FPointRec.LeftTop.NextP);
offsetX:=FPointRec.LeftTop.NextP.X-FPointRec.LeftTop.PrevP.X;
offSetY:=FPointRec.LeftTop.NextP.Y-FPointRec.LeftTop.PrevP.Y;
if not FisMoveStep then
begin
FPointRec.LeftTop.Left:=FPointRec.LeftTop.Left+offsetX;
FPointRec.LeftTop.Top:=FPointRec.LeftTop.Top+offsetY;
end
else begin
MoveX:=MoveX+offsetX;
MoveY:=MoveY+offsetY;
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >> |