少
少爷的拐杖
Unregistered / Unconfirmed
GUEST, unregistred user!
我想拖动画上去的某个物件....
Procedure TMainMap.Map1ToolUsed(Sender: TObject;
ToolNum: Smallint;
X1, Y1,
X2, Y2, Distance:do
uble;
Shift, Ctrl: Wordbool;
var EnableDefault: Wordbool);
var
Mpt: CMapXPoint;
MFtrsUnderPt: CMapXFeatures;
Mftr: CMapXFeature;
begin
......
Mpt := CoPoint.Create;
Mpt.Set_(X1, Y1);
MFtrsUnderPt := Map1.Layers.Item('MyLayer').SearchAtPoint(Mpt);
if MFtrsUnderPt.Count = 1 then
begin
Mftr := MFtrsUnderPt.Item(1);
Mftr.Offset(X2 - X1, Y2 - Y1);
Mftr.Update(EmptyParam, EmptyParam);
end;
......
可是拖动时不能即时看到拖动效果,Mapinfo中拖动的效果怎么做?
(拖动时物件外框有虚框表示)
物件合并怎么做?
那位有比较完整的代码呀,可以演示绘图,编辑等等功能的?
Procedure TMainMap.Map1ToolUsed(Sender: TObject;
ToolNum: Smallint;
X1, Y1,
X2, Y2, Distance:do
uble;
Shift, Ctrl: Wordbool;
var EnableDefault: Wordbool);
var
Mpt: CMapXPoint;
MFtrsUnderPt: CMapXFeatures;
Mftr: CMapXFeature;
begin
......
Mpt := CoPoint.Create;
Mpt.Set_(X1, Y1);
MFtrsUnderPt := Map1.Layers.Item('MyLayer').SearchAtPoint(Mpt);
if MFtrsUnderPt.Count = 1 then
begin
Mftr := MFtrsUnderPt.Item(1);
Mftr.Offset(X2 - X1, Y2 - Y1);
Mftr.Update(EmptyParam, EmptyParam);
end;
......
可是拖动时不能即时看到拖动效果,Mapinfo中拖动的效果怎么做?
(拖动时物件外框有虚框表示)
物件合并怎么做?
那位有比较完整的代码呀,可以演示绘图,编辑等等功能的?